Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.

Authentication is required (Under Synology NAS) #134

Open
mlino opened this issue Jun 30, 2021 · 3 comments
Open

Authentication is required (Under Synology NAS) #134

mlino opened this issue Jun 30, 2021 · 3 comments

Comments

@mlino
Copy link

mlino commented Jun 30, 2021

I'm using your Flickr API to make a simple python script to upload images to my Flickr account, but I noticed something weird. So I have codded it on my windows machine using VSCode, and then put the code on my Synology NAS to run it 24/7.
On my windows machine, it works great, but on Synology NAS, I keep getting an Authentication Error as shown below:

flickr.upload(file)
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/flickrapi/core.py", line 494, in upload
return self._upload_to_form(self.UPLOAD_URL, filename, fileobj, timeout=timeout, **kwargs)
File "/var/packages/py3k/target/usr/local/lib/python3.8/site-packages/flickrapi/core.py", line 533, in _upload_to_form
raise IllegalArgumentException("Authentication is required")

I really don't understand why it is working on windows, but giving me the above-mentioned error on the Synology Linux. The Linux version, running in the Synology NAS is listed below:
(Linux version 4.4.59+ (root@build3) (gcc version 4.9.3 20150311 (prerelease) (crosstool-NG 1.20.0) ) #25556 SMP PREEMPT Thu Mar 4 18:03:46 CST 2021).

FYI the following code would give me the same error like the one stated above:

import flickrapi

file = '/volume1/FTP/Evento_AeroITA_5D_3167.jpg'
api_key = u'xxxxxxxxxxxxxxxxxxxxxxxxxx'
api_secret = u'xxxxxxxxxxxxxxxxxxx'

flickr = flickrapi.FlickrAPI(api_key, api_secret)

tags = '"Marcio Lino" ATCBSB "Aviation Photography" SpottersBrasil "@marcioslsouza" '

params = {}
params['filename'] = file
params['title'] = 'Photography'
params['description'] = 'Live, From The Action using Flickr API'
params['tags'] = tags

flickr.upload(**params)

Thanks!

@randomcascade
Copy link
Collaborator

randomcascade commented Jul 21, 2021

Oof yeah. I was working on that a few months back. I haven't had a working developer machine up until a little bit ago. But I will look into what's going on with that. Just for a sanity check which version of Python are you using?

@randomcascade
Copy link
Collaborator

Also same as #133 I presume. I'll hold off on closing it until I'm sure of that.

@mlino
Copy link
Author

mlino commented Jul 21, 2021

Hi @randomcascade!

I've Python 3.8.6 installed on my Synology NAS, as you can see below:

Python 3.8.6 (default, Jan  4 2021, 16:11:49)
[GCC 4.9.3 20150311 (prerelease)] on Linux
Type "help", "copyright", "credits" or "license" for more information.
>>>

Thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants