9

`

PS C:\Users\yoyoma207\Documents\UPriderfinder\up-ride-finder> py manage.py runserver
Traceback (most recent call last):
  File "manage.py", line 23, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\ma
y", line 367, in execute_from_command_line
    utility.execute()
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\core\ma
y", line 316, in execute
    settings.INSTALLED_APPS
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\conf\__
, in __getattr__
    self._setup(name)
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\conf\__
, in _setup
    self._wrapped = Settings(settings_module)
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\django\conf\__
, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", line
ule
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:\Users\yoyoma207\Documents\UPriderfinder\up-ride-finder\config\settings\local.py", line 15,
    from .common import *  # noqa
  File "C:\Users\yoyoma207\Documents\UPriderfinder\up-ride-finder\config\settings\common.py", line 13
    import environ
  File "C:\Users\yoyoma207\AppData\Local\Programs\Python\Python35-32\lib\site-packages\environ.py", l
    raise ValueError, "No frame marked with %s." % fname
                    ^
SyntaxError: invalid syntax`

Been trying to start a new Django project using Python 3.5 but I just cannot figure out what is causing this problem, maybe it's because of where my environ.py is stored? I'm really not sure, all help is appreciated!

2 Answers 2

42

Install 'django-environ', not 'environ'

Sign up to request clarification or add additional context in comments.

1 Comment

Solved it for me. I didn't have to uninstall environ, manage.py got past the import line just fine.
-2

That syntax is no longer supported in Python 3. Use:

raise ValueError("No frame marked with %s." % fname)

1 Comment

This is a 3rd-party package, and in this case, the wrong package.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.