[Solved] Failing to download photos from CIFS

The best way would be to get the ebuild working — most of what the install.py script does is

  1. install system dependencies
  2. install python dependencies
  3. install the program itself

All these tasks are something the ebuild should be able to handle with ease. The only real problem would be if gentoo lacks support for a required dependency. Then you’d need an ebuild for each of those program libraries too.

1 Like

I am afraid, easier said than done :slight_smile: I am not that handycaped when it comes to PC things, just I assume, this is beyond my abilities and capabilities :-/

Sorry, I have installed the RPD some time ago and I do not recall the procedure clearly. It is still working (and updating - as it is quite capable of updating itself, installing using an ebuild would provide no benefits). Searching in bash history:

wget https://launchpad.net/rapid/pyqt/0.9.0b2/+download/install.py
wget https://launchpad.net/rapid/pyqt/0.9.0b2/+download/rapid-photo-downloader-0.9.0b2.tar.gz
python3 install.py rapid-photo-downloader-0.9.0b2.tar.gz

If I recall correctly I had to hack the install.py script a bit because it was stack in a loop saying “Restarting script using /usr/bin/python3 Restarting script using system python…”. I think it helped to delete the custom_python test section at about the line 2497 in the current install.py script (install succeeded after that). But I cannot guarantee the result.

1 Like

That’s a LOT of bash history :smiley:

If it’s as simple as that then I can modify the install script to give it the command line option to not check for that.

Until I modify the script and make a new release, what I suggest is installing the program into a python virtual environment. That should work. It’s actually pretty simple, as long as you install some dependencies first. See the READE.rst for instructions (here for 0.9.16).

Do keep in mind the backward quotes in the instructions are not to be included in the command line steps (they’re for formatting the rst file)!!

Note, pretty much the only limitations of the python virtual env install are not automatic upgrades, and you’d need to create a system menu entry yourself.

1 Like

@robertvalik
WOW! I am also impressed about your history :slight_smile:
That “restarting script” is exactly also my issue…

Would you have a bit more indication, which part you have deleted, as the line 2497 seems to be something different.

@damonlynch
I could either wait or hack the script as Robert did . Thanks a lot :slight_smile:
BTW: would be nice, if we can have an install-option, that it goes to /opt rather than /usr/bin, to keep the repository clean.

Unlimited bash history saved me few times :slight_smile:

It should be the block starting with:

if custom_python()

and ending with:

restart_script(restart_with=executable)

Hope it has been all that I did…

Sorry for OT, but how? I googled and I see, I have to define or even eliminate HISTSIZE and HISTFILESIZE, but find and grep do not give me those definitions in /etc and even in /usr I cannot find something reasonable…

I tried and was as successful as I got even a warning message, that I still need to install dev-python/pip dev-python/wheel. Afterwards the script starts downloading but finally still delivers lots of Restarting script using /usr/bin/python3

Then I tried your way above with 0.9.0b2. In that one ther is no custom_pyhton() even. Hence I tried as is, but it also ends up with failures, that it cannot build gphoto2 (which I installed with emerge anyhow) and pyzmq (dito installed)…

So currently I am stuck, at least with my limited compentency (but I want RPD as I do not see real alternatives)

[update]
I have downloaded and unpacked rapid-photo-downloader-0.9.16.tar.gz manually and applied the above mentioned changes for custom_python() of the install.py which is inside that package.

The success goes as far, as I get the following errormessages:

Building wheels for collected packages: gphoto2
  Building wheel for gphoto2 (setup.py): started
  Building wheel for gphoto2 (setup.py): finished with status 'error'
  Running setup.py clean for gphoto2
Failed to build gphoto2
Installing collected packages: gphoto2, pyxdg, python-dateutil, arrow, rawkit, PyPrind, colorlog, easygui, colour, pymediainfo, sortedcontainers, tornado, tenacity
  Running setup.py install for gphoto2: started
    Running setup.py install for gphoto2: finished with status 'error'
Received error code 1
Failed to install application requirements: exiting

If I use python3 -v I get as much “# destroy…” lines as I cannot see the interesting part anymore…

gphoto2 is intalled including the libs via emerge.

The program is not installed into /usr/bin. It’s installed in various subdirectories under ~/local/

Or you could do as I suggest and install it into a python virtual environment. You need to read the README and manually install the required dependencies first, like the header/development files for libgphoto2 and python3. If you don’t do that, I guarantee you the program will not run.

Dear @damonlynch

I tried with virtual env and it also failed.

libgphoto2 is installed. Headerfiles for python3, … I donno what this could be, as python3 is my system-default and gentoo is pretty a dev-distro, I assume, everything is in place and I still get, what you see above…

Quite a lot of times the interesting things are not in the config files but in the old commands (I fail miserably to document everything I do at my home computer)… And there are times that I discover that I need some sofisticated one-liner that I have used a long time ago. It saves a lot of time to just grep it from history.

Yup, and that is probably the un-clarity of bash history. That command may come from my old installation. At some point I have deleted the ~/.local directory and I had to reinstall RPD. And then I have modified the probably newer install.py.

Anyway - I have tried the modified script on my Gentoo box now under a new user account and it still works as expected (but you know - every Gentoo box is different; I discovered that I have to update the system PyQT5 after successful installation to run the “new” RPD even the “old” was working correctly).

