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

bug: missing and broken pytwitter dependency #57

Open
popey opened this issue May 20, 2024 · 0 comments
Open

bug: missing and broken pytwitter dependency #57

popey opened this issue May 20, 2024 · 0 comments

Comments

@popey
Copy link

popey commented May 20, 2024

On an Ubuntu 20.04 LXC container, I followed the installation instructions, but it came unstick here:

ubuntu@savannah:~/Savannah$ ./env/bin/python manage.py migrate
Loaded plugin: corm.plugins.discord.DiscordPlugin
Loaded plugin: corm.plugins.discourse.DiscoursePlugin
Loaded plugin: corm.plugins.github.GithubPlugin
Loaded plugin: corm.plugins.gitlab.GitlabPlugin
Loaded plugin: corm.plugins.facebook.FacebookPlugin
Loaded plugin: corm.plugins.ical.iCalPlugin
Loaded plugin: corm.plugins.meetup.MeetupPlugin
Loaded plugin: corm.plugins.reddit.RedditPlugin
Loaded plugin: corm.plugins.rss.RssPlugin
Loaded plugin: corm.plugins.slack.SlackPlugin
Loaded plugin: corm.plugins.stackexchange.StackExchangePlugin
Loaded plugin: corm.plugins.salesforce.SalesforcePlugin
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/ubuntu/Savannah/corm/apps.py", line 9, in ready
    install_plugins()
  File "/home/ubuntu/Savannah/corm/plugins/__init__.py", line 23, in install_plugins
    module = import_module(plugin_module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/ubuntu/Savannah/corm/plugins/twitter.py", line 6, in <module>
    from pytwitter import Api as TwitterClient
ModuleNotFoundError: No module named 'pytwitter'

Installing pytwitter (which seems abandoned and very old) from pypi, doesn't help.

ubuntu@savannah:~/Savannah$ ./env/bin/pip install pytwitter
Collecting pytwitter
  Downloading pytwitter-0.5.tar.gz (2.8 kB)
Building wheels for collected packages: pytwitter
  Building wheel for pytwitter (setup.py) ... done
  Created wheel for pytwitter: filename=pytwitter-0.5-py3-none-any.whl size=3497 sha256=6e5c7fc9d706611c81a7302d604bc543f4159b13c50b1ff277305a040f193847
  Stored in directory: /home/ubuntu/.cache/pip/wheels/b4/56/6d/674f5c5c189f1c1bbdd785448130c99f0ec6004c9026de2835
Successfully built pytwitter
Installing collected packages: pytwitter
Successfully installed pytwitter-0.5
ubuntu@savannah:~/Savannah$ ./env/bin/python manage.py migrate
Loaded plugin: corm.plugins.discord.DiscordPlugin
Loaded plugin: corm.plugins.discourse.DiscoursePlugin
Loaded plugin: corm.plugins.github.GithubPlugin
Loaded plugin: corm.plugins.gitlab.GitlabPlugin
Loaded plugin: corm.plugins.facebook.FacebookPlugin
Loaded plugin: corm.plugins.ical.iCalPlugin
Loaded plugin: corm.plugins.meetup.MeetupPlugin
Loaded plugin: corm.plugins.reddit.RedditPlugin
Loaded plugin: corm.plugins.rss.RssPlugin
Loaded plugin: corm.plugins.slack.SlackPlugin
Loaded plugin: corm.plugins.stackexchange.StackExchangePlugin
Loaded plugin: corm.plugins.salesforce.SalesforcePlugin
Traceback (most recent call last):
  File "manage.py", line 21, in <module>
    main()
  File "manage.py", line 17, in main
    execute_from_command_line(sys.argv)
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute
    django.setup()
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate
    app_config.ready()
  File "/home/ubuntu/Savannah/corm/apps.py", line 9, in ready
    install_plugins()
  File "/home/ubuntu/Savannah/corm/plugins/__init__.py", line 23, in install_plugins
    module = import_module(plugin_module)
  File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 848, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/ubuntu/Savannah/corm/plugins/twitter.py", line 6, in <module>
    from pytwitter import Api as TwitterClient
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/pytwitter/__init__.py", line 5, in <module>
    from pytwitter import *
  File "/home/ubuntu/Savannah/env/lib/python3.8/site-packages/pytwitter/pytwitter.py", line 113
    except urllib2.URLError, error:
                           ^
SyntaxError: invalid syntax
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

1 participant