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

Error when unicode in file path #9

Open
nausikaa-dot opened this issue Feb 19, 2020 · 1 comment
Open

Error when unicode in file path #9

nausikaa-dot opened this issue Feb 19, 2020 · 1 comment

Comments

@nausikaa-dot
Copy link

Probably a duplicate of #3.

I've confirmed this only happens when the ä character is in the filename:

Traceback (most recent call last):
  File "/path/to/.local/bin/dottorrent", line 8, in <module>
    sys.exit(main())
  File "/path/to/.local/lib/python3.5/site-packages/dtcli/cli.py", line 137, in main
    t.generate(callback=progress_callback)
  File "/path/to/.local/lib/python3.5/site-packages/dottorrent/__init__.py", line 301, in generate
    for y in x[0].split(os.sep)[len(path_sp):]]
  File "/path/to/.local/lib/python3.5/site-packages/dottorrent/__init__.py", line 301, in <listcomp>
    for y in x[0].split(os.sep)[len(path_sp):]]
UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' in position 11: surrogates not allowed
@nausikaa-dot
Copy link
Author

In my case, this occurred when there were Unicode surrogate pairs in the filename on Linux. See this stackoverflow answer.

nausikaa-dot added a commit to nausikaa-dot/dottorrent that referenced this issue Feb 21, 2020
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