Reel2Bits install fail 2

Mon serveur YunoHost

Matériel: VirtualBox sur un Macbook
Version de YunoHost: 3.8.2+202004292117
J’ai accès à mon serveur : En SSH | Par la webadmin
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : non
Si oui, expliquer:

Description du problème

Erreur avec la lib pythonz?

KeyError: 'HOME'
raise KeyError(key)
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
PATH_HOME = os.environ.get('PYTHONZ_HOME') or os.path.join(os.environ['HOME'], '.pythonz')
File "/var/www/reel2bits/.pythonz/pythonz/define.py", line 33, in
from pythonz.define import PATH_HOME_ETC, PATH_PYTHONS
File "/var/www/reel2bits/.pythonz/pythonz/__init__.py", line 8, in
from pythonz.installer import install_pythonz
File "/var/www/reel2bits/.pythonz/pythonz_install.py", line 32, in
Traceback (most recent call last):

https://paste.yunohost.org/raw/uluqihazuk

Hmf that code should have picked up the PYTHONZ_HOME defined right before

@yalh76 : do you know why it wouldnt have found that exported variable ? :confused:

My initial intuition was that maybe that has to do with running from the API rather than CLI but it shouldnt really matter…

Perhaps a missing z on line 222

# ./pythonz-install
ynh_setup_source "$final_path/.pythonz" pythonz
export PYTHONZ_ROOT="$final_path/.pythonz"
# Then install it
python**z** $final_path/.pythonz/pythonz_install.py

pythonz $final_path/.pythonz/pythonz_install.py

Well, that^ didn’t work!

I guess I don’t really get how those paths are deduced from PYTHONZ_ROOT, PATH_HOME_ETC, PATH_PYTHONS, PYTHONZ_HOME in

pythonz.define import PATH_HOME_ETC, PATH_PYTHONS
File “/var/www/reel2bits/.pythonz/pythonz/define.py”, line 33, in
PATH_HOME = os.environ.get(‘PYTHONZ_HOME’) or os.path.join(os.environ[‘HOME’], ‘.pythonz’)

No I don’t know. I copy paste those code line from yunorunner_ynh_core

BTW upstream app is no more maintained since few months…https://github.com/reel2bits/reel2bits/issues/353

Yeah, I was hoping to contribute a bit!

I looked at the changes to pythonz since the 2.0.1 is a few years old


And may 9th 2019 has a commit titled Save initial $PATH before pythonz manipulate it..

Seems like it could be related…

Well I was thinking maybe that could be due to being on Yunohost 3.8 so I tried to reproduce on my side but nope …

That commit you mention could indeed look related but still, the original issue is pretty clear :
export PYTHONZ_ROOT=/var/www/reel2bits/.pythonz means that the var should be available in child processes … yet it complains that it’s undefined … that makes no sense …

Anyway, maybe, can you try to install this from the CLI instead of the webadmin ?

Using CLI, It looks like the install went further this time!
https://paste.yunohost.org/raw/bisiwameke

Well, reading the logs, it seems that we are on an already known issue:

ynh_systemd_action --service_name=${app}-web --action=“start” --log_path=systemd --line_match=“Started ${app}-web”

didn’t catch the line when the service was started…

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.