You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi ! I was testing this tool but after getting the MainField in the terrain file and executing the "gen_map_gui.py" with LOD 8 to try I'm left with an error and I can't find how to fix it.
Here the error message :
Traceback (most recent call last):
File "C:\BOTWHeightmap_Project\gen_map_gui.py", line 196, in
Main().run()
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\app.py", line 956, in run
runTouchApp()
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\base.py", line 339, in mainloop
self.idle()
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\base.py", line 383, in idle
self.dispatch_input()
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\base.py", line 334, in dispatch_input
post_dispatch_input(*pop(0))
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\base.py", line 302, in post_dispatch_input
wid.dispatch('on_touch_up', me)
File "kivy_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "C:\Users{USER}\AppData\Local\Programs\Python\Python311\Lib\site-packages\kivy\uix\behaviors\button.py", line 179, in on_touch_up
self.dispatch('on_release')
File "kivy_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
File "C:\BOTWHeightmap_Project\gen_map_gui.py", line 138, in generate
self.hmap.generate()
File "C:\BOTWHeightmap_Project\gen_map_gui.py", line 98, in generate
create_image(tl, br, self.lod, str(int(time.time())))
File "C:\BOTWHeightmap_Project\generate_map.py", line 76, in create_image
draw_map(grid_tl, grid_br, detail, img, mdb)
File "C:\BOTWHeightmap_Project\generate_map.py", line 62, in draw_map
draw_grid(grid_tl, (x, y), detail, image, mdb)
File "C:\BOTWHeightmap_Project\generate_map.py", line 40, in draw_grid
h = h.tostring()
^^^^^^^^^^
AttributeError: 'array.array' object has no attribute 'tostring'`
The text was updated successfully, but these errors were encountered:
So it seems like the newer version of Python (since Python 3.9) array.array: tostring() and fromstring() methods have been removed. So I will try to install an older version 3.8.8 and see if it fix.
The error message you encountered is related to the tostring() method, which is no longer available in the array.array module. The tostring() method has been deprecated since Python 3.9.
To fix the error, you can use the modified code snippet:
Hi ! I was testing this tool but after getting the MainField in the terrain file and executing the "gen_map_gui.py" with LOD 8 to try I'm left with an error and I can't find how to fix it.
Here the error message :
The text was updated successfully, but these errors were encountered: