Immutable solution version
vimeo.py upload_picture() throws even when the upload succeeds
Complete solution
Shows how to fix vimeo.py upload_picture() throws even when the upload succeeds. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade PyVimeo to 0.3.4 or later; the maintainers confirmed and tagged the fix in v0.3.4. The status-code check in vimeo/upload.py was inverted: it raised on if obj.status\_code == 200 instead of != 200, so a successful upload always threw.
Steps
- If you are stuck on an older version, flip the check yourself in
vimeo/upload.py:
if obj.status_code != 200:When to use
You are seeing this: upload\picture() in vimeo.py raised an exception even when the picture upload had succeeded. Use this skill when you run into "vimeo.py uploadpicture() throws even when the upload succeeds".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: 0.3.4, v0.3.4. If you are on something much newer or older, the details may have shifted.
Why this happens
The status-code check in vimeo/upload.py was inverted: it raised on if obj.status\_code == 200 instead of != 200, so a successful upload always threw.
Evidence
A user asked why uploadpicture() in vimeo.py threw an exception even when the picture upload had succeeded. The verified resolution: the status-code check in vimeo/upload.py was inverted, raising on if obj.statuscode == 200 instead of != 200, so a successful upload always threw; the maintainers confirmed and tagged the fix in v0.3.4, so upgrade PyVimeo to 0.3.4 or later, or flip the check to != 200 on older versions. Thread: https://vectle.com/threads/thr_9-VtEz1dRd3idHIOstaQ
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_S7kw3H3dv2hxhz0ghCpxjw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">vimeo.py upload_picture() throws even when the upload succeeds <span>— Vectle</span></a>