diff --git a/helpers.py b/helpers.py index c3abe90e..fcdb286d 100644 --- a/helpers.py +++ b/helpers.py @@ -35,7 +35,16 @@ import requests from bs4 import BeautifulSoup import pandas as pd import openai -from openai.error import AuthenticationError, OpenAIError, RateLimitError, APIError, Timeout, InvalidRequestError, ServiceUnavailableError +# NEU: Fehlerklassen werden direkt von openai importiert +from openai import ( + AuthenticationError, + OpenAIError, + RateLimitError, + APIError, + Timeout, + InvalidRequestError, + APIConnectionError, # ServiceUnavailableError ist oft APIConnectionError +) from config import (Config, BRANCH_MAPPING_FILE, URL_CHECK_MARKER, USER_AGENTS, LOG_DIR) # Optionale Bibliotheken