Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

StackOverflow Point

StackOverflow Point Navigation

  • Web Stories
  • Badges
  • Tags
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Web Stories
  • Badges
  • Tags
Home/ Questions/Q 4093
Alex Hales
  • 0
Alex HalesTeacher
Asked: June 3, 20222022-06-03T11:55:10+00:00 2022-06-03T11:55:10+00:00

python – Google BigQuery issue in Azure Function Apps

  • 0

[ad_1]

Trying to integrate Google’s BigQuery with Azure Function App but getting error

IMPORTS

import azure.functions as func
from google.cloud import bigquery as bq
import os

CODE

os.environ["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/my/service-account-file.json"
client = bq.Client() # Initiate connection

# Read query
res = client.query("select * from project.dataset.table limit 1")

During execution

Worker failed to function id 4f6bc6a6-21e7-4be2-8d74-7ba865534799.
[2022-06-03T11:36:21.743Z] Result: Failure
Exception: AttributeError: 'NoneType' object has no attribute 'message_types_by_name'
Stack:   File "C:\ProgramData\chocolatey\lib\azure-functions-core-tools-3\tools\workers\python\3.8\WINDOWS\X64\azure_functions_worker\dispatcher.py", line 266, in _handle__function_load_request
    func = loader.load_function(
  File "C:\ProgramData\chocolatey\lib\azure-functions-core-tools-3\tools\workers\python\3.8\WINDOWS\X64\azure_functions_worker\utils\wrappers.py", line 32, in call
    return func(*args, **kwargs)
  File "C:\ProgramData\chocolatey\lib\azure-functions-core-tools-3\tools\workers\python\3.8\WINDOWS\X64\azure_functions_worker\loader.py", line 76, in load_function
    mod = importlib.import_module(fullmodname)
  File "C:\Users\Admin\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "C:\Users\Admin\Projects\rocket_application\source\source-backend-code\payments_v3\__init__.py", line 16, in <module>
    from google.cloud import bigquery
  File "C:\Users\Admin\Projects\rocket_application\source\.env\lib\site-packages\google\cloud\bigquery\__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "C:\Users\Admin\Projects\rocket_application\source\.env\lib\site-packages\google\cloud\bigquery\client.py", line 52, in <module>
    import google.api_core.exceptions as core_exceptions
  File "C:\Users\Admin\Projects\rocket_application\source\.env\lib\site-packages\google\api_core\exceptions.py", line 29, in <module>
    from google.rpc import error_details_pb2
  File "C:\Users\Admin\Projects\rocket_application\source\.env\lib\site-packages\google\rpc\error_details_pb2.py", line 39, in <module>
    _RETRYINFO = DESCRIPTOR.message_types_by_name["RetryInfo"]

When the same is executed with simple python code, it returns the expected results.

[ad_2]

  • 0 0 Answers
  • 33 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report
Leave an answer

Leave an answer
Cancel reply

Browse

Sidebar

Ask A Question

Related Questions

  • xcode - Can you build dynamic libraries for iOS and ...

    • 0 Answers
  • bash - How to check if a process id (PID) ...

    • 8143 Answers
  • database - Oracle: Changing VARCHAR2 column to CLOB

    • 1926 Answers
  • What's the difference between HEAD, working tree and index, in ...

    • 1960 Answers
  • Amazon EC2 Free tier - how many instances can I ...

    • 0 Answers

Stats

  • Questions : 43k

Subscribe

Login

Forgot Password?

Footer

Follow

© 2022 Stackoverflow Point. All Rights Reserved.

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.