marekrei / smuploader Goto Github PK
View Code? Open in Web Editor NEWUpload / download library for SmugMug.com
Upload / download library for SmugMug.com
Using your smugmug.py I can successfully retrieve albums, images and create new nodes as well.
However, when trying to do a simple image upload via upload_image(), I get the following error:
File "C:\....\lib\site-packages\rauth\session.py", line 228, in _parse_optional_params
if oauth_param in data:
TypeError: a bytes-like object is required, not 'str'
The offending line is:
if oauth_param in data:
....
where oauth_param is a list of strings, and data is binary. This seems like an rauth bug .. but I'm sure you had this code working at one time. I tried uploading an image with the 'files' parameter but SmugMug kept giving me a file corruption error (maybe my error).
Not sure if you still support this project but hopefully there is a clear/easy answer.
(Windows 10, python 3.7.2)
Thank you for sharing the tool!
The images seem to download file for me.
But videos seem to download only a very small file and not the original video. Is this something I can try and change?
I am a Python newbie - barely managed to get your script running. Need to learn!
I've follow the tips and 'smregister' was well done but when I digit
smregtest
I recive this message of error
REQUEST:
method=GET
url=https://api.smugmug.com/api/v2/user/[email protected]!albums
params={'count': 500, 'start': 1}
headers={'Accept': 'application/json'}
data=None
RESPONSE DATA:
{"Response":{"Uri":"/api/v2/user/[email protected]!albums?count=500&oauth_nonce=XXXXXXXX ... riDescription":"All of user's albums","EndpointType":"UserAlbums"},"Code":404,"Message":"Not Found"}
Retrying (1)...
Error: Too many retries, giving up.
E
======================================================================
ERROR: test_album_creation (__main__.TestSmugMug)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/lorenzo/.local/bin/smregtest", line 12, in test_album_creation
albums = smugmug.get_album_names()
File "/home/lorenzo/.local/lib/python2.7/site-packages/smuploader/smugmug.py", line 147, in get_album_names
albums = self.get_albums()
File "/home/lorenzo/.local/lib/python2.7/site-packages/smuploader/smugmug.py", line 132, in get_albums
response = self.request('GET', self.smugmug_api_base_url + "/user/"+self.username+"!albums", params=params, headers={'Accept': 'application/json'})
File "/home/lorenzo/.local/lib/python2.7/site-packages/smuploader/smugmug.py", line 119, in request
sys.exit(1)
SystemExit: 1
----------------------------------------------------------------------
Ran 1 test in 27.660s
FAILED (errors=1)
I hope in you :)
The test upload and download worked, and one album was download fine, but all albums give the following error:
Traceback (most recent call last):
File "/usr/local/bin/smdownloader", line 86, in
download_album(album_name = args.album, path = args.path, resume = args.resume, verbose = args.verbose)
File "/usr/local/bin/smdownloader", line 38, in download_album
images = smugmug.get_album_images(album_id)
File "/Library/Python/2.7/site-packages/smuploader/smugmug.py", line 182, in get_album_images
images.append({"ImageKey": image['ImageKey'], "Uri": image["Uri"], "FileName": image["FileName"], "ArchivedMD5": image["ArchivedMD5"], "OriginalSize": image["OriginalSize"]})
KeyError: 'OriginalSize'
I found
smuploader/smuploader/smugmug.py
Line 206 in 6b1726f
was a bit problematic in that I didn't want titlecasing, so dropped .title() from the code.
Would be good to have a user driven option to turn this on or off.
Any Plans to update to Python 3?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.