Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NameError: name 'serviceName' is not defined #130

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ilius opened this issue Sep 4, 2015 · 3 comments
Closed

NameError: name 'serviceName' is not defined #130

ilius opened this issue Sep 4, 2015 · 3 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.

Comments

@ilius
Copy link

ilius commented Sep 4, 2015

File "oauth2client/oauth2client/util.py", line 142, in positional_wrapper
return wrapped(_args, *_kwargs)
File "google-api-python-client/googleapiclient/discovery.py", line 193, in build
content = _retrieve_discovery_doc(requested_url, http, cache_discovery, cache)
File "googleapiclient/discovery.py", line 236, in _retrieve_discovery_doc
raise UnknownApiNameOrVersion("name: %s version: %s" % (serviceName,
NameError: name 'serviceName' is not defined

The same for version too, not passed to this function
Other http errors are also not handled.
I suggest you move out the codes inside function _retrieve_discovery_doc, and remove this function because it's only used once.
The code is messy

@nathanielmanistaatgoogle
Copy link
Contributor

@tmatsuo, what do you make of this?

tmatsuo pushed a commit to tmatsuo/google-api-python-client that referenced this issue Sep 4, 2015
tmatsuo pushed a commit to tmatsuo/google-api-python-client that referenced this issue Sep 4, 2015
tmatsuo pushed a commit to tmatsuo/google-api-python-client that referenced this issue Sep 4, 2015
@tmatsuo
Copy link
Contributor

tmatsuo commented Sep 4, 2015

@ilius Now the fix is in. Thanks for the report!

The code is messy

I kinda agree, but it's messy because the intention of the new code is automagically setting up the cache for you. I'm open to any suggestions to improve the code though.

Thanks again :)

@ilius
Copy link
Author

ilius commented Sep 5, 2015

Your welcome :)
I hope I can help developing this project soon

akrherz pushed a commit to akrherz/google-api-python-client that referenced this issue Apr 1, 2019
Add functools.wraps() to util.positional().
@yoshi-automation yoshi-automation added 🚨 This issue needs some love. triage me I really want to be triaged. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

4 participants