Skip to content
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

[Error] Module installed in Virtualenv #296

Open
enochrufus opened this issue Jul 4, 2018 · 2 comments
Open

[Error] Module installed in Virtualenv #296

enochrufus opened this issue Jul 4, 2018 · 2 comments
Labels

Comments

@enochrufus
Copy link

Hi, I have the below warning when I execute my script:

'No handlers could be found for logger "googleads.common"

Screen Grab of this: https://photos.app.goo.gl/PPxhYbYiM3r3JmRMA
I had installed the googleads library in a virtual environment; however, my code is in the base environment. The yaml file is also in the base environment and this warning comes up when I call this:

adwords_client = adwords.AdWordsClient.LoadFromStorage('\the\correct\path\adwords-api.yml')

Full code is available here: https://photos.app.goo.gl/iDZu2aupgyK8CXUh7

I have tried the following:

  • using the shebang of both my base python and virtualenv python.
  • if the libraries are installed on the base path then there is no such warning (tried this in both Windows and Linux os; however, not on the machine where this error is coming up).
  • I think this is just a warning since I could see data being uploaded into the AdWords userlist.

Could you guide me on how to fix this, please? I'm not an expert with Python, so if you could break it down, it would help me a lot.

Thanks,
Enoch

@msaniscalchi
Copy link
Contributor

Hello,

Thanks for the report! While that should not be happening, the warning output you're seeing is pretty harmless--it indicates that a handler is not configured for the googleads.common logger.

Interestingly, I can't replicate this on my end just by initializing a client on virtualenvs for Python 2/3, so it might be helpful if I could get more details concerning the OS, library version, and Python version. Also, do you happen to include logging settings in your configuration file as well? It may also be useful to see what settings you're using.

I had installed the googleads library in a virtual environment; however, my code is in the base environment. The yaml file is also in the base environment and this warning comes up when I call this:

It's possible that you're not actually using the virtualenv when running the code--i.e. you need to activate it. In that case, you may hypothetically be running your examples with an older version. You can check out this guide to verify if you've been using virtualenv correctly so far.

Regards,
Mark

@msaniscalchi msaniscalchi added the P2 label Jul 6, 2018
@enochrufus
Copy link
Author

enochrufus commented Jul 10, 2018

Hi Mark,

Thank you for your reply. Some of the details which you requested for:
OS: Red Hat Enterprise Linux Server release 7.4 (Maipo)
Library Version:
user_list_service = client.GetService('AdwordsUserListService', 'v201806')
Virtualenv: 15.1.0
Python (Virtualenv): Python 2.7.5
Python (base): Python 2.7.5

I have not enabled logging in the configuration. I'm able to activate the virtualenv, and also the libraries are not available in the base environment. I have not enabled logging :-( ... the examples are not clear for me. Is there a sample yaml file for reference in configuring logging?

Regards,
Enoch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants