Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6159

Python project deployment on Ubuntu 18 server

$
0
0

Ive created my simple script (tg bot), but after uploading on my Ubuntu server (python in alternative mode ==3.9.13, pip freeze and installed requirements). There is some path (I suppose) problem:

root@tele:/# python3 /root/mybot/workDir/coreFiles/coreBot.pyTraceback (most recent call last):  File "/root/mybot/workDir/coreFiles/coreBot.py", line 6, in <module>    from workDir.sets import configModuleNotFoundError: No module named 'workDir'

In my core file there is some imports:

from workDir.sets import configfrom workDir.methods.states.comdsHandler import getHandler

Here is my project tree:

workDir/├─coreFiles/│└─coreBot.py├─methods/│├─states/││├─actionStates.py││└─comdsHandler.py│└─utils/│├─connectionDB.py│├─loggingUtil.py│├─registerUserInDB.py│└─strParser.py└─sets/├─categories.py└─config.py

Kindly help find better solution than make it in one py file :)


Viewing all articles
Browse latest Browse all 6159

Trending Articles