Skip to content

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

@mhurron

Description

@mhurron

$ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions