Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using NoDB on python3 #23

Open
ori-n opened this issue Aug 9, 2018 · 14 comments
Open

Error using NoDB on python3 #23

ori-n opened this issue Aug 9, 2018 · 14 comments
Assignees
Labels
Waiting on PyPI Fixed in Master, waiting on PyPI to be updated

Comments

@ori-n
Copy link

ori-n commented Aug 9, 2018

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?

@bendog
Copy link
Collaborator

bendog commented Aug 13, 2018

which version are you using?

@brooksc
Copy link

brooksc commented Aug 23, 2018

Hitting the same issue with python 3.6.3

using the same sample code as above and from the readme.

@tkuster-drod
Copy link

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.

@ori-n
Copy link
Author

ori-n commented Aug 24, 2018 via email

@brooksc
Copy link

brooksc commented Aug 24, 2018

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?

@FlipperPA
Copy link
Collaborator

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

@ori-n
Copy link
Author

ori-n commented Sep 6, 2018

Is there any progress with this issue? Thanks

@FlipperPA
Copy link
Collaborator

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

@antgel
Copy link

antgel commented Nov 4, 2018

I'm also seeing this, thanks @FlipperPA for the workaround.

@antgel
Copy link

antgel commented Nov 6, 2018

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.

@FutureSharks
Copy link

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: agronholm/pythonfutures#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.

@bendog
Copy link
Collaborator

bendog commented Sep 12, 2019

Perhaps we should just drop support for python2 as it only has a couple of months left?

@bendog
Copy link
Collaborator

bendog commented Sep 12, 2019

i've removed futures from requirements.txt in the latest pull request #26
this should resolve this issue

@bendog
Copy link
Collaborator

bendog commented Sep 12, 2019

this will be resolved with #19

@bendog bendog self-assigned this Sep 12, 2019
@bendog bendog added the Waiting on PyPI Fixed in Master, waiting on PyPI to be updated label Sep 12, 2019
@bendog bendog assigned Miserlou and unassigned bendog Sep 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Waiting on PyPI Fixed in Master, waiting on PyPI to be updated
Projects
None yet
Development

No branches or pull requests

8 participants