AmauryCarrade / MastodonToTwitter

Mastodon <-> Twitter cross-poster.
MIT License
250 stars 41 forks source link

Syntax Issue with Twitter API Library #71

Open cilleyperson opened 1 year ago

cilleyperson commented 1 year ago

Not sure if anyone else is seeing this error. Running this within an Ubuntu Linux LXC container on Proxmox. Error details are below:

python -m mtt Traceback (most recent call last): File "/usr/lib/python3.10/runpy.py", line 187, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.10/runpy.py", line 146, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.10/runpy.py", line 110, in _get_module_details __import__(pkg_name) File "/home/cilleyperson/MastodonToTwitter/mtt/__init__.py", line 6, in <module> import mtt.config as base_config # noqa File "/home/cilleyperson/MastodonToTwitter/mtt/config.py", line 12, in <module> import twitter File "/home/cilleyperson/.local/lib/python3.10/site-packages/twitter/__init__.py", line 56, in <module> from .api import Api # noqa File "/home/cilleyperson/.local/lib/python3.10/site-packages/twitter/api.py", line 5093 raise TwitterError({'message': 'Unknown error': '{0}'.format(json_data)}) ^ SyntaxError: invalid syntax

cilleyperson commented 1 year ago

I also Tried running this app in a full VM running Debian and I received the same error. So I don't think it is related to anything about LXC containers.

yanqian commented 1 year ago

@cilleyperson because it's bad syntax in this line:

 raise TwitterError({'message': 'Unknown error': '{0}'.format(json_data)})

from https://github.com/bear/python-twitter/blob/master/twitter/api.py#L5093

image

Maybe you would like to fix it in their repo or change another wrapper repo.