JuliaPy / JuliaPy/PythonCall.jl

PythonCall.jl how do I handle Python exceptions?

Offen
#388 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
question
Vorherrschende Sprache
Julia
Sterne
1.1k
Forks
86
Ø Merge
1 T. 22 Std.
Gemergte PRs (30 T.)
3

Beschreibung

Using [PythonCall.jl](https://github.com/JuliaPy/PythonCall.jl), how do I best handle python exception patters such as the following python:

```
try:
database = client.create_database(DATABASE_NAME)
except exceptions.CosmosResourceExistsError:
database = client.get_database_client(DATABASE_NAME)
```

[xref stackoverflow](https://stackoverflow.com/questions/77333648/julia-pythoncall-jl-how-do-i-handle-python-exceptions)

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

The issue points to PythonCall.jl and a linked Stack Overflow question; start by reviewing PythonCall.jl's exception-handling API and the referenced Python example. Document how to catch the specified Python exception and perform the fallback, with a clear usage example as the completion criterion.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
julia, python
Bereich
tooling
Issue-Typ
Dokumentation
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
30/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.