Blender Cloud add-on error uploading screenshot #49080
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Blender 2.77a and 277.3
Windows 10 64 bits
Blender Id: 1.2.0
Blender Cloud: 1.4.2
Upload a render works perfect but if select upload screenshot, I get an error with the following log:
imb_savepng: Cannot open file for writing: 'C:\Users\Antonio\AppData\Local\Temp\tmp2onpz2c_\Screenshot-2016-08-12-22:05:11.png'
C:\Users\Antonio\AppData\Local\Temp\tmp2onpz2c_\Screenshot-2016-08-12-22:05:11.png: Invalid argument
Error: Could not write image: Invalid argument
Unexpected exception caught.
Traceback (most recent call last):
RuntimeError: Error: Could not write image: Invalid argument
Info: Uploading screenshot 'Screenshot-2016-08-12-22:05:11.png'
Error: Unexpected error <class 'RuntimeError'>: Error: Could not write image: Invalid argument
Changed status to: 'Open'
Added subscriber: @antoniov
I have been investigating the error and the error is image_sharing.py line 294:
I have found the reason:
The name of the file contains : and this is incorrect:
Name with : in time (ERROR):
bpy.ops.screen.screenshot(filepath="C:/Users/Antonio/AppData/Local/Temp/Screenshot-2016-08-12-22:34:36.png",show_multiview=False,use_multiview=False,full=True)
Error: Could not write image: Invalid argument
Now, with name changed (OK):
bpy.ops.screen.screenshot(filepath="C:/Users/Antonio/AppData/Local/Temp/Screenshot-2016-08-12-22-34-36.png",show_multiview=False,use_multiview=False,full=True)
{'FINISHED'}
I have replaced the line 288 in my local copy and works:
self.name = datetime.datetime.now().strftime('Screenshot-%Y-%m-%d-%H_%M_%S.png')
I could fix it in addons repo, but I want you confirm before.
Added subscribers: @dr.sybren, @fsiddi
Thanks for investigating and proposing this fix!
I'm fine with the change. Maybe use the
-
sign in all the filename as separator.@fsiddi I haven't right to edit cloud add-on, so I cannot fix it myself.
Personally I'd rather not have separators then, between the hours, minutes and seconds. Otherwise it becomes a dashfest.
I'll implement this when I'm back from holiday next week.
This issue was referenced by archive/blender-cloud-addon@2388f800dc
Changed status from 'Open' to: 'Resolved'
Changed status from 'Resolved' to: 'Archived'
Version 1.4.3 fixes this, and can be downloaded from https://cloud.blender.org/r/downloads/blender_cloud-latest-bundle.zip