Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

python-dotenv cannot parse valid bash value with a single quote "escaped" inside single quotes

Open
#544 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
bash, python
Domain
tooling

Research direction

Reproduce the issue by placing the shown VAR assignment in a .env file and running the mentioned dotenv list command. Start by tracing the dotenv parser used by that command and add or find parser tests for quoted values. Done means the line is accepted and the resulting value is I'm a student.

Written by the indexing model from the issue text.

Description

Problem

This is a valid bash ENV excerpt which escapes a single quote inside value surrounded by singles quotes (see this SO comment)

❯ VAR='I'"'"'m a student'
❯ echo $VAR
I'm a student

However python dotenv cannot parse this value. Assume that .env file is created with VAR='I'"'"'m a student' line inside

❯ dotenv list
Python-dotenv could not parse statement starting at line 1
Dominant language
Python
Stars
8.9k
Forks
581
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from theskumar/python-dotenv

All issues in theskumar/python-dotenv

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.