arnis icon indicating copy to clipboard operation
arnis copied to clipboard

Memory allocation error

Open kosssst opened this issue 2 years ago • 5 comments

>>> python arnis.py --city "Київ" --state "Київ" --country "Україна" --path "E:/kyiv"
Fetching data...
Chosen server: https://overpass.kumi.systems/api/interpreter
Parsing data...
Traceback (most recent call last):
  File "D:\arnis\arnis.py", line 7, in <module>
    from src.main import run
  File "D:\arnis\src\main.py", line 118, in <module>
    imgarray = processData(rawdata, args)
  File "D:\arnis\src\processData.py", line 56, in processData
    img = np.zeros(
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 275. GiB for an array with shape (1181055, 250396, 1) and data type uint8

Hi, when I try to run this script I catch this error. Can anyone help me?

kosssst avatar Oct 05 '22 14:10 kosssst

obviously you need to buy more RAM

basdvnjksnjksvnsdjknK avatar Oct 05 '22 16:10 basdvnjksnjksvnsdjknK

275 GB?

kosssst avatar Oct 05 '22 17:10 kosssst

Well, buying more RAM obviously isn't the best solution to this problem haha! I will look into this and fix it as soon as possible. In the meantime, try generating smaller cities. Thanks for reporting this issue!

louis-e avatar Oct 07 '22 12:10 louis-e

>>> python arnis.py --city "Київ" --state "Київ" --country "Україна" --path "D:/kyiv"
Fetching data...
Chosen server: https://z.overpass-api.de/api/interpreter
Parsing data...
Traceback (most recent call last):
  File "D:\arnis\arnis.py", line 10, in <module>
    run()
  File "D:\arnis\src\main.py", line 123, in run
    imgarray = processData(rawdata, args)
  File "D:\arnis\src\processData.py", line 150, in processData
    img = np.zeros(
numpy.core._exceptions._ArrayMemoryError: Unable to allocate 269. GiB for an array with shape (1181164, 244972, 1) and data type uint8

@louis-e, I checked commit history and and you pointed out that you improved RAM usage, but problem is still here.

kosssst avatar Oct 19 '22 19:10 kosssst

Mhh okay, thanks for pointing that out. Will look into this. In the meantime you could try to specify the area you want to generate like I described in the https://github.com/louis-e/arnis/issues/16#issuecomment-1292356989 issue. Sorry for the inconvenience, I hope this little workaround helps! @kosssst

louis-e avatar Oct 26 '22 17:10 louis-e

This should be fixed thanks to https://github.com/louis-e/arnis/pull/30, thus I will close this issue as resolved for now.

louis-e avatar May 24 '24 17:05 louis-e