C
C#2w ago
Relevant

Aspire python app giving certificate errors when debugging

So I followed the guide here https://learn.microsoft.com/en-us/dotnet/aspire/get-started/build-aspire-apps-with-python?tabs=powershell And after adding the following code:
trace.set_tracer_provider(TracerProvider())
otlpExporter = OTLPSpanExporter()
processor = BatchSpanProcessor(otlpExporter)
trace.get_tracer_provider().add_span_processor(processor)

FlaskInstrumentor().instrument_app(app)

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
trace.set_tracer_provider(TracerProvider())
otlpExporter = OTLPSpanExporter()
processor = BatchSpanProcessor(otlpExporter)
trace.get_tracer_provider().add_span_processor(processor)

FlaskInstrumentor().instrument_app(app)

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
I now get the error ssl_transport_security.cc:1654] Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED I also added "ASPIRE_ALLOW_UNSECURED_TRANSPORT": "true" to the launchSettings.json, but that doesn't help. Any tips?
Orchestrate Python apps in .NET Aspire - .NET Aspire
Learn how to integrate Python apps into a .NET Aspire app host project.
3 Replies
Mayor McCheese
Did you try a dotnet dev-certs https --trust?
Relevant
RelevantOP2w ago
I had not, but did that and still getting the same error. Thank you for the suggestion, though. I don't really know anything about how certificates work I found that if I pip uninstall opentelemetry-exporter-otlp-proto-grpc the error goes away. Not sure if that's a clue, but it seems related to that package interesting. Got it working. Not sure how yet, but I found another sample project and used the launchSettings from that one and it worked. So there must have been some important difference, I'll comb through it now to see if I can see what it was, but at least I got it working 🙂
Mayor McCheese
👍
Want results from more Discord servers?
Add your server