Skip to content
New issue

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

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

Already on GitHub? # to your account

Python 3 'ConfigParser' has no attribute 'RawConfigParser' #39

Closed
mhurron opened this issue Jul 29, 2013 · 1 comment
Closed

Python 3 'ConfigParser' has no attribute 'RawConfigParser' #39

mhurron opened this issue Jul 29, 2013 · 1 comment

Comments

@mhurron
Copy link

mhurron commented Jul 29, 2013

$ nodeenv -p
Traceback (most recent call last):
File "/home/sbrown/workspace/homesite/bin/nodeenv", line 9, in
load_entry_point('nodeenv==0.6.6', 'console_scripts', 'nodeenv')()
File "/home/sbrown/workspace/homesite/lib/python3.3/site-packages/nodeenv.py", line 519, in main
create_environment(env_dir, opt)
File "/home/sbrown/workspace/homesite/lib/python3.3/site-packages/nodeenv.py", line 433, in create_environment
save_env_options(env_dir, opt)
File "/home/sbrown/workspace/homesite/lib/python3.3/site-packages/nodeenv.py", line 492, in save_env_options
config = ConfigParser.RawConfigParser()
AttributeError: type object 'ConfigParser' has no attribute 'RawConfigParser'

$ python -V
Python 3.3.2

It appears that ConfigParser has changed further in Python 3.3+ or so and line 492 should look like -

config = configparser.RawConfigParser()

but I don't know what that would do for Python 2 compatibility.

http://docs.python.org/3/library/configparser.html#legacy-api-examples
http://docs.python.org/3/library/configparser.html#rawconfigparser-objects

@slai
Copy link

slai commented Sep 12, 2013

I've got a fix for this issue in this commit over in my fork (slai@915e3a9). Unfortunately, I've been poking around with that branch since doing some other stuff, so I don't think I can submit a pull request for just that change.

BTW, if you're merging, there's another Python 3 compatibility fix here - slai@3340b5d

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants