Open daviddavo opened 6 years ago
f-strings were added in Python 3.6, so you need at least that version. Python 3.6 was released in 2016.
It was that, thanks! (is there any way to require that the program runs with 3.6 or better?)
I just updated to 3.7 and another SyntaxError
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/mnt/Raid Delta/MastodonToTwitter/mtt/__main__.py", line 9, in <module>
from mtt.mastodon_to_twitter import TwitterPublisher
File "/mnt/Raid Delta/MastodonToTwitter/mtt/mastodon_to_twitter.py", line 232
self.mastodon_api.stream_user(TootsListener(self), async=False)
^
SyntaxError: invalid syntax
@daviddavo
quick fix: s/async=False/run_async=False/g
see my pull request https://github.com/AmauryCarrade/MastodonToTwitter/pull/59
due to twitter closing stream api, this project will not functional soon
[davo@GitLabTest MastodonToTwitter]$ python3 -m mtt Traceback (most recent call last): File "/usr/lib64/python3.4/runpy.py", line 151, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name) File "/usr/lib64/python3.4/runpy.py", line 118, in _get_module_details return _get_module_details(pkg_main_name) File "/usr/lib64/python3.4/runpy.py", line 104, in _get_module_details spec = importlib.util.find_spec(mod_name) File "/usr/lib64/python3.4/importlib/util.py", line 86, in find_spec parent = __import__(parent_name, fromlist=['__path__']) File "/home/davo/MastodonToTwitter/mtt/__init__.py", line 22 raise AttributeError(f'Unknown configuration option \'{item}\'') ^ SyntaxError: invalid syntax