I’m not able to import installed Python Packages in Load Python Script activity. It throws error, without the package it runs. And I tried with sys.path.append(os.path.dirname(os.path.abspath(“file”)))
statement and still it throws error. Please look into my code below,
<import sys
import os
sys.path.append(os.path.dirname(os.path.abspath("__file__")))
import pdf2image
import re
import io
def Hello():
return 'Hello'
>
Here I need to pdf2image package and it is already installed. Along with that i need to use some more packages. Please help me to fix it
This will work…But when you import external package for python it wont work.
You add ‘import pytesseract’ in your code and some relevant operation like extraction data from image or something… Then if it is working please let me know
It still throws error that it cannot load python script. And I used your code to run.
Tell me one thing, does Uipath supports python-64 bit?
Because I’m using 64 bit version of Python(3.6)
i tried to greyscale an image with PIL.
it works fine with python alone but when i try with uipath it says : “ModuleNotFoundError : No module named ‘PIL’”.
UiPath works on base Python which may not have all the dependencies of the packages we import in Python script. For e.g., xlrd package may be absent and your script need it as a dependency. Install xlrd or any other package(which your script needs) in the Python version which you linked to UiPath. It should work fine.
DId you manage to solve this? I am facing same issue,
from tkinter import filedialog
#below filedialog operation will throw error. It is ok when I run it on Spyder
targetPath = filedialog.askopenfilename(title='select file to upload')