Skip to content
This repository has been archived by the owner on May 9, 2020. It is now read-only.

Not able to import chef on Python 3.4 #67

Open
ShakeelFluke opened this issue Feb 23, 2017 · 4 comments
Open

Not able to import chef on Python 3.4 #67

ShakeelFluke opened this issue Feb 23, 2017 · 4 comments

Comments

@ShakeelFluke
Copy link

Can you please help me on this error

Python 3.4.3 (default, Feb 23 2017, 16:35:53)
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

import chef
Traceback (most recent call last):
File "", line 1, in
File "/Users/svellore/workspace/python/flask-code/virtualenvs/py3.4/lib/python3.4/site-packages/PyChef-0.3.0-py3.4.egg/chef/init.py", line 6, in
from chef.client import Client
File "/Users/svellore/workspace/python/flask-code/virtualenvs/py3.4/lib/python3.4/site-packages/PyChef-0.3.0-py3.4.egg/chef/client.py", line 2, in
from chef.base import ChefObject
File "/Users/svellore/workspace/python/flask-code/virtualenvs/py3.4/lib/python3.4/site-packages/PyChef-0.3.0-py3.4.egg/chef/base.py", line 39, in
class ChefObject(six.with_metaclass(ChefObjectMeta, object)):
File "/Users/svellore/workspace/python/flask-code/virtualenvs/py3.4/lib/python3.4/site-packages/six-1.6.0-py3.4.egg/six.py", line 627, in with_metaclass
return meta("NewBase", bases, {})
File "/Users/svellore/workspace/python/flask-code/virtualenvs/py3.4/lib/python3.4/site-packages/PyChef-0.3.0-py3.4.egg/chef/base.py", line 35, in init
ChefObject.types[name.lower()] = cls
NameError: name 'ChefObject' is not defined

@coderanger
Copy link
Owner

Some details with metaclasses changed in 3.4 that I haven't updated for.

Also, unrelated, but for the love of all that is holy stop using easy_install and egg folder installs.

@ShakeelFluke
Copy link
Author

Thanks for your reply. Can you please suggest me Python and PyChef version for a fresh start.

@coderanger
Copy link
Owner

I mean tests are all passing on 3.4 and 3.5, so it should work at least somewhat. What does your code look like? I would say uninstall the egg format and try installing normally via pip.

@ShakeelFluke
Copy link
Author

Thank you. I started working on 3.4 and it is working fine 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants