Error due to character set opening Audacity #227

Closed
opened 2024-04-05 09:46:54 +01:00 by kae · 1 comment
Owner
File "/home/kae/mm/app/playlists.py", line 422, in <lambda>
    418          lambda: self._cancel_audacity(),
    419      )
    420  else:
    421      self._add_context_menu(
--> 422          "Open in Audacity", lambda: self._open_in_audacity(model_row_number)
    423      )
    ..................................................
     self._cancel_audacity = <method 'PlaylistTab._cancel_audacity' of <playlists.Playlis
                              tTab object at 0x7f8a75b9f7f0> playlists.py:506>
     self._add_context_menu = <method 'PlaylistTab._add_context_menu' of <playlists.Playli
                               stTab object at 0x7f8a75b9f7f0> playlists.py:309>
     self._open_in_audacity = <method 'PlaylistTab._open_in_audacity' of <playlists.Playli
                               stTab object at 0x7f8a75b9f7f0> playlists.py:692>
     model_row_number = 57
    ..................................................

File "/home/kae/mm/app/playlists.py", line 707, in _open_in_audacity
    692  def _open_in_audacity(self, row_number: int) -> None:
 (...)
    703          return
    704  
    705      escaped_path = path.replace('"', '\\"')
    706      cmd = f'Import2: Filename="{escaped_path}"'
--> 707      status = self._audactity_command(cmd)
    708      if status:
    ..................................................
     self = <playlists.PlaylistTab object at 0x7f8a75b9f7f0>
     row_number = 57
     escaped_path = '/home/kae/music/Talking Heads/Sand in the Vaseline CD2÷2/03
                     . And She Was.flac'
     cmd = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th
            e Vaseline CD2÷2/03. And She Was.flac"'
     self._audactity_command = <method 'PlaylistTab._audactity_command' of <playlists.Playl
                                istTab object at 0x7f8a75b9f7f0> playlists.py:347>
    ..................................................

File "/home/kae/mm/app/playlists.py", line 367, in _audactity_command
    347  def _audactity_command(self, cmd: str) -> bool:
 (...)
    363      if not self.musicmuster.audacity_client:
    364          log.error("Unable to access Audacity client")
    365          return False
    366  
--> 367      self.musicmuster.audacity_client.write(cmd, timer=True)
    368  
    ..................................................
     self = <playlists.PlaylistTab object at 0x7f8a75b9f7f0>
     cmd = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th
            e Vaseline CD2÷2/03. And She Was.flac"'
     self.musicmuster.audacity_client = <pipeclient.PipeClient object at 0x7f8a6926bf90>
     log.error = <method 'Logger.error' of <Logger musicmuster (DEBUG)> __ini
                  t__.py:1508>
     self.musicmuster.audacity_client.write = <method 'PipeClient.write' of <pipeclient.PipeClient object 
                                               at 0x7f8a6926bf90> pipeclient.py:171>
    ..................................................

