NoDB
NoDB copied to clipboard
Error using NoDB on python3
When I tried the basic example I got the following error:
user = {"name": "Jeff", "age": 19} nodb.save(user) # True
AttributeError: 'dict' object has no attribute 'has_key' which seems like a python3 compatibility issue. Anyone can help?
which version are you using?
Hitting the same issue with python 3.6.3
using the same sample code as above and from the readme.
Which version of NoDB? All the has_keys were removed from the code base and other changes to make it python3 compatible in v0.4. v0.3.3 would still have them and it is not python3 compatible.
I installed latest for python 3.6 and got v0.3.2
Thanks, Ori
מאת: tkuster-drod נשלח: יום שישי, 24 באוגוסט, 02:06 נושא: Re: [Miserlou/NoDB] Error using NoDB on python3 (#23) אל: Miserlou/NoDB עותק: ori-n, Author
Which version of NoDB? All the has_keys were removed from the code base and other changes to make it python3 compatible in v0.4. v0.3.3 would still have them and it is not python3 compatible. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Miserlou/NoDB/issues/23#issuecomment-415600595, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AfvrAPk0GyK3-NaIiAbz4Wg1nR0Cqveeks5uTzVhgaJpZM4V1tTS.
I also did a pip install nodb
and it installed nodb 0.3.2.
Do you have plans to push the newer version to pypi?
I want to talk to @Miserlou before we publish to PyPI, but for now, can you:
pip install git+https://github.com/Miserlou/NoDB.git@4616921
Is there any progress with this issue? Thanks
I don't have access to push this to PyPI, but for now, you can:
pip install git+https://github.com/Miserlou/NoDB.git@4616921
You can also add this to your requirements file:
git+https://github.com/Miserlou/NoDB.git@4616921
I'm also seeing this, thanks @FlipperPA for the workaround.
However, there's a problem with @FlipperPA 's workaround. I'm trying to deploy a Falcon app to Elastic Beanstalk with Python 3.6. However, futures
being installed which breaks the deploy. Therefore it seems impossible to use nodb
in this context at the moment.
I have the same problem as @antgel
Using commit ID 4616921
, it installs futures>=3.0.5
which is only for Python2.
For me on AWS Lambda this doesn't work:
Syntax error in module 'main': invalid syntax (_base.py, line 381)
Issue is here: https://github.com/agronholm/pythonfutures/issues/41 Some info here: https://pypi.org/project/futures/
Python 3 users should not attempt to install it, since the package is already included in the standard library
Workaround
Delete <python path>/concurrent
and <python path>/futures*
from your zip package. It's hacky but I don't know a better way.
Perhaps we should just drop support for python2 as it only has a couple of months left?
i've removed futures from requirements.txt in the latest pull request #26 this should resolve this issue
this will be resolved with #19