-1

On Windows 10, when trying to execute the following command

"C:/Program Files/SageMath 9.1/runtime/bin/bash" -l "C:/Program Files/SageMath 9.1/runtime/opt/sagemath-9.1/sage" -c "os.chdir('C:\Users\Diaa\Desktop\Test'); load('testsagetex.sagetex.sage')"

I get the following error

SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape

and the answers to this question can't help me to fix it.

So, what is wrong or missing here knowing that the full the output can be found here.

Diaa
  • 135
  • 1
  • 10
  • "and the answers to this question can't help me to fix it." Yes, they can. They explain the exact problem - it's in the inline Python code `os.chdir('C:\Users\Diaa\Desktop\Test');` that you run with the `-c` option. – Karl Knechtel Jul 07 '21 at 00:50

1 Answers1

1

This is answered on the question you linked to. Try os.chdir(r'C:\Users\Diaa\Desktop\Test')

Iguananaut
  • 21,810
  • 5
  • 50
  • 63