Closed Get455by closed 3 years ago
@Get455by thanks for providing these details, they're very helpful! When I run your script as-is I don't get any errors, so I don't think the problem has to do with that logic.
What the error message tells me is that somewhere in your codebase you're accessing the META
attribute on a protobuf message class instance, which are the objects you receive from service responses, as well as from calling client.get_type
and client.get_service
. Do you know anywhere else in your application where you might have such logic?
unfortunately, no, I don't know. I posted it on the site. to see if there will be the same type of error. perhaps if you look at the link - you will see more information? (just through the terminal, everything works fine for me too) but the localhost and the site catches the error(( https://gardensoldier.com/faq -- the entire site is an exact copy of the one on the localhost
the fact is that the site is completely naked. there is a single view facing the etsy api. but there are no such intricate intricacies as with google api)
@Get455by Seems like this Stack post might help. Can you try renaming your request
variable in the above script to see if that fixes the issue?
Thank you very much. I certainly saw this solution, but apparently I wasn't ready to apply it yet! Thank you, thank you, thank you. I am the happiest novice programmer on earth today)
here is my new code in the function:
requestrename = client.get_type("GenerateKeywordIdeasRequest")
requestrename.customer_id = customer_id
requestrename.language = language_rn
requestrename.include_adult_keywords = False
requestrename.keyword_plan_network = keyword_plan_network
requestrename.keyword_seed.keywords.extend(keyword_texts)
keyword_ideas = keyword_plan_idea_service.generate_keyword_ideas(
request=requestrename
----------------------------------------
both on the locale and on the site works perfectly!
Wonderful, glad I could help!
Good afternoon. I am a beginner Django Python super master. I face big problems every day, but there is one big problem that I can't solve for more than 2 days. I'm trying to make a project using the google ads api. I have completed all the necessary procedures and can connect to test accounts to receive information and make changes to test accounts. But when trying to port this to django-I ran into problems. My last solution works at 50%. I get the necessary information and immediately get an additional ERROR.
the essence: in views.py I call a function that connects to a test account to collect statistics for a given keyword. I get statistics, and an error. I will be glad of any help or hint) thank you!
AttributeError at /faq 'META' Request Method: GET Request URL: http://localhost:8000/faq Django Version: 3.2 Exception Type: AttributeError Exception Value:
'META' Exception Location: F:\python\apiserv_website\myvenv\lib\site-packages\proto\message.py, line 605, in getattr Python Executable: F:\python\apiserv_website\myvenv\Scripts\python.exe Python Version: 3.9.3 Python Path:
['F:\python\apiserv_website\apiserv', 'C:\Users\romar\AppData\Local\Programs\Python\Python39\python39.zip', 'C:\Users\romar\AppData\Local\Programs\Python\Python39\DLLs', 'C:\Users\romar\AppData\Local\Programs\Python\Python39\lib', 'C:\Users\romar\AppData\Local\Programs\Python\Python39', 'F:\python\apiserv_website\myvenv', 'F:\python\apiserv_website\myvenv\lib\site-packages'] Server time: Wed, 05 May 2021 23:13:14 +0000
views.py
the code inside the function I'm calling:
credentials = { "developer_token": "hide", "refresh_token": "hide", "client_id": "hide", "client_secret": "hide" }