I have Python installed and running properly. I have a file called
test.py with contents
c = 5
When I go to the file's directory and type
import test followed by
test.c at the Python prompt in Bash, it returns
5, as expected. When in Wolfram|One I execute
ExternalEvaluate["Python", "1+2"], it returns
3. So far, so good. But when I set the directory to the file's directory and execute
s = StartExternalSession["Python"]; ExternalEvaluate[s, "import test"]; ExternalEvaluate[s, "test.c"]
it yields a
Failure with tag "EvaluationFailure" and message "Exception Thrown: AttributeError". Inspection of the
InputForm of the
Failure reveals the line "AttributeError: module 'test' has no attribute 'c'".
What am I doing wrong?