Closed artly closed 6 years ago
So I haven't been able to reproduce this with a fresh environment. Judging by the large amount of packages reported by pip freeze
it appears you're not using a virtualenv. Can you see if you can reproduce with a few virtualenv?
My pip freeze:
cachetools==2.1.0
google-api-python-client==1.6.7
google-auth==1.4.1
google-auth-httplib2==0.0.2
httplib2==0.11.3
oauth2client==4.1.2
pyasn1==0.4.3
pyasn1-modules==0.2.1
rsa==3.4.2
six==1.11.0
uritemplate==3.0.0
My result:
>>> import os
>>> from apiclient.discovery import build
>>> from google.oauth2 import service_account
>>>
>>> SCOPES = ['https://www.googleapis.com/auth/youtube']
>>> SERVICE_ACCOUNT_FILE = os.environ['SERVICE_ACCOUNT']
>>> credentials = service_account.Credentials.from_service_account_file(
... SERVICE_ACCOUNT_FILE, scopes=SCOPES)
>>>
>>> ytservice = build('youtube',
... 'v3',
... credentials=credentials)
>>>
@theacodes Many thanks, it certainly worked with a newly generated environment. Yay!
I've tried to run the script with your list of packages downgraded to the respective versions from my list but it still works.
So I would blame the presence of some of the other libraries in my environment. I've used anaconda default environment with a couple of additions needed for the project so it's hard to find out which package is responsible for the error as there are lots of them (you're right). Just to mention - the output above was not a pip freeze
but conda list
instead which is an analogical as I believe.
Thank you!
Hi, I've encountered this message while running the code below.
Also including my
pip freeze
output.Any possible help would be highly appreciated.