Azure / azure-functions-python-worker

Python worker for Azure Functions.
http://aka.ms/azurefunctions
MIT License
335 stars 103 forks source link

[BUG] Invalid requirement: snowflake-connector-python[pandas] #1100

Closed c56444 closed 2 years ago

c56444 commented 2 years ago

Investigative information

Please provide the following:

Repro steps

Provide the steps required to reproduce the problem:

Expected behavior

Provide a description of the expected behavior.

Function successfully updates a snowflake table

Actual behavior

Provide a description of the actual behavior observed.

After execution, the function fails indicating: Exception while executing function: Functions.SNOWExample Result: Failure Exception: ProgrammingError: 255002: 255002: Optional dependency: 'pandas' is not installed, please see the following link for install instructions: https://docs.snowflake.com/en/user-guide/python-connector-pandas.html#installation -->

Known workarounds

Provide a description of any known workarounds.

Contents of the requirements.txt file:

Provide the requirements.txt file to help us find out module related issues.

Related information

Provide any related information
c56444 commented 2 years ago

Repro steps

  1. Create VS Code project
  2. install requirements.txt
  3. execute locally (success)
  4. deploy to resource group
  5. trigger using ADF

Known workarounds: Use native pandas instead of snowflake connector pandas

requirements.txt azure-functions

Generated on: Python 3.9.13

asn1crypto==1.5.1 certifi==2022.6.15 cffi==1.15.1 charset-normalizer==2.1.1 cryptography==36.0.2 filelock==3.8.0 idna==3.3 oscrypto==1.3.0 pycparser==2.21 pycryptodomex==3.15.0 PyJWT==2.4.0 pyOpenSSL==22.0.0 pytz==2022.2.1 requests==2.28.1 typing_extensions==4.3.0 urllib3==1.26.12 snowflake-connector-python==2.7.12 pandas sqlalchemy snowflake-sqlalchemy snowflake-connector-python[pandas]

ramya894 commented 2 years ago

@c56444 Would it be possible to share a simple repo to reproduce this issue, so that we can investigate the issue easily.

c56444 commented 2 years ago

I discovered that having 2 snowflake connector entries in the requirements.txt file, caused the issue. I removed both and replaced them with, snowflake-connector-python[pandas]==2.7.12. This loads all the required snowflake packages.