Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrading to a newer version not working #34

Closed
tommasoltrz opened this issue May 26, 2017 · 12 comments
Closed

Upgrading to a newer version not working #34

tommasoltrz opened this issue May 26, 2017 · 12 comments

Comments

@tommasoltrz
Copy link
Collaborator

when I run
sudo -H -u labadmin ../venv/bin/pip install https://github.com/OfficineArduinoTorino/LabAdmin/archive/v0.4.0.zip

I get
Traceback (most recent call last): File "../venv/bin/pip", line 11, in <module> sys.exit(main()) File "/var/www/labadmin/venv/lib/python3.5/site-packages/pip/__init__.py", line 215, in main locale.setlocale(locale.LC_ALL, '') File "/usr/lib/python3.5/locale.py", line 594, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

Could you please paste the output of ../venv/bin/pip --version?

@tommasoltrz
Copy link
Collaborator Author

pip 8.1.1 from /var/www/labadmin/venv/lib/python3.5/site-packages (python 3.5)

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

Please do ../venv/bin/pip install --upgrade pip and retry to install the upgrade.

@tommasoltrz
Copy link
Collaborator Author

when I run
../venv/bin/pip install --upgrade pip and

I get
Traceback (most recent call last): File "../venv/bin/pip", line 11, in <module> sys.exit(main()) File "/var/www/labadmin/venv/lib/python3.5/site-packages/pip/__init__.py", line 215, in main locale.setlocale(locale.LC_ALL, '') File "/usr/lib/python3.5/locale.py", line 594, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

Which version of pip is now installed?

@tommasoltrz
Copy link
Collaborator Author

The same as before.
May the problem be that I am in the wrong folder?

I'm running commands from here:
/var/www/labadmin/labadmin

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

You really have to fix the locales (as superuser) of the machine then as pip is not even able to upgrade itself. That error has been made non fatal in pip 8.1.2.

@tommasoltrz
Copy link
Collaborator Author

uhmm, any idea on how to do this?
I've tried with sudo locale-gen "it_IT.UTF-8"
and sudo dpkg-reconfigure locales

but nothing changed

@tommasoltrz
Copy link
Collaborator Author

I solved the issue with locale and completed the installation. but now when I click on a user profile i get this:

screen shot 2017-05-26 at 19 04 37

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

Did sudo -H -u labadmin ../venv/bin/python manage.py migrate returned any error?

@tommasoltrz
Copy link
Collaborator Author

I got this error using the command sudo -H -u labadmin ../venv/bin/python manage.py collectstatic :

File "manage.py", line 22, in <module> execute_from_command_line(sys.argv) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line utility.execute() File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/core/management/base.py", line 294, in run_from_argv self.execute(*args, **cmd_options) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/core/management/base.py", line 345, in execute output = self.handle(*args, **options) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 193, in handle collected = self.collect() File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 124, in collect handler(path, prefixed_path, storage) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 349, in copy_file if not self.delete_file(path, prefixed_path, source_storage): File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 255, in delete_file if self.storage.exists(prefixed_path): File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/core/files/storage.py", line 394, in exists return os.path.exists(self.path(name)) File "/var/www/labadmin/venv/lib/python3.5/site-packages/django/contrib/staticfiles/storage.py", line 49, in path raise ImproperlyConfigured("You're using the staticfiles app " django.core.exceptions.ImproperlyConfigured: You're using the staticfiles app without having set the STATIC_ROOT setting to a filesystem path.

but now it seem to be working fine on the front end...

@xrmx
Copy link
Collaborator

xrmx commented May 26, 2017

It works because you previously forget to run migrations which updates the database to match the code.

The next error is because your installation differs from the tutorial as it's using the django builtin runserver instead of gunicorn so you don't need to run staticfiles. If user's image upload is not working you'll probably need something like these:
889d9e0#diff-ecfc8407f6ffb94bfe056d82854abe80
889d9e0#diff-b5779d9d37148b123f51392efda6409a

Closing as there's nothing actionable to do on labadmin.

@xrmx xrmx closed this as completed May 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants