gpx-path-issues - a bug-report for v0.2.1
buttoni2020 opened this issue ยท 4 comments
Hi folks,
I experienced some issues with latest version 0.2.1 and that's my story.
That's actually my code-snippet, where I am using PaperMap.
center_ns and center_ew are previously calculatet.
For disssusions, just use:
center_ns = 46.61927739
center_ew = 8.01718411
gpx_track = GPX("2020-07-22_Eiger/20200721-142919.gpx")
pm = PaperMap(center_ns, center_ew, tile_server="OpenStreetMap", size="A4", scale=25000, gpx=gpx_track)
pm.render()
With papermap-master as of sept 10th this script-snippet is working perfect.
With papermap0.2.1 as of yesterday I do receive following error:
Traceback (most recent call last):
File "C:\Users\ryzen-tme\Desktop\Python-Karten\2020-09_Kartenskript.py", line 49, in <module>
pm.render()
File "C:\Users\ryzen-tme\anaconda3\lib\site-packages\papermap\papermap.py", line 404, in render
self.render_gpx()
File "C:\Users\ryzen-tme\anaconda3\lib\site-packages\papermap\papermap.py", line 383, in render_gpx
self.gpx.render_tracks(
File "C:\Users\ryzen-tme\anaconda3\lib\site-packages\papermap\gpx.py", line 120, in render_tracks
lines_image = Image.new(
File "C:\Users\ryzen-tme\anaconda3\lib\site-packages\PIL\Image.py", line 2621, in new
return im._new(core.fill(mode, size, color))
MemoryError
some Try and Error shown at least a hint, that this gpx-handling is causing this MemoryError. Excluding gpx=gpx_track
(#2) from papermap is delivering a Map and PIL is not causing any issues.
As of now and next project-steps, I can deal with this older version, but in general I am not a fan of functionality-reduction and that's the main-reason, why I am writing these lines and hopefully support further development.
My System:
Win 10 (latest version-ish)
32GB RAM
Anaconda3-ish
Spyder 4.1.5 - (Python 3.8)
Feel free to ask any question.
Regards
Thank you for reporting this bug ๐ @buttoni2020! I will look into this and report back to you ๐
After a quick review of the traceback and your system specs, it seems unlikely that you've run out of memory, but still: could you verify that:
- You're using a 64-bit version of Python (verify via
python -c "import sys;print(sys.maxsize > 2**32)"
- You're not actually out of memory (verify via Task Manager or similar)
Could you perhaps also share your GPX-file with me (e.g. via Pastebin or GitHub Gist)? This way I can try to recreate your exact circumstances.
Hi, of course I'll check.
results as follow:
Pyhton-version:
- according to spyder: 3.8.5 64bit
- according to anaconda prompt (with ur line): true
- according to win-cmd (10.0.19042.630) (with ur line): false
--> you have to judge yourself o.O
memory-usage:
- Taskmanager: +100MB, while have a baseline @ 9,5GB (full running system) and 31,5GB detected.
gpx-file is send to your public available email-adress.
I hope these information are helping.
I just released v0.2.2, which fixes this bug. Please update your install of PaperMap (i.e. pip install --upgrade papermap
). Again, thank you for reporting this bug! ๐