Error when trying to run django application
Question: Trying to install 'Django-inventory' from <https://github.com/rosarior/django-
inventory>

After resolving dependency errors im getting this:

    
    
        (inventory)root@ip-172-31-47-17:/home/admin# django-inventory.py runserver
    Traceback (most recent call last):
      File "/home/admin/inventory/bin/django-inventory.py", line 10, in <module>
        execute_from_command_line(sys.argv)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
        utility.execute()
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 392, in execute
        self.fetch_command(subcommand).run_from_argv(self.argv)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
        commands = get_commands()
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 107, in get_commands
        apps = settings.INSTALLED_APPS
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 54, in __getattr__
        self._setup(name)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 49, in _setup
        self._wrapped = Settings(settings_module)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/conf/__init__.py", line 128, in __init__
        mod = importlib.import_module(self.SETTINGS_MODULE)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django/utils/importlib.py", line 40, in import_module
        __import__(name)
      File "/home/admin/inventory/local/lib/python2.7/site-packages/django_inventory/settings/local.py", line 4
        SECRET_KEY = '@PK$vmu_W@=^hYy\<hwYKDX.)eX5-MAlsYJ?Y-v5EbRC7KZ)5CSg:bS2^?RJi/S@$j%L9Tc9^2j&&$<o)xpr.v?uiwvsT%d9sq;\'
                                                                                                                          ^
    SyntaxError: EOL while scanning string literal
    (inventory)root@ip-172-31-47-17:/home/admin#
    

Appreciate any pointers to resolving this.


Answer: The final backslash in your SECRET_KEY is escaping the close single quote.
Remove it.

