Handle Audacity remote control not enabled #181

Closed
opened 2023-10-13 10:03:45 +01:00 by kae · 1 comment
Owner

Currently it gives this:

File "/home/kae/mm/app/playlists.py", line 1045, in <lambda>
    1041  
    1042  # Open in Audacity
    1043  if track_row and not current:
    1044      self._add_context_menu(
--> 1045          "Open in Audacity", lambda: self._open_in_audacity(row_number)
    1046      )
    ..................................................
     self._add_context_menu = <method 'PlaylistTab._add_context_menu' of <PlaylistTab(id=1
                               17> playlists.py:278>
     self._open_in_audacity = <method 'PlaylistTab._open_in_audacity' of <PlaylistTab(id=1
                               17> playlists.py:1609>
     row_number = 32
    ..................................................

File "/home/kae/mm/app/playlists.py", line 1621, in _open_in_audacity
    1609  def _open_in_audacity(self, row_number: int) -> None:
 (...)
    1617              "track_path not set"
    1618          )
    1619          return
    1620  
--> 1621      open_in_audacity(track_path)
    ..................................................
     self = <PlaylistTab(id=117>
     row_number = 32
     track_path = '/home/kae/music/Singles/7 Years - Lukas Graham.mp3'
    ..................................................

File "/home/kae/mm/app/helpers.py", line 328, in open_in_audacity
    284  def open_in_audacity(path: str) -> bool:
 (...)
    324          send_command(command)
    325          response = get_response()
    326          return response
    327  
--> 328      with open(to_pipe, "w") as to_audacity, open(from_pipe, "rt") as from_audacity:
    329          do_command(f'Import2: Filename="{path}"')
    ..................................................
     path = '/home/kae/music/Singles/7 Years - Lukas Graham.mp3'
     send_command = <function 'open_in_audacity.<locals>.send_command' helpers.p
                     y:303>
     get_response = <function 'open_in_audacity.<locals>.get_response' helpers.p
                     y:308>
     to_pipe = '/tmp/audacity_script_pipe.to.1000'
     to_audacity = <_io.TextIOWrapper name='/tmp/audacity_script_pipe.to.1000' 
                    mode='w' encoding='UTF-8'>
     from_pipe = '/tmp/audacity_script_pipe.from.1000'
     do_command = <function 'open_in_audacity.<locals>.do_command' helpers.py:
                   321>
    ..................................................

---- (full traceback above) ----
File "/home/kae/mm/app/playlists.py", line 1045, in <lambda>
    "Open in Audacity", lambda: self._open_in_audacity(row_number)
File "/home/kae/mm/app/playlists.py", line 1621, in _open_in_audacity
    open_in_audacity(track_path)
File "/home/kae/mm/app/helpers.py", line 328, in open_in_audacity
    with open(to_pipe, "w") as to_audacity, open(from_pipe, "rt") as from_audacity:

FileNotFoundError: [Errno 2] No such file or directory: '/tmp/audacity_script_pipe.from.1000'
Currently it gives this: ``` File "/home/kae/mm/app/playlists.py", line 1045, in <lambda> 1041 1042 # Open in Audacity 1043 if track_row and not current: 1044 self._add_context_menu( --> 1045 "Open in Audacity", lambda: self._open_in_audacity(row_number) 1046 ) .................................................. self._add_context_menu = <method 'PlaylistTab._add_context_menu' of <PlaylistTab(id=1 17> playlists.py:278> self._open_in_audacity = <method 'PlaylistTab._open_in_audacity' of <PlaylistTab(id=1 17> playlists.py:1609> row_number = 32 .................................................. File "/home/kae/mm/app/playlists.py", line 1621, in _open_in_audacity 1609 def _open_in_audacity(self, row_number: int) -> None: (...) 1617 "track_path not set" 1618 ) 1619 return 1620 --> 1621 open_in_audacity(track_path) .................................................. self = <PlaylistTab(id=117> row_number = 32 track_path = '/home/kae/music/Singles/7 Years - Lukas Graham.mp3' .................................................. File "/home/kae/mm/app/helpers.py", line 328, in open_in_audacity 284 def open_in_audacity(path: str) -> bool: (...) 324 send_command(command) 325 response = get_response() 326 return response 327 --> 328 with open(to_pipe, "w") as to_audacity, open(from_pipe, "rt") as from_audacity: 329 do_command(f'Import2: Filename="{path}"') .................................................. path = '/home/kae/music/Singles/7 Years - Lukas Graham.mp3' send_command = <function 'open_in_audacity.<locals>.send_command' helpers.p y:303> get_response = <function 'open_in_audacity.<locals>.get_response' helpers.p y:308> to_pipe = '/tmp/audacity_script_pipe.to.1000' to_audacity = <_io.TextIOWrapper name='/tmp/audacity_script_pipe.to.1000' mode='w' encoding='UTF-8'> from_pipe = '/tmp/audacity_script_pipe.from.1000' do_command = <function 'open_in_audacity.<locals>.do_command' helpers.py: 321> .................................................. ---- (full traceback above) ---- File "/home/kae/mm/app/playlists.py", line 1045, in <lambda> "Open in Audacity", lambda: self._open_in_audacity(row_number) File "/home/kae/mm/app/playlists.py", line 1621, in _open_in_audacity open_in_audacity(track_path) File "/home/kae/mm/app/helpers.py", line 328, in open_in_audacity with open(to_pipe, "w") as to_audacity, open(from_pipe, "rt") as from_audacity: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/audacity_script_pipe.from.1000' ```
kae added the
bug
label 2023-10-13 10:03:45 +01:00
Author
Owner

fixed in current version

fixed in current version
kae closed this issue 2023-12-17 10:43:25 +00: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#181
No description provided.