louis-e / arnis

Arnis - Generate cities from real life in Minecraft
GNU General Public License v3.0
260 stars 18 forks source link

Memory allocation error #8

Closed kosssst closed 3 months ago

kosssst commented 1 year ago
>>> 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?

basdvnjksnjksvnsdjknK commented 1 year ago

obviously you need to buy more RAM

kosssst commented 1 year ago

275 GB?

louis-e commented 1 year ago

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!

kosssst commented 1 year ago
>>> 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.

louis-e commented 1 year ago

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 commented 3 months ago

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