python exception due to permissions

Bug #1813565 reported by Franck78
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Rapid Photo Downloader
Incomplete
Undecided
Unassigned

Bug Description

In short
Fresh UBUNTU 18.04, install.py went OK

/var/run/user/1000/gvfs/smb-share:server=ntkiller2.local,share=top/home/fbourdonnec/Images/2018

is a readonly samba share mounted on the machine running rpd

Scanning ends with an exception.

Looks like permissions (read only) on the samba server share are affecting the locally job.

Tags: samba share smb
Revision history for this message
Damon Lynch (dlynch3) wrote :

Include in your bug report the log files, which are found in the log directory ~/.cache/rapid-photo-downloader/log. You can open this directory by clicking on the link in the "Report a Problem" dialog window. If possible, please also include the configuration file found in the directory ~/.config/Rapid Photo Downloader/.

Until these steps are taken I'm unable to fully diagnose this problem.

Meanwhile, it is clear that your NAS is incorrectly setup. Files cannot be read from it in strictly read-only mode. You need to fix this.

Changed in rapid:
status: New → Incomplete
Revision history for this message
Franck78 (fbourdonnec) wrote :

Hello,

this is the log file, pasted instead of attachment.

Sorry, I don't agree with 'fix this'.

Any kind of errors can happen with files systems, remote or local.

It is the job a RPD to handle smoothly any kind of errors, particularly this area, with a main task called copying (downloading) files !!!!!!

Missing info is version : 0.9.13

Franck

Revision history for this message
Damon Lynch (dlynch3) wrote :

Franck, Rapid Photo Downloader cannot read the files you are trying to download. That's the root cause of the problem. How it deals with unreadable files could be improved, i.e. not throwing an exception. But unless you fix your NAS configuration, Rapid Photo Downloader will not work. Period.

Revision history for this message
Franck78 (fbourdonnec) wrote :

>>How it deals with unreadable files could be improved, i.e. not throwing an exception.

that's what is this report for.

>>But unless you fix your NAS configuration, Rapid Photo Downloader will not work.

well, your task is not fix the world but deal with it as it is ;-)
The best you can.
In 1980, MSDOS already had R)etry, A)bort I)gnore basic error handling.

Bug report is not incomplete. You have exact location of two sections needing error handling :

File "..../site-packages/raphodo/thumbnailpara.py", line 303, in preprocess_thumbnail_from_disk
    with open(rpd_file.full_file_name, 'rb') as photo:
PermissionError: [Errno 13] Permission denied: '....osram7w-840.jpg'

 File "..../site-packages/pymediainfo/__init__.py", line 219, in parse
    with open(filename, "rb"):
PermissionError: [Errno 13] Permission denied: '....lot-raccord.mp4'

thank you

Revision history for this message
Damon Lynch (dlynch3) wrote :

You're right — I didn't write the software taking into account users who have chosen to download over the network where they set it up so that the files they want can be listed but not actually read. Instead, I wrote the software so that people can download from cameras, memory cards, smartphones, and portable storage devices. I will update the program website to let others know that downloading from a NAS is at the user's own risk and is not supported.

Meanwhile, the bug report is incomplete because you've not provided the information I specifically requested. Given your refusal to supply the information, all I can do is deal with the exceptions listed above, which is a shame, as I'd like the program to be able to take more measures to deal with situations of this kind.

Revision history for this message
Franck78 (fbourdonnec) wrote :

well, here it is in attchment instead of text in comment #1

description: updated
Revision history for this message
Franck78 (fbourdonnec) wrote :

and config file

[Automation]
verify_file=false

[Device]
device_autodetection=true
this_computer_path=/home/vbourdonnec/Images/avendre
this_computer_source=true

[DidYouKnowWindow]
windowSize=@Size(570 350)

[Display]
did_you_know_index=4
ignore_unhandled_file_exts=TMP, DAT

[ErrorLog]
visible=false
windowPosition=@Point(153 115)
windowSize=@Size(872 436)

[MainWindow]
centerSplitterSizes=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x3\0\0\x1\x43\0\0\x2:\0\0\x1\x92\x1\xff\xff\xff\xff\x1\0\0\0\x1\0)
leftPanelSplitterSizes=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x3\0\0\0*\0\0\x2\xd5\0\0\0\x65\x1\xff\xff\xff\xff\x1\0\0\0\x2\0)
proximityButtonPressed=false
rightButtonPressed=1
rightPanelSplitterSizes=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\xe0\0\0\x1>\x1\xff\xff\xff\xff\x1\0\0\0\x2\0)
sourceButtonPressed=true
windowPosition=@Point(67 27)
windowSize=@Size(1373 901)

[Presets]
preset_photo_rename\1\name=trains
preset_photo_rename\1\pref_list=Text, trains-, , Filename, Image number, All digits, Text, , , Metadata, File number, Folder only
preset_photo_rename\size=1

[Program]
program_version=0.9.13

[Rename]
downloads_today=2019-01-30, 0
job_codes=@Variant(\0\0\0\t\0\0\0\x1\0\0\0\n\0\0\0\f\0T\0r\0\x61\0i\0n\0s)
photo_download_folder=/home/vbourdonnec/Public
photo_rename=Text, trains-, , Filename, Image number, All digits, Text, , , Metadata, File number, Folder only
photo_subfolder=Date time, Image date, YYYY, /, , , Date time, Image date, YYYY-MM-DD
remember_job_code=true
stored_sequence_no=0

[Timeline]
proximity_seconds=2700

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.