Skip to content
This repository has been archived by the owner on Apr 24, 2018. It is now read-only.

'module' object has no attribute 'assignments' #21

Open
lmichelbacher opened this issue Jan 6, 2017 · 1 comment
Open

'module' object has no attribute 'assignments' #21

lmichelbacher opened this issue Jan 6, 2017 · 1 comment

Comments

@lmichelbacher
Copy link

I get this error when running the code from the README example.

pip install args

Save as tool.py:

import args

print 'Arguments passed in: ' + str(args.all)
print 'Flags detected: ' + str(args.flags)
print 'Files detected: ' + str(args.files)
print 'NOT files detected: ' + str(args.not_files)
print 'Grouped Arguments: ' + str(args.grouped)
print 'Assignments detected: ' + str(args.assignments)
$ python tool.py

Result:

Arguments passed in: []
Flags detected: <args []>
Files detected: []
NOT files detected: <args []>
Grouped Arguments: OrderedDict([('_', <args []>)])
Traceback (most recent call last):
  File "tool.py", line 8, in <module>
    print 'Assignments detected: ' + str(args.assignments)
AttributeError: 'module' object has no attribute 'assignments'
$ python --version
Python 2.7.11
pip --version
$ pip 9.0.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)

I noticed that

In [2]: print args.__doc__

args
~~~~

This module provides the CLI argument interface for clint.

is not the same as the docstring on master (which is jest the headline).

Maybe the version in PyPi is not up to date?

@acrewdson
Copy link

Same issue -- and yeah, I think PyPI is not up to date. Would be nice to fix, since this is confusing for anyone new who comes here looking to use this.

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