File "/home/kae/mm/app/pipeclient.py", line 187, in write
    171  def write(self, command, timer=False) -> None:
 (...)
    183          write("GetInfo: Type=Labels", timer=True):
    184  
    185      """
    186      self.timer = timer
--> 187      self._write_pipe.write(command + EOL)
    188      # Check that read pipe is alive
    ..................................................
     self = <pipeclient.PipeClient object at 0x7f8a6926bf90>
     command = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th
                e Vaseline CD2÷2/03. And She Was.flac"'
     timer = True
     self.timer = True
     EOL = '\n'
    ..................................................

---- (full traceback above) ----
File "/home/kae/mm/app/playlists.py", line 422, in <lambda>
    "Open in Audacity", lambda: self._open_in_audacity(model_row_number)
File "/home/kae/mm/app/playlists.py", line 707, in _open_in_audacity
    status = self._audactity_command(cmd)
File "/home/kae/mm/app/playlists.py", line 367, in _audactity_command
    self.musicmuster.audacity_client.write(cmd, timer=True)
File "/home/kae/mm/app/pipeclient.py", line 187, in write
    self._write_pipe.write(command + EOL)

UnicodeEncodeError: 'ascii' codec can't encode character '\xf7' in position 73: ordinal not in range(128)
``` File "/home/kae/mm/app/playlists.py", line 422, in <lambda> 418 lambda: self._cancel_audacity(), 419 ) 420 else: 421 self._add_context_menu( --> 422 "Open in Audacity", lambda: self._open_in_audacity(model_row_number) 423 ) .................................................. self._cancel_audacity = <method 'PlaylistTab._cancel_audacity' of <playlists.Playlis tTab object at 0x7f8a75b9f7f0> playlists.py:506> self._add_context_menu = <method 'PlaylistTab._add_context_menu' of <playlists.Playli stTab object at 0x7f8a75b9f7f0> playlists.py:309> self._open_in_audacity = <method 'PlaylistTab._open_in_audacity' of <playlists.Playli stTab object at 0x7f8a75b9f7f0> playlists.py:692> model_row_number = 57 .................................................. File "/home/kae/mm/app/playlists.py", line 707, in _open_in_audacity 692 def _open_in_audacity(self, row_number: int) -> None: (...) 703 return 704 705 escaped_path = path.replace('"', '\\"') 706 cmd = f'Import2: Filename="{escaped_path}"' --> 707 status = self._audactity_command(cmd) 708 if status: .................................................. self = <playlists.PlaylistTab object at 0x7f8a75b9f7f0> row_number = 57 escaped_path = '/home/kae/music/Talking Heads/Sand in the Vaseline CD2÷2/03 . And She Was.flac' cmd = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th e Vaseline CD2÷2/03. And She Was.flac"' self._audactity_command = <method 'PlaylistTab._audactity_command' of <playlists.Playl istTab object at 0x7f8a75b9f7f0> playlists.py:347> .................................................. File "/home/kae/mm/app/playlists.py", line 367, in _audactity_command 347 def _audactity_command(self, cmd: str) -> bool: (...) 363 if not self.musicmuster.audacity_client: 364 log.error("Unable to access Audacity client") 365 return False 366 --> 367 self.musicmuster.audacity_client.write(cmd, timer=True) 368 .................................................. self = <playlists.PlaylistTab object at 0x7f8a75b9f7f0> cmd = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th e Vaseline CD2÷2/03. And She Was.flac"' self.musicmuster.audacity_client = <pipeclient.PipeClient object at 0x7f8a6926bf90> log.error = <method 'Logger.error' of <Logger musicmuster (DEBUG)> __ini t__.py:1508> self.musicmuster.audacity_client.write = <method 'PipeClient.write' of <pipeclient.PipeClient object at 0x7f8a6926bf90> pipeclient.py:171> .................................................. File "/home/kae/mm/app/pipeclient.py", line 187, in write 171 def write(self, command, timer=False) -> None: (...) 183 write("GetInfo: Type=Labels", timer=True): 184 185 """ 186 self.timer = timer --> 187 self._write_pipe.write(command + EOL) 188 # Check that read pipe is alive .................................................. self = <pipeclient.PipeClient object at 0x7f8a6926bf90> command = 'Import2: Filename="/home/kae/music/Talking Heads/Sand in th e Vaseline CD2÷2/03. And She Was.flac"' timer = True self.timer = True EOL = '\n' .................................................. ---- (full traceback above) ---- File "/home/kae/mm/app/playlists.py", line 422, in <lambda> "Open in Audacity", lambda: self._open_in_audacity(model_row_number) File "/home/kae/mm/app/playlists.py", line 707, in _open_in_audacity status = self._audactity_command(cmd) File "/home/kae/mm/app/playlists.py", line 367, in _audactity_command self.musicmuster.audacity_client.write(cmd, timer=True) File "/home/kae/mm/app/pipeclient.py", line 187, in write self._write_pipe.write(command + EOL) UnicodeEncodeError: 'ascii' codec can't encode character '\xf7' in position 73: ordinal not in range(128) ```
kae added the
bug
label 2024-04-05 09:46:54 +01:00
Author
Owner

Duplicate of #224

Duplicate of #224
kae closed this issue 2024-04-05 10:37:28 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
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: kae/musicmuster#227
No description provided.