AttributeError: 'module' object has no attribute 'youtube'

704 views Asked by At

My python function

def get_youtube_client():
    client = gdata.youtube.service.YouTubeService()
    client.client_id = "xxxxxxxx"
    client.developer_key = get_api_key()
    return client

I have used third-party vendoring to introduce gdata into the libs folder. enter image description here

I am getting the following error when I execute get_youtube_client

INFO     2017-06-01 09:16:36,987 remote.py:24] Detected environment to be Google App Engine. Using synchronous HTTP transport.
WARNING  2017-06-01 19:16:37,144 urlfetch_stub.py:550] Stripped prohibited headers from URLFetch request: ['Content-Length', 'Host']
Exception on /Sermons/ZacPoonen [GET]
Traceback (most recent call last):
  File "lib\flask\app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "lib\flask\app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "lib\flask\app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "lib\flask\app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "lib\flask\app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "C:\Code\App-Engine\cfc-melbourne-website\app\sermons\routes\sermon_routes.py", line 89, in youtube_video
    Vp, videos = init_videos(author, queryterm, url)
  File "C:\Code\App-Engine\cfc-melbourne-website\app\sermons\models\video.py", line 136, in init_videos
    client = get_youtube_client()
  File "C:\Code\App-Engine\cfc-melbourne-website\app\sermons\models\video.py", line 150, in get_youtube_client
    client = gdata.youtube.service.YouTubeService()
AttributeError: 'module' object has no attribute 'youtube'

Updated image of the gdata folder

enter image description here

0

There are 0 answers