Can't upload to YouTube

Bug #719091 reported by clockworkpc
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenShot Video Editor
Fix Released
High
Unassigned
Ubuntu
Invalid
Undecided
Unassigned

Bug Description

Ubuntu 10.10
OpenShot from ppa:openshot.developers/maverick
OpenShot 1.3.0

Firstly, thank you Team OpenShot for your amazing work, I can't say enough good things about it.
Now to the business of making it even more mindblowing.

I tried uploading my video to YouTube. Here is the terminal output:

on_tlbMakeMovie_clicked called with self.GtkToolButton
on_cboExportType_changed
on_cboUploadServices_changed
on_cboProjectType_changed
on_cboExportTo_changed
on_cboProjectType_changed
on_btnExportVideo_clicked
NEW SDL CONSUMER
GenerateXML for an Effect
on_frmExportVideo_destroy
NEW SDL CONSUMER
GenerateXML for an Effect
on_frmMain_key_press_event
on_tlbMakeMovie_clicked called with self.GtkToolButton
on_cboExportType_changed
on_cboUploadServices_changed
on_cboProjectType_changed
on_cboExportTo_changed
on_cboExportType_changed
on_cboProjectType_changed
on_btnExportVideo_clicked
NEW SDL CONSUMER
GenerateXML for an Effect
on_frmExportVideo_destroy
NEW SDL CONSUMER
GenerateXML for an Effect
on_cboUploadService_changed
on_btnUpload_clicked
form is valid!
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/openshot/windows/UploadVideo.py", line 159, in on_btnUpload_clicked
    status = service.start_upload(self)
  File "/usr/lib/pymodules/python2.6/openshot/uploads/manager.py", line 145, in start_upload
    import gdata.youtube.client
ImportError: No module named client
on_btnUpload_clicked
form is valid!

I hope this helps.

Tags: upload youtube
Revision history for this message
clockworkpc (clockworkpc) wrote :
Revision history for this message
IRIE Shinsuke (irie) wrote :

I encountered the same problem when testing the alpha version but I forgot to report it here.

OpenShot's YouTube uploader needs Google Data Python client library 2.0.12 or later, but 'python-gdata' package in Ubuntu 10.10 provides the older version (2.0.8) so OpenShot includes gdata library as private modules.

In this case, the public modules seem to take precedence over the private ones.

Probably you can avoid this problem by removing 'python-gdata' package for the time being or installing the newer version from my PPA (https://launchpad.net/~irie/+archive/gdata).

Revision history for this message
Jonathan Thomas (jonoomph) wrote :

Hmmm, this is no good. I did not see this during my testing, but probably because I didn't have the Google python API installed on my testing computers. We should probably change the code where it attemps to import these libraries, to look relative first:

For example:
from .. import gdata.youtube.client

However, this will have to wait until our next minor release, which is not ready yet. My plan is to find and fix any bugs like this, update the translations and help manual, and make one more release in the next 2 weeks (or so).

Changed in openshot:
importance: Undecided → High
status: New → Confirmed
milestone: none → 1.3.1
Revision history for this message
Jonathan Thomas (jonoomph) wrote :

I tried a few things tonight to fix this, but no luck. It seems that the Google Python API should probably not be included in OpenShot, and added as a new dependency. If the version of Google Python API is not correct, than YouTube should be disabled, etc... However, I am not going to make this big of a change right now, since 1.3.1 is going to be a quick bug fix release. I would hate to cripple the YouTube uploading for most people. I'm moving this to 1.4.0 for us to tackle. Thanks!

Changed in openshot:
milestone: 1.3.1 → 1.4.0
Revision history for this message
Roger Binns (ubuntu-rogerbinns) wrote :

I just got bitten by this as well.

The easy fix is to modify startup to put openshot/uploads/youtube at the beginning of sys.path . Any imports after that will pick your bundled version.

In my own projects what I do is have a toplevel directory named 'thirdparty' which then has modules like this in it. I then have a module named 'usethirdparty' which looks like this:

   import sys
   import os
   sys.path=[os.path.join(os.path.dirname(os.path.abspath(__file__)), "thirdparty")]+sys.path

Elsewhere in my code the imports section looks like this:

  import sys
  import this

  import usethirdparty
  import gdata

Having usethirdparty as a module ensures it only gets run once. The imports make the author's intentions clear. The approach works on all version of python from 2.3 onwards.

Changed in ubuntu:
status: New → Invalid
Revision history for this message
giovanni farina (giovannigfarina) wrote :

I got the same problem on ubuntu 10.10, I was not able to upload video directly from O.S 1.3.1 to youtube. To fix it I just follow the step #2, thanks to Irie and his PPA and obviously to Jonathan Thomas and his Open-Shot.

Changed in openshot:
milestone: 1.4.0 → 1.4.1
Revision history for this message
Andy Finch (fincha) wrote :

Later versions of Ubuntu have the required version of python-gdata (as mentioned by IRIE). So this shouldn't be a problem any more on the latest versions. For earlier versions of Ubutu, please use the PPA linked by IRIE.

Changed in openshot:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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