Closed priyaananthasankar closed 6 years ago
I tested publishing with a basic HTTP triggered function and the requests
package but the execution fails in Azure. @ahmelsayed - did something change in the base image?
It looks like custom packages are not working on Azure at all. @bala16 is investing the issue.
I can't repro this using the following
requirements.txt
azure-functions==1.0.0a4
azure-functions-worker==1.0.0a4
cycler==0.10.0
grpcio==1.14.2
grpcio-tools==1.14.2
kiwisolver==1.0.1
matplotlib==2.2.3
numpy==1.15.1
protobuf==3.6.1
pyparsing==2.2.0
python-dateutil==2.7.3
pytz==2018.5
six==1.11.0
function/__init__.py
mport logging
import azure.functions as func
import numpy as np
import random
import io
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
def main(req: func.HttpRequest) -> func.HttpResponse:
fig = Figure()
axis = fig.add_subplot(1, 1, 1)
xs = range(100)
ys = [random.randint(1, 50) for x in xs]
axis.plot(xs, ys)
canvas = FigureCanvas(fig)
output = io.BytesIO()
canvas.print_png(output)
return func.HttpResponse(output.getvalue(), mimetype="image/png", status_code=200)
Please share a full repro including the code.
Closing until it's actionable.
I tested on dedicated, but the issue is with consumption. I'll take a look at that
This should be fixed in West US
Requirements.txt
The above succeeds only with --build-native-deps (see Issue https://github.com/Azure/azure-functions-core-tools/issues/719 for issue with PyPI publish)
Runtime Error