FAI-CIVL / FAI-Airscore

AirScore - online paragliding / hanggliding GAP-based scoring software.
https://airscore.cc/
GNU General Public License v3.0
13 stars 17 forks source link

No such directory data/map-objects/tasks. #186

Closed philderbeast closed 3 years ago

philderbeast commented 3 years ago

I just updated to a279e3e29077590ec5d4f9501b601b6e62912644 and encountered this clicking on the one competition I'd imported previously, Forbes Flatlands 2018. This is from the "public website" view, not the admin one.

https://github.com/FAI-CIVL/FAI-Airscore/blob/0c01988d5950bfc04de63ea03d96f91bd4d3a95c/airscore/core/task.py#L1650

File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 2464, in __call__
return self.wsgi_app(environ, start_response)
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 2450, in wsgi_app
response = self.handle_exception(e)
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1867, in handle_exception
Open an interactive python shell in this framereraise(exc_type, exc_value, tb)
File "/home/sid/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/sid/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/sid/.local/lib/python3.8/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/sid/.local/lib/python3.8/site-packages/flask_debugtoolbar/__init__.py", line 125, in dispatch_request
return view_func(**req.view_args)
File "/app/airscore/public/views.py", line 407, in ext_competition
wpt_coords, turnpoints, short_route, goal_line, tolerance, bbox, _, _ = get_map_json(task['id'])
File "/app/airscore/core/task.py", line 1625, in get_map_json
write_map_json(task_id)
File "/app/airscore/core/task.py", line 1650, in write_map_json
file_path.mkdir(mode=0o755)
File "/usr/local/lib/python3.8/pathlib.py", line 1279, in mkdir
self._accessor.mkdir(self, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/app/airscore/data/map-objects/tasks'
kuaka commented 3 years ago

@biuti correct me if I am wrong.

@philderbeast I think that due to the latest commits the import comp process now creates these files as if the comp was internal and not imported (there is a choice when importing) so since you imported this comp before these latest commits you would need to reimport now for this to work.

biuti commented 3 years ago

Yes exactly. Some logics changed to uniform as much as possible normal and imported comps, so now importing an FSDB file it will create all results files as for a normal event, so before posting bugs please delete old events and import again. thanks

biuti commented 3 years ago

By the way I just pushed a new Task / Comp scoring admin page, I'd be very happy to have your opinion @philderbeast and @kuaka as it was one of the things we knew that had to be revised and I think now it is quite ok.

philderbeast commented 3 years ago

I think that due to the latest commits the import comp process now creates these files as if the comp was internal and not imported (there is a choice when importing) so since you imported this comp before these latest commits you would need to reimport now for this to work.

I blew everything away and started afresh, side-stepping the problem. Good to have an explanation, thanks.