CommunityDragon / CDTB

A library containing everything to extract files from client files.
GNU Lesser General Public License v3.0
119 stars 33 forks source link

"Parser Error" when trying to download data #2

Closed trebonius0 closed 6 years ago

trebonius0 commented 6 years ago

Hey guys

I've been trying to use your tool to download data. I'm running on Ubuntu 16.04 64bits and have installed all the required dependencies, and all my packages are up to date. I'm using python 3.5.2

When launching python3 -m cdragontoolbox download patch= or python3 -m cdragontoolbox -h I get the following error

Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 174, in _run_module_as_main mod_name, mod_spec, code = _get_module_details(mod_name, _Error) File "/usr/lib/python3.5/runpy.py", line 133, in _get_module_details return _get_module_details(pkg_main_name, error) File "/usr/lib/python3.5/runpy.py", line 144, in _get_module_details code = loader.get_code(mod_name) File "", line 767, in get_code File "", line 727, in source_to_code File "", line 222, in _call_with_frames_removed File "/home/jn/Git/CDTB/cdragontoolbox/main.py", line 31 parser.error(f"invalid component: {component}") ^ SyntaxError: invalid syntax

Can you fix this ?

Thanks !

jjmaldonis commented 6 years ago

Hey this script requires python 3.6 for the f-string format we're using here. My guess is that Ubuntu comes with 3.4 or 3.5 installed instead.

Maybe we can downgrade this script to only require 3.5 but I'm not sure if there are other dependencies or not.

ghost commented 6 years ago

python3 defaults to 3.5 on xenial and zesty, and 3.6 on artful and bionic. you're on xenial.

I usually use pyenv to run 3.7/6 on LTS ubuntu 16. I wouldn't want to downgrade from latest stable features, but that's my 2c.

stelar7 commented 6 years ago

Not really an issue as the OP has the wrong python version. Should prolly add a version check?