satisfactorymodding / satisfactorymodding/FICSIT-Fred
Check file type before decoding
Open
- Dominant language
- Python
- Stars
- 7
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Fred v2.25.0
UnicodeDecodeError exception handled in on_message in Satisfactory Modding: #Unable to open SMM; mods not loading (<#1343187664756674601>)
'utf-8' codec can't decode byte 0xf4 in position 27: invalid continuation byte
File "/app/venv/lib/python3.12/site-packages/nextcord/client.py", line 527, in _run_event
await coro(*args, **kwargs)
File "/app/fred/fred.py", line 298, in on_message
_reacted = await self.Crashes.process_message(message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/fred/cogs/crashes.py", line 365, in process_message
raise ex
File "/app/fred/cogs/crashes.py", line 354, in process_message
jobs.extend((task_group.create_task(job) for job in self._get_file_jobs(name, file)))
File "/app/fred/cogs/crashes.py", line 354, in <genexpr>
jobs.extend((task_group.create_task(job) for job in self._get_file_jobs(name, file)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/fred/cogs/crashes.py", line 265, in _get_file_jobs
yield self.process_text(str(file.read().decode()), filename=filename)
^^^^^^^^^^^^^^^^^^^^
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.