environ is a Clojure library for accessing environment variables
Questions tagged [environ]
52 questions
16
votes
9 answers
django.core.exceptions.ImproperlyConfigured: Set the SECRET_KEY environment variable
This project was working fine until I used environ to make SECRET_KEY and DEBUG as environment variable using environ. After I am getting this error:-
The output is:
(env) E:\ecommercedj>python manage.py runserver
Traceback (most recent call last):
…

Aman Sharma
- 423
- 1
- 4
- 10
13
votes
4 answers
I keep getting the error "ModuleNotFoundError: No module named 'environ' in my settings.py file". I have installed the dependency in my python shell
I keep getting an import error on environ in my settings.py file, I have it installed via poetry in my .venv file as well. Could this be an error outside the settings file possibly?
`
import environ
env = environ.Env(
DEBUG=(bool, False),
…

Corey Marchand
- 149
- 1
- 1
- 4
10
votes
3 answers
What does :provided mean in profiles.clj?
Luminus right now is creating a profiles.clj with this content:
{:provided {:env {;;when set the application start the nREPL server on load
:nrepl-port "7001"
:database-url…

Pablo Fernandez
- 279,434
- 135
- 377
- 622
5
votes
2 answers
How do I put a file path variable into pandas.read_csv?
I tried to apply it through os.environ like so:
import os
import pandas as pd
os.environ["FILE"] = "File001"
df = pd.read_csv('/path/$FILErawdata.csv/')
But pandas doesn't recognize $FILE and instead gives me $FILErawdata.csv not found
Is there…

johntan05
- 105
- 1
- 2
- 9
3
votes
2 answers
error when accessing environment variables in leiningen project.clj with environ
I'm trying -- and failing -- to use environ 1.2.0 to create environment variables for codox inside project.clj.
I have in profiles.clj
{:dev {:env {:doc-dir "/home/me/some/dir"}}}
So far all good: .line-env is correctly created and I can pull the…

gash
- 65
- 7
3
votes
0 answers
Using bash_profile variables in jupyter notebook
I am trying to hide my login credentials creating my variables in my .bash_profile. export var = 'foo' and accessing in jupyter notebook using os.environ.get('var'). The result is None.
In my normal IDE it is easy since my steps are:
> cd
> nano…
3
votes
2 answers
Why the contents of environ in the /proc file system differs from what extern environ pointed to?
getenv() in my C++ apache/cgi gives me weird things, then I checked the environ inside /proc/${PID_OF_THE_RUNNING_PROCESS}, they did not match, which I think they should, I am wondering what was wrong with /proc or it was getenv()?
shell@kernel #…

http8086
- 1,306
- 16
- 37
3
votes
2 answers
ImportError: No module named 'environ' with gunicorn on django
I'm using Ubuntu 14.04 with Django 2.0.5 with Django Cookiecutter. I am trying to start a Django server on DigitalOcean and trying to bind gunicorn to 0.0.0.0:8000. python manage.py runserver works fine, but the issue is that it says it can't import…

Dominic M.
- 873
- 3
- 17
- 34
3
votes
1 answer
How can I use a value in my profiles.clj in another section of my profile/project configuration?
I'm creating a clojure project using Leiningen with environ to keep a uri for managing a database connection in either the projects profiles.clj or an environment variable, and I want to try using lein-flyway to manage db migrations.
Lein-flyway has…

adambaker
- 31
- 5
3
votes
2 answers
How do I get the environment name when using environ in Clojure?
How do I get the environment name when using environ in Clojure? I mean, :dev, :test, etc. The reason for wanting this is to pass it to Yeller so when it displays errors it can tell me which environment they happened into. Errors in staging are…

Pablo Fernandez
- 279,434
- 135
- 377
- 622
2
votes
1 answer
docker-compose up gets stuck at .env doesn't exist
I want to insert environmental variables from an .env file into my containerized Django application, so I can use it to securely set Django's settings.py.
However on $docker-compose up I receive part of an UserWarning which apparently originates in…

da0lli
- 21
- 2
2
votes
3 answers
Is there a way to get a list with variable names in Pyomo?
I wanna append all of my integer-bounded variables into the integer_constraints_list that i've defined. Is there a way to get some sort of list or array with all of my variable names to iterate over the code i made using a for loop?
something like…

Pablo Pablo
- 165
- 10
2
votes
1 answer
Unable to remove env variable from .bash_profile
I have a few problems regarding the use of .bash_profile and Pycharm. I am using mac OS X. I created a new project on pycharm with new environment using virtualenv with base interpreter /usr/local/bin/python3.5.
STEP 1:
I then accessed the…

Daimon
- 77
- 1
- 5
2
votes
1 answer
Can't figure out TZ issue in python
I don't understand how python is calculating time. Seems inconsistent to me.
My server time is:
admin@httstools ~ $ date
Fri Dec 21 17:00:51 PST 2018
In python interpreter I get the expected result (ie 2018-12-21):
admin@httstools ~ $ python
Python…

musca999
- 341
- 2
- 12
2
votes
1 answer
Correct usage of Environ library in profiles
I have a question regarding of the usage of profiles and environment variables. Is it possible to export variables with environ depending on the which profile is set? This is what I have tried (partial project.clj)
:env {:time-to-wait-for-response…

Petr Mensik
- 26,874
- 17
- 90
- 115