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

TypeError: attrib() got an unexpected keyword argument 'factory' #2339

Open
mkangia opened this issue Oct 31, 2018 · 7 comments
Open

TypeError: attrib() got an unexpected keyword argument 'factory' #2339

mkangia opened this issue Oct 31, 2018 · 7 comments

Comments

@mkangia
Copy link
Contributor

mkangia commented Oct 31, 2018

getting this when running openvpn-activate-user for example.

Traceback (most recent call last):
  File "/Users/Manish/.virtualenvs/ansible/bin/commcare-cloud", line 11, in <module>
    load_entry_point('commcare-cloud', 'console_scripts', 'commcare-cloud')()
  File "/Users/Manish/.virtualenvs/ansible/lib/python2.7/site-packages/pkg_resources/__init__.py", line 572, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/Users/Manish/.virtualenvs/ansible/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2755, in load_entry_point
    return ep.load()
  File "/Users/Manish/.virtualenvs/ansible/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2408, in load
    return self.resolve()
  File "/Users/Manish/.virtualenvs/ansible/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2414, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/Manish/Projects/commcare-cloud/src/commcare_cloud/commcare_cloud.py", line 15, in <module>
    from commcare_cloud.commands.migrations.couchdb import MigrateCouchdb
  File "/Users/Manish/Projects/commcare-cloud/src/commcare_cloud/commands/migrations/couchdb.py", line 22, in <module>
    from commcare_cloud.commands.migrations.copy_files import SourceFiles, prepare_file_copy_scripts, REMOTE_MIGRATION_ROOT, \
  File "/Users/Manish/Projects/commcare-cloud/src/commcare_cloud/commands/migrations/copy_files.py", line 26, in <module>
    class SourceFiles(object):
  File "/Users/Manish/Projects/commcare-cloud/src/commcare_cloud/commands/migrations/copy_files.py", line 31, in SourceFiles
    files = attr.ib(factory=list)
TypeError: attrib() got an unexpected keyword argument 'factory'
@mkangia
Copy link
Contributor Author

mkangia commented Oct 31, 2018

fyi @dannyroberts

@snopoke
Copy link
Contributor

snopoke commented Nov 1, 2018 via email

@mkangia
Copy link
Contributor Author

mkangia commented Nov 1, 2018

@snopoke i did pip install -r requirements. That should have fixed it?

@snopoke
Copy link
Contributor

snopoke commented Nov 1, 2018

you'd need to have -U or --update

@dannyroberts
Copy link
Member

@mkangia pip install -r requirements.txt should have fixed it. When you run the following, do you get what I get?

(commcare-cloud) francine:commcare-cloud droberts$ pip freeze | grep attrs
attrs==18.2.0

@mkangia
Copy link
Contributor Author

mkangia commented Nov 2, 2018

So i updated to latest master and did
pip install -r requirements.txt

i got these warnings

commcare-cloud 0.0.0 has requirement ansible==2.4.3, but you'll have ansible 2.5.0 which is incompatible.
commcare-cloud 0.0.0 has requirement attrs==17.4.0, but you'll have attrs 18.2.0 which is incompatible.
commcare-cloud 0.0.0 has requirement cryptography==2.1.4, but you'll have cryptography 2.3.1 which is incompatible.

i now have

(ansible) Fri Nov 02-13:47:56:commcare-cloud$ pip list | grep attrs
attrs                              18.2.0

running the command now gives me

pkg_resources.DistributionNotFound: The 'cryptography==2.1.4' distribution was not found and is required by commcare-cloud

earlier i installed the versions from the warning messages above and got the error i raised in the issue originally.

@dannyroberts
Copy link
Member

Hmm okay. Try pip install -e . from the commcare-cloud repo directory? Those messages look like your commcare-cloud install is pinned to some previous version that has different requirements

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

No branches or pull requests

3 participants