Julia script works, but MethodError when using Python PyJulia

First post and new to Julia - let me know if there is not enough information.

I have a Julia script that runs fine when I call it from the Julia REPL include(“Run_test.jl”). It takes some inputs from csv and other files, does some analysis, and saves results in new csv files. It doesn’t return anything (as far as I can tell), only prints messages in the terminal.

I’d like to call Run_test.jl from Python. Reason is that I have an interactive program in Python. User inputs that are collected in Python would be saved to a csv file which is then read by Run_test.jl

I get an error message for the line marked below in Run_test.jl when I call it from run.py. I don’t understand why there is an error message because I am not returning anything from Julia to Python

julenv.jl activates an environment and adds packages - no issues here.

run.py

from julia import Main       

Main.include("julenv.jl") 
Main.include("Run_test.jl")

Run_test.jl

# .. other code ...

inpath = "folder_path"
mysetup = Dict()
# add key:value pairs to mysetup
myinputs=Dict()
myinputs = load_inputs(mysetup,inpath) #error message points here

# .. more code ...

Error message:

ImportError: <PyCall.jlwrap (in a Julia function called from Python)
JULIA: LoadError: LoadError: MethodError: Cannot `convert` an object of type Bool to an object of type String

Welcome!

As you suspected, this probably isn’t enough information to help you. At the very least can you show the full error message (including stack trace)? Even with that, it may be hard to figure out what’s going on without seeing the code that’s failing. Can you share whatever the actual function throwing the error is?