theskumar / theskumar/python-dotenv
Connection string in .env-file not read or parsed properly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
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_BLOBtoCONNECTSTRINGBLOB, 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)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
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.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100