Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-pasting jobscript.sh for the matlab example may lead to encoding error #436

Open
BYT3M3 opened this issue Apr 1, 2022 · 0 comments

Comments

@BYT3M3
Copy link

BYT3M3 commented Apr 1, 2022

Dear documentation maintainer

I was pulling out my hair yesterday trying to get my matlab code running on the HPC. I based myself on the jobscript.sh from section 23.6 of intro-HPC-linux-gent.pdf. This script worked fine when trying to execute matlab code on the login node, but once I tried submitting it using qsub, I got the following error message:
Traceback (most recent call last):
File "/usr/libexec/jobcli/qsub", line 29, in
qsub()
File "/usr/lib/python2.7/site-packages/jobcli/commands/torque.py", line 69, in qsub
torque_command(submit_job, args)
File "/usr/lib/python2.7/site-packages/jobcli/commands/torque.py", line 39, in torque_command
function(args, frontend=TORQUE)
File "/usr/lib/python2.7/site-packages/jobcli/commands/generic.py", line 216, in submit_job
action="Job submission")
File "/usr/lib/python2.7/site-packages/jobcli/utils.py", line 324, in run_command
encoded_input = command_input.encode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1510: ordinal not in range(128)

After a little back-and-forth, I finally noticed that the problem was caused by line 24 of the jobscipt:
# run compiled example MATLAB program ’example’, provide ’5’ as input argument to the program

The encoding error was caused by the quotation marks around example and 5, if you copy them from the PDF, these come out as "Right single quotation marks" and not as apostrophes. Maybe it's a good idea to add this small issue to the troubleshooting section of the intro pdf?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant