/usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or directory

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

carmine
Posts: 4
Joined: Tue Nov 29, 2022 5:57 pm

/usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or directory

Post by carmine »

I updated OpenEMM from OMT.sh and now when I start OMT.sh I get this error message :/usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/.. /scripts/OMT.py': [Errno 2] No such file or directory. What could be the problem? I understand that it cannot find the file OMT.py. This file is currently located in /home/openemm/tomcat/bin. Does it have to be somewhere else? Maybe in /home/openemm/scripts ? Is there a way to do a rollback without accessing the OMT menu?
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by maschoff »

The path of the error message looks strange, is that the complete output?

We will look into it.
OpenEMM Maintainer
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by maschoff »

Manual fix: Please change last line in shell script OMT.sh

Code: Select all

${PYTHON} "${scriptDir}/../scripts/OMT.py" $@
to

Code: Select all

if test -e "${scriptDir}/../scripts/OMT.py"; then {
	${PYTHON} "${scriptDir}/../scripts/OMT.py" $@
} else {
	${PYTHON} "${scriptDir}/OMT.py" $@
} fi
Or wait for a new runtime version, which we will provide soon.
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by JuergenB »

Hi,

i can install openemm-runtime-21.10.044.tar.gz and this works fine.
I can install openemm-runtime-22.04.008.tar.gz and this works fine.

Both on AlmaLinux 9.1

But a clean install of openemm-runtime-22.10.013.tar.gz gives this error message

Code: Select all

:/usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/.. /scripts/OMT.py': [Errno 2] No such file or directory.
But you can´t upgrade from 008 to 013, i get this error message

Code: Select all

=============================================
= OpenEMM Maintenance Tool (OMT) v22.10.014 =
=============================================
Root mode: On
Hostname: localhost.localdomain
TypeError: 'NoneType' object is not iterable
./OMT.sh: Zeile 138: Syntaxfehler beim unerwarteten Symbol »then«
./OMT.sh: Zeile 138: ` = "yes" ]; then {'
[root@localhost native]# ls /home/
AND

you recommended change ends in this error message....

Code: Select all

Checking python installation ...
Python version found: 3.9.14 (/usr/bin/python3)
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
KeyError: 'openemm'
So i wait for a installer that has passed verification ...
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by maschoff »

How does the last code line of your OMT.sh look like?
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by JuergenB »

Before modification
nano /home/openemm/bin/OMT.sh

Code: Select all

echo "Starting python ..."
${PYTHON} "${scriptDir}/../scripts/OMT.py" $@
After modification
nano /home/openemm/bin/OMT.sh

Code: Select all

echo "Starting python ..."
if test -e "${scriptDir}/../scripts/OMT.py"; then {
        ${PYTHON} "${scriptDir}/../scripts/OMT.py" $@
} else {
        ${PYTHON} "${scriptDir}/OMT.py" $@
} fi
aso
Posts: 33
Joined: Fri Jun 19, 2015 12:43 pm

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by aso »

Could you please start OMT in debug modus and tell me what is the response?
Use command:
OMT.sh -debug
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by JuergenB »

New installation from scratch with AlmaLinux 9.1
I used openemm-runtime-22.10.014.tar.gz

[root@localhost bin]# ./OMT.sh -debug
Checking python installation ...
Python version found: 3.9.14 (/usr/bin/python3)
Checking Zip installation ...
Zip version 3.0 found
Starting python ...
Traceback (most recent call last):
File "/home/openemm/tomcat10/bin/OMT.py", line 158, in <module>
main()
File "/home/openemm/tomcat10/bin/OMT.py", line 81, in main
Environment.init()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 154, in init
Environment.readSystemValues()
File "/home/openemm/tomcat10/bin/EMT_lib/Environment.py", line 315, in readSystemValues
DbConnector.dbcfgEntry = DbConnector.dbcfgProperties[DbConnector.applicationDbcfgEntryName]
KeyError: 'openemm'
maschoff
Site Admin
Posts: 2596
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany
Contact:

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by maschoff »

Please post the content of your dbcfg file (without password).
OpenEMM Maintainer
JuergenB
Posts: 140
Joined: Thu Dec 05, 2019 9:03 pm

Re: /usr/bin/python3: can't open file '/home/openemm/tomcat10/bin/../scripts/OMT.py': [Errno 2] No such file or director

Post by JuergenB »

This is the dbcfg in a clean installation

Code: Select all

emm: dbms=, host=localhost, user=, password=, name=openemm
Post Reply