Closed
Bug 1420918
Opened 7 years ago
Closed 7 years ago
TypeError: argument of type 'Env' is not iterable
Categories
(Tree Management :: Treeherder, defect)
Tree Management
Treeherder
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: armenzg, Unassigned)
Details
The instructions do not mention anything about setting the DYNO env:
https://treeherder.readthedocs.io/installation.html#starting-a-local-treeherder-instance
What can I do?
vagrant ~/treeherder $ ./manage.py runserver
Traceback (most recent call last):
File "./manage.py", line 11, in <module>
execute_from_command_line(sys.argv)
File "/home/vagrant/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 363, in execute_from_command_line
utility.execute()
File "/home/vagrant/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 307, in execute
settings.INSTALLED_APPS
File "/home/vagrant/python/lib/python2.7/site-packages/django/conf/__init__.py", line 56, in __getattr__
self._setup(name)
File "/home/vagrant/python/lib/python2.7/site-packages/django/conf/__init__.py", line 41, in _setup
self._wrapped = Settings(settings_module)
File "/home/vagrant/python/lib/python2.7/site-packages/django/conf/__init__.py", line 110, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/home/vagrant/python/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/home/vagrant/treeherder/treeherder/config/settings.py", line 634, in <module>
if 'DYNO' in env:
TypeError: argument of type 'Env' is not iterable
vagrant ~/treeherder $
Comment 1•7 years ago
|
||
The DYNO environment variable isn't intended to be set locally.
runserver works for me locally:
"""
$ ./manage.py runserver
Performing system checks...
System check identified no issues (0 silenced).
November 27, 2017 - 15:45:33
Django version 1.11.7, using settings 'treeherder.config.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
"""
What does `pip show django-environ` say?
Have you run `vagrant provision` recently?
Flags: needinfo?(armenzg)
Comment 2•7 years ago
|
||
Yeah looks like your Vagrant environment hadn't run provision since treeherder updated to django-environ 0.4.4 on 2017-08-21:
https://github.com/mozilla/treeherder/pull/2723
...so doesn't have the `VAR in env` feature added by:
https://github.com/joke2k/django-environ/pull/140
If you run `vagrant provision`, this error will go away.
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: needinfo?(armenzg)
Resolution: --- → INVALID
Comment 3•7 years ago
|
||
I've filed bug 1420941 for seeing if we can make it easier for people to remember to run vagrant provision regularly.
Assignee | ||
Updated•3 years ago
|
Component: Treeherder: Docs & Development → TreeHerder
You need to log in
before you can comment on or make changes to this bug.
Description
•