Actually, there are things that the Gentoo approach breaks. P.e. Rust - the portage package is usable to compile other packages from portage but is unusable by IDEs as some expected tools are missing. And probably this “custom python” is another example :slight_smile:

@robertvalik
Little misunderstanding:
I wanted to know, how you made it, to get unlimited history. I wanted to do so, as I am convinced by your comments, just cannot find, where is HISTSIZE defined

I tried literelaly hundred times tonight with the modified install.py and also with different of the few options. I think the problem is, somewhere it always try to use its own gphoto2 but i have it installed already by emerge. So I keep ending up with the errror:

   Building wheel for gphoto2 (setup.py): finished with status 'error'
  Running setup.py clean for gphoto2
Failed to build gphoto2

Oh, I see :slight_smile:

I have it in my ~/.bash_profile file. It is probably not set by default.

What about installing gphoto2 using pip? Does that work?

pip install --user gphoto2

and how did you define “unlimited”? I ask like this, because “Dr. google” told me, the HISTSIZE just need to be eliminated!?! Or I got something wrong…

You are great!!!
I still have errors, but the right hint came as well. Below you can see, ccache makes me headaches, as usual it is not meant to be used by normal users. I’ll fix that later, Now have to go to the office.

I wish I’d have seen that errormessage earlier :slight_smile:

I have the following:

$ eix gphoto2
[I] media-gfx/gphoto2
     VerfĂĽgbare Versionen:   2.5.20 {aalib exif ncurses nls readline}
     Installierte Versionen: 2.5.20(21:12:03 12.08.2019)(aalib exif ncurses nls readline)
     Startseite:             http://www.gphoto.org/
     Beschreibung:           Free, redistributable digital camera software application

[I] media-libs/libgphoto2
     VerfĂĽgbare Versionen:   2.5.20(0/6) 2.5.22(0/6) {doc examples exif gd jpeg nls serial ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" CAMERAS="+adc65 +agfa_cl20 +aox +ax203 +barbie +canon +casio_qv +clicksmart310 +digigr8 +digita +dimagev +dimera3500 +directory +enigma13 +fuji +gsmart300 +hp215 +iclick +jamcam +jd11 +jl2005a +jl2005c +kodak_dc120 +kodak_dc210 +kodak_dc240 +kodak_dc3200 +kodak_ez200 +konica +konica_qm150 +largan +lg_gsm +mars +mustek +panasonic_coolshot +panasonic_dc1000 +panasonic_dc1580 +panasonic_l859 +pccam300 +pccam600 +pentax +polaroid_pdc320 +polaroid_pdc640 +polaroid_pdc700 +ptp2 +ricoh +ricoh_g3 +samsung +sierra +sipix_blink2 +sipix_web2 +smal +sonix +sony_dscf1 +sony_dscf55 +soundvision +spca50x +sq905 +st2205 +stv0674 +stv0680 +sx330z +topfield +toshiba_pdrm11 +tp6801"}
     Installierte Versionen: 2.5.22(0/6)(23:27:33 12.08.2019)(exif gd jpeg nls serial -doc -examples ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="32 64 -x32" CAMERAS="adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a jl2005c kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 pentax polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ptp2 ricoh ricoh_g3 samsung sierra sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z topfield toshiba_pdrm11 tp6801")
     Startseite:             http://www.gphoto.org/
     Beschreibung:           Library that implements support for numerous digital cameras

2 Treffer

Then I did, as you suggested:

$ pip install --user gphoto2
Collecting gphoto2
 [...]
    ccache: error: Failed to create temporary file for /home/Datengrab/tmp/ccache/tmp/widget_wra.stdout: Permission denied
    error: command 'x86_64-pc-linux-gnu-gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command "/usr/bin/python3.6 -u -c 'import setuptools, tokenize;__file__='"'"'/tmp/pip-install-bf6lvvgn/gphoto2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',

@robertvalik

Thank you so much! I made it…
temprarily disabled ccache and update sudoers and all fine… It worksa

Come back to my HISTSIZE question. Is it just HISTSIZE=0 ??? (sometimes =0 disables and somtimes it means unlimited…)…

Again thanks for everything

@Claes it works!!! You probably may also like RPD

0 means disabled. -1 should be unlimited (I have 99999999 for some unremembered reason).

And congrats on the working RPD! :slight_smile:

TNX

Didn’t try it out yet, but using digikam just for downloading the fotos, that was a little OTT :smiley:

@AxelG @robertvalik the install.py in 0.9.17 should now run better on GenToo. But you still need to figure out the dependencies yourself.

dear @damonlynch

Thanks a lot. Didn’t try 0.9.17 yet, as I have successfully installed 0.9.16 already but even there, for the very relevant things the script asked me to install via my repository and the rest I installed acc. to your documentation, as far as available in my repos. Currently runs great and hundred times faster than digikam, which is, as we have the saying, shooting with a canonball to a bird…

A bit tricky is the installation as user, that is a very rare case in gentoo and hence the system behaves a bit “stiff” …

Dear @damonlynch,

sorry for late reply…

As in-app update didn’t work on my side for 0.9.17 finally I used the new installer with --force-this-installer (due to former experience) and it worked like a charm.
Thanks a lot!