Uploaded image for project: 'Picard'
  1. Picard
  2. PICARD-2949

Picard reporting no error when saving to SMB share

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 2.12
    • File Move & Rename
    • None
    • Source Windows 11; destination linux based NAS with SMB.

      Hi, first post for me. I have been happily using this software for years.

      Sometimes the SMB share in private network has an authentication prompt that prevent access to the file share. I see it from Windows File Manager.

      However Picard doesn't get the prompt. I can go to options > edit Destination Directory and set a new network folder without error. 

      "Move files when sharing" & "Rename files when saving" are both on.

      I click Save on the album. The files appear to move–not instantly but with a reasonable network speed–to the destination SMB share.

      Alas, I later find the files are no longer in the source folder (as expected) but they also have not moved to the destination SMB.

      I believe the files – the files are lost! Perhaps sent to the missing sock dimension. 

      Anyway, all personal SMB issues aside, I would like to know if transfer fails (and not delete the source while at it).

       

      Respectfully,

          [PICARD-2949] Picard reporting no error when saving to SMB share

          Pinned comments

          Pinned by souparna_28

          Philipp Wolfer added a comment -

          If moving the file fails you should see the file icon change into an error icon in Picard. If moving the file works without an error and the move is indicated as successful either the file is actually somewhere or if not this would indicate some serious problem with the filesystem or something.

          If you can reproduce this can you please enable debug logging and redo such file move and share the full debug log here? See https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#getting-a-debug-log for how to enable debug logging.

          Philipp Wolfer added a comment - If moving the file fails you should see the file icon change into an error icon in Picard. If moving the file works without an error and the move is indicated as successful either the file is actually somewhere or if not this would indicate some serious problem with the filesystem or something. If you can reproduce this can you please enable debug logging and redo such file move and share the full debug log here? See https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#getting-a-debug-log for how to enable debug logging.

          All comments

          Yes Retch added a comment - - edited

          After posting this, I enabled the debug log. However, it hasn't happened again.

          I wouldn't call the network unstable, but there are two relevant pieces.

          One is a software VPN. I can't access the smb while the VPN is enabled. A 'Picard move' errors out while VPN is active, and I do not lose files.

          The second is that occasionally when connecting to the smb share from file manager, I am asked to authenticate. Picard doesn't ask to authenticate. A Picard move errors out without telling me there is an auth issue and I do not lose files.

          It's possible I lost the files in one of the above scenario. But as I said, that doesn't usually happen. I guess it would be nice if Picard could be aware of auth (vpn aware might be asking too much, yeah?)

          Anyway at this point I hope it never happens again. Question mark cross your fingers. Thanks for reading.

           

          Yes Retch added a comment - - edited After posting this, I enabled the debug log. However, it hasn't happened again. I wouldn't call the network unstable, but there are two relevant pieces. One is a software VPN. I can't access the smb while the VPN is enabled. A 'Picard move' errors out while VPN is active, and I do not lose files. The second is that occasionally when connecting to the smb share from file manager, I am asked to authenticate. Picard doesn't ask to authenticate. A Picard move errors out without telling me there is an auth issue and I do not lose files. It's possible I lost the files in one of the above scenario. But as I said, that doesn't usually happen. I guess it would be nice if Picard could be aware of auth (vpn aware might be asking too much, yeah?) Anyway at this point I hope it never happens again. Question mark cross your fingers. Thanks for reading.  

          souparna_28 added a comment -

          etch20 Hello, are you still facing the issue? Could you please share the debug log here?

          souparna_28 added a comment - etch20 Hello, are you still facing the issue? Could you please share the debug log here?

          Pinned by souparna_28

          Philipp Wolfer added a comment -

          If moving the file fails you should see the file icon change into an error icon in Picard. If moving the file works without an error and the move is indicated as successful either the file is actually somewhere or if not this would indicate some serious problem with the filesystem or something.

          If you can reproduce this can you please enable debug logging and redo such file move and share the full debug log here? See https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#getting-a-debug-log for how to enable debug logging.

          Philipp Wolfer added a comment - If moving the file fails you should see the file icon change into an error icon in Picard. If moving the file works without an error and the move is indicated as successful either the file is actually somewhere or if not this would indicate some serious problem with the filesystem or something. If you can reproduce this can you please enable debug logging and redo such file move and share the full debug log here? See https://picard-docs.musicbrainz.org/en/troubleshooting/troubleshooting.html#getting-a-debug-log for how to enable debug logging.

          souparna_28 added a comment -

          import shutil
          import os

          def move_file(src, dst):
              try:
                  shutil.move(src, dst)
                  if not os.path.exists(dst):
                      raise Exception("File not found in destination")
              except Exception as e:
                  print(f"Error moving file: {e}")
                  

           

          1. the above code can help to resolve the issue. It helps in error handling and verifying transfers.

          souparna_28 added a comment - import shutil import os def move_file(src, dst):     try:         shutil.move(src, dst)         if not os.path.exists(dst):             raise Exception("File not found in destination")     except Exception as e:         print(f"Error moving file: {e}")            the above code can help to resolve the issue. It helps in error handling and verifying transfers.

          souparna_28 added a comment -

          Hi, this is my first post as well. 

          The issue could be because the network connection isn't stable enough. Network instability can often hinder file transfers. If you have a stable connection, the issue could be related to the version of Picard you are using. Please make sure it is the latest one. The newer version may contain fixes for issues related to file handling. 

          Checking the SMB share configuration can also be helpful. Please ensure that the credentials match and permission settings are proper. 

           

          If the problem isn't due to any of the discussed issues, it may help if the following piece of code is added to the code base:

          import shutil
          import os

          def move_file(src, dst):
              try:
                  shutil.move(src, dst)
                  if not os.path.exists(dst):
                      raise Exception("File not found in destination")
              except Exception as e:
                  print(f"Error moving file: {e}")
                   

          This helps in error handling and verifying transfers.

          Hope I have been helpful

          souparna_28 added a comment - Hi, this is my first post as well.  The issue could be because the network connection isn't stable enough. Network instability can often hinder file transfers. If you have a stable connection, the issue could be related to the version of Picard you are using. Please make sure it is the latest one. The newer version may contain fixes for issues related to file handling.  Checking the SMB share configuration can also be helpful. Please ensure that the credentials match and permission settings are proper.    If the problem isn't due to any of the discussed issues, it may help if the following piece of code is added to the code base: import shutil import os def move_file(src, dst):     try:         shutil.move(src, dst)         if not os.path.exists(dst):             raise Exception("File not found in destination")     except Exception as e:         print(f"Error moving file: {e}")           This helps in error handling and verifying transfers. Hope I have been helpful

            Unassigned Unassigned
            etch20 Yes Retch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                Version Package