pyramid_simpleform gives error @ import

8 views
Skip to first unread message

Nick Victor

unread,
Sep 24, 2021, 3:12:33 AM9/24/21
to pylons-discuss

Hi,
newbie to Pyramid I have tried to use the pyramid_simpleform but already fail when I only try to run the example on

https://docs.pylonsproject.org/projects/pyramid-simpleform/en/latest/

My little non-cookiecutter trial project gives that @ invocation:

Traceback (most recent call last):
  File "...\trypyramid_3.py", line 15, in <module>
    config.scan('trypyramid_3b_views')
....
  File "...\trypyramid_3b_views.py", line 6, in <module>
    from pyramid_simpleform import Form
  File "...\env\lib\site-packages\pyramid_simpleform\__init__.py", line 175
    except Invalid, e:
                  ^
SyntaxError: invalid syntax

I have uninstalled and reinstalled pyramid_simpleform assuming that a dependecy might be the problem.
I even do not understand why python complains about the import already rather than the instantiation of the Form class.
I thought importing just making a module content available in the current namespace??

So how can I fix this problem?
Any hint appreciated. Thanks.
Nick
 

Steve Piercy

unread,
Sep 24, 2021, 3:19:08 AM9/24/21
to pylons-...@googlegroups.com
pyramid_simpleform probably does not support Pyramid 2.0. It has not been updated for many years. Welcome to free open source software maintained by volunteers!

We would accept pull requests that includes updated tests and currently supported versions of Python, dropping the old stuff. I would suggest starting here.

https://github.com/Pylons/pyramid_simpleform/blob/master/tox.ini

Or use a form library that supports Pyramid 2.0, modern versions of Python, and has been updated within the last year.

https://docs.pylonsproject.org/projects/deform/en/latest/

--steve
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com <mailto:pylons-discus...@googlegroups.com>.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/00466e99-d518-4db6-94b1-2eeb3d40d0ean%40googlegroups.com <https://groups.google.com/d/msgid/pylons-discuss/00466e99-d518-4db6-94b1-2eeb3d40d0ean%40googlegroups.com?utm_medium=email&utm_source=footer>.

Nick Victor

unread,
Sep 24, 2021, 5:14:12 AM9/24/21
to pylons-discuss
Thanks,  Steve.
A remark like yours that pyramid_simpleforms´does not support Pyramid 2.0 on this page
https://docs.pylonsproject.org/projects/pyramid-simpleform/en/latest/
would be helpful.

Steve Piercy

unread,
Sep 24, 2021, 6:13:42 AM9/24/21
to pylons-...@googlegroups.com
You're welcome to submit a PR with correct information. I don't use this library. I merely made an unproven assumption about Pyramid version support.

--steve


To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/c087ff5e-4a1e-4a99-97cf-5744412ca1bfn%40googlegroups.com.

Hynek Schlawack

unread,
Sep 24, 2021, 6:58:09 AM9/24/21
to pylons-...@googlegroups.com
I that is Python 2 syntax that isn’t present in the master branch. Looking at https://github.com/Pylons/pyramid_simpleform/issues/16 it seems like you could make it work by installing 0.7-dev, but it doesn’t seem like a good idea to build a new app on it.

Sent from my phone.

On 24. Sep 2021, at 09:12, Nick Victor <nick.vi...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages