Forums

flask + zodb + python2.7: working examples?

hi everyone, first poster here.

does anyone have any working examples of getting flask + zodb to work in pythonanywhere's 2.7 environment? I can't even get the flask-zodb unit tests (https://github.com/dag/flask-zodb/blob/master/tests.py) to compile on the pythonanywhere console for my environment. (they're fine on my local install.)

03:48 ~/play $ python zodb_tests.py 
Traceback (most recent call last):
  File "zodb_tests.py", line 2, in <module>
    from ZODB import MappingStorage
  File "/usr/local/lib/python2.7/dist-packages/ZODB/__init__.py", line 28, in <module>
    from ZODB.DB import DB, connection
  File "/usr/local/lib/python2.7/dist-packages/ZODB/DB.py", line 23, in <module>
    from ZODB.broken import find_global
  File "/usr/local/lib/python2.7/dist-packages/ZODB/broken.py", line 20, in <module>
    import zope.interface
ImportError: No module named interface

thanks in advance!

edit by admin for formatting

ok, I see that I can set up a virtualenv with this module installed. admins, would it be possible to add it the the standard 'batteries included' https://www.pythonanywhere.com/batteries_included/ 2.7 env?

We have an issue with zope.interface that we're trying to track down. If you want to use ZODB, your best bet at the moment is to use a virtualenv.

thanks, I'll stick with shelve for now while I'm waiting for issue to be resolved. appreciate the support!