damonlynch / rapid-photo-downloader

Rapid Photo Downloader is the leading photo and video downloader for the Linux desktop.
https://damonlynch.net/rapid
GNU General Public License v3.0
114 stars 30 forks source link

Thumbnails not displayed #89

Closed jpverrue closed 1 year ago

jpverrue commented 2 years ago

Previously posted on pixls.us :

I have a problem with RPD that I can’t solve. When I run RPD, it doesn’t show any thumbnails. Sometimes when I run it a second or a third time, it shows some thumbnails, but never all of them.

I am under opensuse tumbleweed. I have read and reread the log several times, but I have not found anything that would give a clue. I searched all the issues on Github to see if this case had already been handled, but I didn’t find anything. I’ve also searched the internet quite a bit, but I haven’t found any other instances of the same problem either. While writing this message I discovered that the problem was known ([SOLVED]Lost thumbnails in RPD interface) However, after examining my system it turns out that PyQT5 and PyQT5-sip are well installed. :

   Defaulting to user installation because normal site-packages is not writeable
   Requirement already satisfied: PyQt5 in /usr/lib64/python3.10/site-packages (5.15.7)
   Requirement already satisfied: PyQt5-sip<13,>=12.11 in /usr/lib64/python3.10/site-packages (from PyQt5) (12.11.0)

What else can I do to fix this problem?

As you have recommended, here is the tar.gz file with the log and the config file. rpd-bug-report-20220921.tar.gz

Thank you for any help and good recovery for your hand injury.

gckoehler commented 2 years ago

Hallo, i have the same problem with Opensuse tumbleweed and no solution. thank you

damonlynch commented 2 years ago

Somebody with Python experience needs to investigate this issue. I cannot do it these days because I injured my hands while working on the code earlier this year. I cannot do any work on the program.

cryptomilk commented 1 year ago

I'm getting:

Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/raphodo/thumbnailextractor.py", line 887, in <module>
    thumbnail_extractor = ThumbnailExtractor()
  File "/usr/lib/python3.10/site-packages/raphodo/thumbnailextractor.py", line 188, in __init__
    super().__init__("Thumbnail Extractor")
  File "/usr/lib/python3.10/site-packages/raphodo/interprocess.py", line 1176, in __init__
    self.do_work()
  File "/usr/lib/python3.10/site-packages/raphodo/thumbnailextractor.py", line 875, in do_work
    self.process_files()
  File "/usr/lib/python3.10/site-packages/raphodo/thumbnailextractor.py", line 850, in process_files
    pickle.dumps(
SystemError: PY_SSIZE_T_CLEAN macro must be defined for '#' formats
cryptomilk commented 1 year ago

For all # variants of formats (s#, y#, etc.), the macro PY_SSIZE_T_CLEAN must be defined before including Python.h.

https://docs.python.org/3/c-api/arg.html#strings-and-buffers

damonlynch commented 1 year ago

@cryptomilk That looks like a previous issue. See issue #37.

cryptomilk commented 1 year ago
# rpm -q python310-qt5
python310-qt5-5.15.7-1.6.x86_64
damonlynch commented 1 year ago

@cryptomilk but is the change applied? With Arch or Manjaro in the past, I've seen the PyQt5 version bumped, and the patch that fixes that problem removed (for whatever reason).

cryptomilk commented 1 year ago

Do you have a link to the patch?

damonlynch commented 1 year ago

@cryptomilk I don't have a link to the patch, but I located this discussion when the problem was seen in Manjaro. Is your platform similarly using sip4 in conjunction with PyQt5?

To confirm that the problem is with PyQt5 on your system, I urge you to install a local copy of PyQt5 from pypi for your user. That way, you will be using a copy of PyQt5 that is sure to have the fix.

python3 -m pip install -U --user PyQt5

If you have an ancient version of pip, upgrade that first, or else the PyQt5 installation will fail:

python3 -m pip install -U --user pip
jpverrue commented 1 year ago

Have you found a solution to this problem? This is very annoying, because I can't use RPD anymore, I have to do the downloads manually with the file manager. I'm a developer, but not in python, so if you can tell me what changes to apply, I can do it on my installed version. Then, if I manage to get Rapid-Photo-Downloader working again, I can suggest a patch.

Thanks a lot!

damonlynch commented 1 year ago

@jpverrue As I have written in the README and also on the program website, while working on the Rapid Photo Downloader code last year, I developed a hand injury caused by excessive typing. That injury severely limits my ability to work on the code. I can use voice recognition to code under Windows, but testing the program using Linux requires typing that I cannot do without exacerbating the injury.

If you want the bug fixed, and you have the skills, the code is there just waiting to be worked on!

jpverrue commented 1 year ago

Hi Damon, Thank you for your reply. Unfortunately, I'm a 'c' programmer, but not at all in Python. I've looked at the code, but I can't see where to start. But… Yesterday, I took the time to reread this whole thread, which made me try installing 'PyQt5' again with the command pip install --user -I PyQt5 and this time, it's OK! The thumbnails are now displayed properly. What surprises me is that the two versions, the one installed by my distribution (openSUSE Tumbleweed), and the one installed with pip are exactly the same: PyQt5-5.15.9. Thanks again for your excellent software and good luck for the rest of your recovery.

damonlynch commented 1 year ago

Thanks for reporting back with your finding.

I guess openSUSE is compiling PyQt5 differently from the PyQt5 author. For example, openSUSE might be using a different version of sip. Whatever the difference is, that difference introduces the bug.

Have you opened a bug on the openSUSE bug tracker? If you don't do so, the problem will not be fixed, because they will not know about it.