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

Tweepy compatibility issues with python 3.7 #23

Open
CrazianT3k opened this issue Aug 18, 2018 · 1 comment
Open

Tweepy compatibility issues with python 3.7 #23

CrazianT3k opened this issue Aug 18, 2018 · 1 comment
Assignees
Labels

Comments

@CrazianT3k
Copy link

Aloha,

ODIN produced the following error after homebrew updated python to 3.7:

(ODIN-4yBUt_eV) ~/D/t/ODIN ❯❯❯ python3 odin.py master
Traceback (most recent call last):
File "odin.py", line 27, in
from lib import reporter, asciis, verification, htmlreporter, grapher
File "/tools/ODIN/lib/reporter.py", line 14, in
from lib import domain_tools, email_tools, pyfoca, helpers, screenshots
File "/tools/ODIN/lib/email_tools.py", line 9, in
import tweepy
File "/Users/XXXXXXXX/.virtualenvs/ODIN-4yBUt_eV/lib/python3.7/site-packages/tweepy/init.py", line 17, in
from tweepy.streaming import Stream, StreamListener
File "/Users/XXXXXXXX/.virtualenvs/ODIN-4yBUt_eV/lib/python3.7/site-packages/tweepy/streaming.py", line 358
def _start(self, async):
^
SyntaxError: invalid syntax

After some googling, I found the following issue posted on the tweepy github:
https://github.com/tweepy/tweepy/issues/1017

I attempted to reinstall tweepy via pip3 but it doesn't look like pip has updated tweepy for some time.

In order to fix the issue, I just replaced the tweepy/streaming.py file with this one:
https://github.com/tweepy/tweepy/blob/master/tweepy/streaming.py

That seemed to resolve the issue so far.

Cheers,
Crazian

@chrismaddalena chrismaddalena self-assigned this Aug 25, 2018
@chrismaddalena
Copy link
Owner

Thanks for reporting this! This has been fixed, but Tweepy has yet to issue a new release with the changes for Python 3.7. The current version, v3.6.0, is from 2 March 2018. Several issues referencing this problem have been closed as "fixed," but it remains unresolved when installing Tweepy via pip/pip3.

There's not much I can do except yank Tweepy out of the project. There is a workaround for this:

pip3 uninstall tweepy
pip3 install git+https://github.com/tweepy/tweepy

Note that, if using pipenv as recommended, you'll need to install that version of Tweepy from inside the pipenv shell environment.

The Pipfile does enforce Python 3.6, just because that's what was available when I made it. Hopefully that will mean most people will not encounter this.

Leaving this open to remember to monitor the situation with Tweepy. If a release is not forthcoming and this becomes more of a problem, I will need to consider switching to something else because I don't intend to force anyone to use anything but the latest version of Python for ODIN.

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

No branches or pull requests

2 participants