Git-Auto-Deploy icon indicating copy to clipboard operation
Git-Auto-Deploy copied to clipboard

Git-Auto-Deploy doesn't work with python3 (at least on Ubuntu 19.10)

Open gbonazzoli opened this issue 4 years ago • 3 comments

On a vanilla python3 installation on Ubuntu 19.10 Git-Auto-Deploy doesn't work.

This is the error I got:

root@eoan:/opt/Git-Auto-Deploy# python3 -m gitautodeploy --config config.json
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 "/opt/Git-Auto-Deploy/gitautodeploy/__main__.py", line 14, in <module>
    main()
  File "/opt/Git-Auto-Deploy/gitautodeploy/gitautodeploy.py", line 676, in main
    init_config(config)
  File "/opt/Git-Auto-Deploy/gitautodeploy/cli/config.py", line 355, in init_config
    from ..models import Project
ValueError: attempted relative import beyond top-level package

It seems that there is a library that is too much recent for Git-Auto-Deploy. Unfortunally I'm very new to the python world and I'm not able to be proficent in troubleshooting. But if someone can guide me I can replicate some commands.

If the same command is issued after installing python2 (with apt install python2) it works.

root@eoan:/opt/Git-Auto-Deploy# python2 -m gitautodeploy --config config.json --allow-root-user
2020-02-29 06:38:06,248 [INFO ]  Cloning repository /root/repositories/Git-Auto-Deploy
2020-02-29 06:38:08,012 [ERROR]  Cloning into '/root/repositories/Git-Auto-Deploy'...

The environment is currently:

root@eoan:/opt/Git-Auto-Deploy# python3 --version
Python 3.7.5

root@eoan:/opt/Git-Auto-Deploy# python2 --version
Python 2.7.17

Ant chance to have it working with only python3 ?

gbonazzoli avatar Feb 29 '20 05:02 gbonazzoli

Git auto-deploy only supports python2. It doesn't really matter to you as an end-user.

Guy293 avatar Mar 02 '20 10:03 Guy293

Yeah, unfortunately, it matters now that Python2 has been EOL'd, and distros start removing support.

directrix1 avatar Mar 03 '21 00:03 directrix1

I opened #264 so that it works with Python3

Letme avatar Nov 16 '22 09:11 Letme