ThomasParistech / pretty-gpx

GPX to Poster: Showcase Your Mountain Cycling or Hiking Adventures
Other
14 stars 4 forks source link

Cant upload large .gpx #2

Open beretor opened 6 days ago

beretor commented 6 days ago

Hello

Super nice project.

I cant upload a large .gpx (25Mo). I suspect this is the expected behaviour but there is little info about it. (There is a small warning icon next to the file but no clear info about it)

Screenshot 2024-09-11 at 15 41 13
ThomasParistech commented 6 days ago

I kept the max_total_size property of the drag&drop nicegui.upload element to None, so it shouldn't be a problem. But sometimes it fails to upload the file... Most of the time, clearing it and feeding it again works, give it a try!

I should add a clearer warning about it (or write a github issue on nicegui's repo)

Can you send me the GPX ?

beretor commented 6 days ago

Understood. I tried a few times and it still fails. it doesnt even start.

here is the gpx: https://drive.google.com/file/d/1y4Du9VE8jJe6BkkTUvoo9Ohgzueo7QtR/view?usp=drive_web

ThomasParistech commented 6 days ago

What a race!! :exploding_head:

I can't reproduce the error you get during the upload... I'd recommend to close all the tabs of your browser and restart the app.

I didn't expected such large tracks, when i ran it the app had issues because of the large number of Digital Elevation Model tiles required to represent the background.

I'll find a way to optimize the memory footprint :eyes:

beretor commented 5 days ago

yes. wrote the issue just to be able to flex ;-)

joke aside, you were correct about restarting chrome. now it uploads but indeed crashes while trying to display it

just for reference:

A child process terminated abruptly, the process pool is not usable anymore Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/nicegui/events.py", line 417, in wait_for_result await result File "/workspaces/pretty-gpx/pretty_gpx/main.py", line 55, in on_multi_upload await _on_upload(contents, msg) File "/workspaces/pretty-gpx/pretty_gpx/main.py", line 39, in _on_upload cache = await run.cpu_bound(process_files, contents, PAPER_SIZES[safe(paper_size_mode_toggle.value)]) File "/usr/local/lib/python3.10/site-packages/nicegui/run.py", line 69, in cpu_bound return await _run(process_pool, safe_callback, callback, *args, **kwargs) File "/usr/local/lib/python3.10/site-packages/nicegui/run.py", line 52, in _run return await loop.run_in_executor(executor, partial(callback, *args, **kwargs)) File "uvloop/loop.pyx", line 2729, in uvloop.loop.Loop.run_in_executor File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 720, in submit raise BrokenProcessPool(self._broken) concurrent.futures.process.BrokenProcessPool: A child process terminated abruptly, the process pool is not usable anymore