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

UnicodeDecodeError: 'utf-8' #7

Open
gerroon opened this issue Nov 29, 2024 · 5 comments
Open

UnicodeDecodeError: 'utf-8' #7

gerroon opened this issue Nov 29, 2024 · 5 comments

Comments

@gerroon
Copy link

gerroon commented Nov 29, 2024

Hi

Getting an error with a file

Exactly which folders & files should I include in .gitignore_ _ r_godot.md
Traceback (most recent call last):
  File "/opt/tid2md/tid2md.py", line 413, in <module>
    main(args.files, args.update, args.delete, args.output_directory,
  File "/opt/tid2md/tid2md.py", line 375, in main
    if migrate_tid_file(tid_path, update, output_directory, tables,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/tid2md/tid2md.py", line 316, in migrate_tid_file
    lines = f.readlines()
            ^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

@MaxGyver83
Copy link
Owner

Thanks for reporting! Could you attach this file to allow me to reproduce it? If the file content is private, you could delete everything except the first line (or word).

@gerroon
Copy link
Author

gerroon commented Dec 1, 2024

Thanks for the reply. Here is the file.

Exactly which folders & files should I include in .gitignore_ _ r_godot.tid.zip

@MaxGyver83
Copy link
Owner

Thank you!

I couldn't reproduce this error:

$ tid2md.py "Exactly which folders & files should I include in .gitignore_ _ r_godot.tid"
Exactly which folders & files should I include in .gitignore_ _ r_godot.md

1 tiddlers migrated to Markdown.
  • Which command/arguments did you use?
  • Are you using the latest version of tid2md?
  • Which Python version do you use?
  • Which operating system do you use?

@MaxGyver83
Copy link
Owner

MaxGyver83 commented Dec 2, 2024

Hi

Getting an error with a file

Exactly which folders & files should I include in .gitignore_ _ r_godot.md
Traceback (most recent call last):
  File "/opt/tid2md/tid2md.py", line 413, in <module>
    main(args.files, args.update, args.delete, args.output_directory,
  File "/opt/tid2md/tid2md.py", line 375, in main
    if migrate_tid_file(tid_path, update, output_directory, tables,
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/tid2md/tid2md.py", line 316, in migrate_tid_file
    lines = f.readlines()
            ^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte

I think "Exactly which folders & files should I include in .gitignore_ _ r_godot.md" was created successfully and the next file caused this error. It's unfortunate that the name of the file leading to this error isn't printed. I'll change this.

Maybe you can find the file causing this error by just printing all .tid files with ls *.tid and then checking which is the one after "Exactly which folders & files should I include in .gitignore_ _ r_godot.tid".

@MaxGyver83
Copy link
Owner

If you use the latest commit on the main branch, you should get the name of the file starting with 0xff printed.

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

2 participants