Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Unable to upgrade - then points don't show up #4

Open
arthurlutz opened this issue Nov 19, 2018 · 9 comments
Open

Unable to upgrade - then points don't show up #4

arthurlutz opened this issue Nov 19, 2018 · 9 comments

Comments

@arthurlutz
Copy link

2018-11-19 13:00:53,564: WARNING - unable to upgrade apps: [Errno 5] File does not exist: '/var/cache/yunohost/from_file/shsd_ynh-73ab2c0b7b0dcf9aac846ca09583004a865180d1/scripts/upgrade'
2018-11-19 13:00:53,567: ERROR - Unable to upgrade some applications

The application is still listed and works partially : the map shows, the list on the bottom right too, but the points don't show. Looking at firefox network tab I see that /shsd/api/getGeoJSON sends back a 500.

I can try to get the python error if you have an easy way to debug this.

@arthurlutz
Copy link
Author

cc @anmol26s who is helping me resolve other upgrade errors which happened during the same upgrade attempt (YunoHost-Apps/shaarli_ynh#38 and YunoHost-Apps/peertube_ynh#58)

@flesueur
Copy link
Contributor

Hello and thanks for your interest,

SHSD currently has no upgrade procedure (it is definitely a problem, I hope to have time to solve it in the following weeks...)

Can you try to remove and then reinstall SHSD ?

@anmol26s
Copy link

This app is actually very interesting. It would be awesome if this could be implemented with other apps too.
Thanks to @flesueur for doing this app.

@flesueur
Copy link
Contributor

Thanks @anmol26s ! What do you mean by "implemented with other apps too" ? If you mean to monitor access to other apps and if you have suggestions/wishes, please post an enhancement request on the main SHSD project : https://github.com/dynamid/shsd/issues

I'll be glad to add it !

@flesueur
Copy link
Contributor

Hi @arthurlutz,

I added a (very basic) upgrade procedure. A fresh install also worked on my test system.
Have you tried to reinstall SHSD ? Is it working again ?

@arthurlutz
Copy link
Author

Sorry for the lag. Reinstalling does not improve the situation. No points after remove and add.

@arthurlutz
Copy link
Author

Launching from the shell gives me this traceback :

[2019-02-13 12:20:02,845] ERROR in app: Exception on /api/getGeoJSON [GET]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/www/shsd/core/shsd.py", line 234, in getGeoJSON
    as_color = getASColor(row[accounts.c.ip_as],row[accounts.c.login])
  File "/var/www/shsd/core/shsd.py", line 192, in getASColor
    as_color = as_colorlist[id]
IndexError: list index out of range

@arthurlutz
Copy link
Author

When getting the shsd.py from upstream, I get :

[2019-02-13 17:21:35,756] ERROR in app: Exception on / [GET]
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1982, in wsgi_app
    response = self.full_dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1614, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1517, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/usr/lib/python3/dist-packages/flask/_compat.py", line 33, in reraise
    raise value
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1612, in full_dispatch_request
    rv = self.dispatch_request()
  File "/usr/lib/python3/dist-packages/flask/app.py", line 1598, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "/var/www/shsd/core/shsd.py", line 39, in index
    return render_template('index.html', user=getCurrentUser() , center_map=getAvgPositions(getCurrentUser()), colors_to_print=getColorsFromDB(getCurrentUser())) #  geojson="api/getGeoJSON" #url_for('getGeoJSON'),
  File "/var/www/shsd/core/shsd.py", line 206, in getColorsFromDB
    color['color'] = as_colorlist[row[ascolors.c.id_color]]
IndexError: list index out of range

Maybe I should reset the database file ?

@flesueur
Copy link
Contributor

Hi,

Yes, you should try to reset the database :

systemctl stop shsd
rm var/lib/shsd/database.db
systemctl start shsd

This database is not removed when you uninstall SHSD so it might do the trick. Still, this traceback is of course not expected behavior :(

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants