uWSGI Gateway: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 #431
Unanswered
gianlucagiacometti
asked this question in
Q&A
Replies: 1 comment 3 replies
-
Hello @gianlucagiacometti, I think this can be due to the default locale in your container. You may have to install additional locales in your container (see https://stackoverflow.com/a/59292909 for instance) and change default locale to something like |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everybody.
Can someone help me with the following issue?
I installed slurm-web 4.0.0.1 on Ubuntu 24.04 (on a LXC container).
The gateway works and I can open the page at port 5011 and see my cluster working (for the sake of precision, I set the IP address, not localhost and, at the moment, I have no ldap authentication).
Then I followed the documentation and I set up apache with proxy_uwsgi (just copied and pasted the basic conf on port 80), and I'm experiencing the following error:
Jan 03 11:50:56 hpc-controller uwsgi[41967]: Traceback (most recent call last):
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/share/slurm-web/wsgi/agent/slurm-web-agent.py", line 12, in
Jan 03 11:50:56 hpc-controller uwsgi[41967]: application = SlurmwebAppAgent(
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/slurmweb/apps/agent.py", line 47, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: SlurmwebWebApp.init(self, seed)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/slurmweb/apps/init.py", line 90, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: SlurmwebGenericApp.init(self, seed)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/slurmweb/apps/init.py", line 61, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: self.settings = RuntimeSettings.yaml_definition(seed.conf_defs)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/rfl/settings/init.py", line 223, in yaml_definition
Jan 03 11:50:56 hpc-controller uwsgi[41967]: return cls(SettingsDefinition(SettingsDefinitionLoaderYaml(path=path)))
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/rfl/settings/definition.py", line 29, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: self.content = yaml.safe_load(fh)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/init.py", line 125, in safe_load
Jan 03 11:50:56 hpc-controller uwsgi[41967]: return load(stream, SafeLoader)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/init.py", line 79, in load
Jan 03 11:50:56 hpc-controller uwsgi[41967]: loader = Loader(stream)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/loader.py", line 34, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: Reader.init(self, stream)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 85, in init
Jan 03 11:50:56 hpc-controller uwsgi[41967]: self.determine_encoding()
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 124, in determine_encoding
Jan 03 11:50:56 hpc-controller uwsgi[41967]: self.update_raw()
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3/dist-packages/yaml/reader.py", line 178, in update_raw
Jan 03 11:50:56 hpc-controller uwsgi[41967]: data = self.stream.read(size)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: File "/usr/lib/python3.12/encodings/ascii.py", line 26, in decode
Jan 03 11:50:56 hpc-controller uwsgi[41967]: return codecs.ascii_decode(input, self.errors)[0]
Jan 03 11:50:56 hpc-controller uwsgi[41967]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jan 03 11:50:56 hpc-controller uwsgi[41967]: UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5774: ordinal not in range(128)
Jan 03 11:50:56 hpc-controller uwsgi[41967]: unable to load app 0 (mountpoint='') (callable not found or import error)
Any suggestions on "UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5774: ordinal not in range(128)"?
Thank you in advance.
Beta Was this translation helpful? Give feedback.
All reactions