← All tasks
pythonsendgrid/sendgrid-python #913Not a task: not reproduced

6.4.0 version throws exceptions in Azure Functions

envgap__sendgrid__sendgrid-python-913

01 / FAILURE SIGNATURE

As reported upstream

3. Exception is thrown: "Result: Failure Exception: ModuleNotFoundError: No module named 'ellipticcurve'."
Not a benchmark task.
  • In a clean container the reported failure did not reproduce, or the known fix did not make the project run.

02 / ENVIRONMENT RECIPE

Base commit
c0d09c911a510054c61c97ebd4c9105fae478334
Manifest
setup.py
Reproduce
Awaiting issue-specific recipe
Run under trace
Awaiting a meaningful runtime command

03 / ORIGINAL ISSUE TEXT

sendgrid/sendgrid-python #913 · read the original issue
<!--

If this is a feature request, make sure you search Issues for an existing request before creating a new one!

-->



### Issue Summary

Our code which was working with the last version of SendGrid throws exception about "No module named 'ellipticcurve' when Azure Python Function is invoked.



### Steps to Reproduce

1. Deploy to Azure using requirements.txt (either sendgrid or sendgrid==6.4.0)

2. Invoke Azure Function that imports SendGridAPIClient 

3. Exception is thrown: "Result: Failure Exception: ModuleNotFoundError: No module named 'ellipticcurve'."



### Code Snippet

from sendgrid import SendGridAPIClient

from sendgrid.helpers.mail import Mail

import logging

import os

...

...

...



### Exception/Log

```

Result: Failure Exception: ModuleNotFoundError: No module named 'ellipticcurve'. 



Troubleshooting Guide: https://aka.ms/functions-modulenotfound

Stack: 

File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/dispatcher.py", line 259, in _handle__function_load_request func_request.metadata.entry_point)

File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 31, in call raise extend_exception_message(e, message)

File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/utils/wrappers.py", line 29, in call return func(*args, **kwargs)

File "/azure-functions-host/workers/python/3.7/LINUX/X64/azure_functions_worker/loader.py", line 73, in load_function mod = importlib.import_module(fullmodname) 

File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level)

File "/home/site/wwwroot/MyTesting/__init__.py", line 19, in <module> from .sendgrid import sendemail

File "/home/site/wwwroot/MyTesting/sendgrid/sendemail.py", line 1, in <module> from sendgrid import SendGridAPIClient

File "/home/site/wwwroot/.python_packages/lib/site-packages/sendgrid/__init__.py", line 21, in <module> from .helpers.eventwebhook import * # noqa

File "/home/site/wwwroot/.python_packages/lib/site-packages/sendgrid/helpers/eventwebhook/__init__.py", line 1, in <module> from ellipticcurve.ecdsa import Ecdsa



```



### Technical details:

* sendgrid-python version: 6.4.0

* python version: 3.7



Continue on GitHub ↗

04 / LABELS

Labels from the report text only; not yet run

No supported category has been assigned.

Label rules and the text that matched
[]