[GH-ISSUE #28] unicode encode error when trying to input username #23

Closed
opened 2026-02-27 04:57:09 +03:00 by kerem · 1 comment
Owner

Originally created by @Axon522 on GitHub (Jun 29, 2025).
Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/28

Hey, like a lot of other people I'm super new to this stuff and I ran into an error that I can't resolve. When I input zotify --username and then my account username, it returns this error that it can't encode the characters and it came back as undefined.

PS C:\Users\UB> zotify --username 31ajmzklcvagnhisfka3336wrwqi
zotify : Exception in thread Thread-1 (_animate):
At line:1 char:1
+ zotify --username 31ajmzklcvagnhisfka3336wrwqi
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Exception in thread Thread-1 (_animate 
   )::String) [], RemoteException
    + FullyQualifiedErrorId : NativeCommandError
 
Traceback (most recent call last):
  File "C:\Users\UB\scoop\apps\python\current\Lib\threading.py", line 1043, in 
_bootstrap_inner
    self.run()
    ~~~~~~~~^^
  File "C:\Users\UB\scoop\apps\python\current\Lib\threading.py", line 994, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 
209, in _animate
    Printer.loader(self.channel, f"\t{c} {self.desc}")
    ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 
60, in loader
    Printer.print(channel, START_OF_PREV_LINE*2 + msg, loader=True)
    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 
53, in print
    tqdm.write(line.ljust(columns))
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\tqdm\std.py", line 722, in 
write
    fp.write(s)
    ~~~~~~~~^^^
  File "C:\Users\UB\scoop\apps\python\current\Lib\encodings\cp1252.py", line 19, in 
encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
           ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeEncodeError: 'charmap' codec can't encode characters in position 8-10: 
character maps to <undefined>

I've been trying to troubleshoot this myself all day and I can't make any progress. I know that it's saying there's unrecognized characters somewhere in the command but as far as I've learned that stuff usually applies to emojis or weird special characters and I can't find anything like that. I've tried restarting powershell, uninstalling and reinstalling multiple times (even trying other builds, but none of them worked) and I've looked all over to see if anyone else had a similar issue but I can't find anything helpful. I would really appreciate some help here, thank you in advance!

Originally created by @Axon522 on GitHub (Jun 29, 2025). Original GitHub issue: https://github.com/Googolplexed0/zotify/issues/28 Hey, like a lot of other people I'm super new to this stuff and I ran into an error that I can't resolve. When I input `zotify --username` and then my account username, it returns this error that it can't encode the characters and it came back as undefined. ``` PS C:\Users\UB> zotify --username 31ajmzklcvagnhisfka3336wrwqi zotify : Exception in thread Thread-1 (_animate): At line:1 char:1 + zotify --username 31ajmzklcvagnhisfka3336wrwqi + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (Exception in thread Thread-1 (_animate )::String) [], RemoteException + FullyQualifiedErrorId : NativeCommandError Traceback (most recent call last): File "C:\Users\UB\scoop\apps\python\current\Lib\threading.py", line 1043, in _bootstrap_inner self.run() ~~~~~~~~^^ File "C:\Users\UB\scoop\apps\python\current\Lib\threading.py", line 994, in run self._target(*self._args, **self._kwargs) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 209, in _animate Printer.loader(self.channel, f"\t{c} {self.desc}") ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 60, in loader Printer.print(channel, START_OF_PREV_LINE*2 + msg, loader=True) ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\zotify\termoutput.py", line 53, in print tqdm.write(line.ljust(columns)) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\UB\pipx\venvs\zotify\Lib\site-packages\tqdm\std.py", line 722, in write fp.write(s) ~~~~~~~~^^^ File "C:\Users\UB\scoop\apps\python\current\Lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'charmap' codec can't encode characters in position 8-10: character maps to <undefined> ``` I've been trying to troubleshoot this myself all day and I can't make any progress. I know that it's saying there's unrecognized characters somewhere in the command but as far as I've learned that stuff usually applies to emojis or weird special characters and I can't find anything like that. I've tried restarting powershell, uninstalling and reinstalling multiple times (even trying other builds, but none of them worked) and I've looked all over to see if anyone else had a similar issue but I can't find anything helpful. I would really appreciate some help here, thank you in advance!
kerem closed this issue 2026-02-27 04:57:09 +03:00
Author
Owner

@Axon522 commented on GitHub (Jun 30, 2025):

I solved it, it turned out that I was using powershell when I needed to be on command prompt

<!-- gh-comment-id:3021201102 --> @Axon522 commented on GitHub (Jun 30, 2025): I solved it, it turned out that I was using powershell when I needed to be on command prompt
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/zotify#23
No description provided.