django-environ icon indicating copy to clipboard operation
django-environ copied to clipboard

"Invalid line" error when line starts with spaces and then a comment follows

Open wimfeijen opened this issue 2 years ago • 1 comments

We use comments, nested with 4 spaces. This works fine in environ 0.4.5 , but now generates an error in environ 0.9.0:

Invalid line: # Domain, without prefix ('www.') and suffix ('.nl'/'.com')

in both .env and the error message, 4 spaces preceed the hashtag. Sorry, I did not succeed in finding the right way to enter four spaces in this edit field.

Thanks for looking into this!

wimfeijen avatar Jun 27 '22 13:06 wimfeijen

@wimfeijen Could you please provide a small .env to reproduce this issue?

sergeyklay avatar Jun 28 '22 08:06 sergeyklay

I tried to fix this in https://github.com/joke2k/django-environ/pull/475

lvanderree avatar May 30 '23 15:05 lvanderree

This was fixed in #475 thanks to @lvanderree. We'll include this in the next release. Thank you for the report, and for helping us make django-environ better.

sergeyklay avatar Jul 06 '23 21:07 sergeyklay