I add sys.path.append(‘absolute-path-to-project’), now the interpreter/UiPath can find my class files.
However the code should be able to find the files just fine without, so I would like someone to explain what is going wrong.
Using UiPath Enterprise Edition 2018.2.6
Python Pack version 1.1.6863.33404
I want to run a python script with custom classes from UiPath. The script works on its own.
But UiPath throws an error when I try to import classes that I write myself.
/project_root | Main.xaml | ├─ /run_python __init__.py main.py config.py tools.py
import logging.handlers import sys from config import dev_config as c from tools import valid_xlsx #...
UiPath crashes on line 3 and 4 when running the script. For some reason UiPath can’t handle local classes.