theskumar / theskumar/python-dotenv

Connection string in .env-file not read or parsed properly

Offen
#496 20 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
8.9k
Forks
581
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hi,

I have an azure blob storage connection string stored in my .env file, as follows:

CONNECT_STRING_BLOB="DefaultEndpointsProtocol=https;AccountName=xxxx;AccountKey=asdfasdfasdf/asdfasdfdsafdas/asdfadsfdsaf/ads==;EndpointSuffix=core.windows.net;"

Recently I'm experiencing very spotty behavior where me and/or colleagues on similar setups have different results:
Sometimes parsed as DefaultEndpointsProtocol sometimes as the full connect string.

  • Workaround has been: to replace CONNECT_STRING_BLOB to CONNECTSTRINGBLOB, but implementing this change everywhere is not an option, and more importantly it does not always solves the issue
  • Workaround has been as well to remove "_" and place it back, but that does not work always either.
  • Executing the file with the debugger in VS Code solves the issue somewhat consistently.

Not sure even if this is a python-dotenv issue, but I have litterally no clue anymore where to look as it's so inconsistent and cant seem to find a solution for it.

We have the same requirements file installed, including latest python-dotenv.
Python 3.8.10
Ubuntu-20.04 on WSL1
working in Visual Studio Code (if that even matters)

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Start by reproducing the .env parsing with the shown Azure Blob connection string under Python 3.8.10 on Ubuntu 20.04 in WSL1, comparing normal execution with the VS Code debugger. Check whether the parsed value changes with the variable name or execution context; done means the cause is identified and parsing is consistent, with the behavior verified in a focused regression test.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
azure, python
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

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