Jun-16-2023, 07:12 PM
(Jun-16-2023, 04:59 PM)deanhystad Wrote: The error says it cannot find a module named "kivymd". Did you install kivymd? Installing kivy does not install kivymd.
When you type "pip list" in a command shell, does it list kivymd?
I tried to change code to:
[python][
from kivymd.app import MDApp
from kivy_garden.mapview import MapView
class MyApp(MDApp):
def build(self):
mapview = MapView(zoom=10, Lat=36, Lon=-115)
return mapview
MyApp().run()
/python]
Got this error:
Error:C:\Users\jan-e>python d:\mapfiler\map.py
[INFO ] [Logger ] Record log in C:\Users\jan-e\.kivy\logs\kivy_23-06-16_21.txt
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.3.3
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.3.1
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.6.0
[INFO ] [Kivy ] v2.2.0
[INFO ] [Kivy ] Installed at "D:\Python311\Lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.11.4 (tags/v3.11.4:d2340ef, Jun 7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "D:\Python311\python.exe"
[INFO ] [Logger ] Purge log fired. Processing...
[INFO ] [Logger ] Purge finished!
[INFO ] [KivyMD ] 1.1.1, git-Unknown, 2023-06-16 (installed at "D:\Python311\Lib\site-packages\kivymd\__init__.py")
[INFO ] [Factory ] 190 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: sdl2
[INFO ] [Window ] Provider: sdl2
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] GLEW initialization succeeded
[INFO ] [GL ] Backend used <glew>
[INFO ] [GL ] OpenGL version <b'4.6.0 NVIDIA 531.79'>
[INFO ] [GL ] OpenGL vendor <b'NVIDIA Corporation'>
[INFO ] [GL ] OpenGL renderer <b'NVIDIA GeForce GTX 1070 Ti/PCIe/SSE2'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 NVIDIA'>
[INFO ] [GL ] Texture max size <32768>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
Traceback (most recent call last):
File "kivy\_event.pyx", line 235, in kivy._event.EventDispatcher.__init__
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "d:\mapfiler\map.py", line 16, in <module>
MyApp().run()
File "D:\Python311\Lib\site-packages\kivy\app.py", line 955, in run
self._run_prepare()
File "D:\Python311\Lib\site-packages\kivy\app.py", line 925, in _run_prepare
root = self.build()
^^^^^^^^^^^^
File "d:\mapfiler\map.py", line 14, in build
mapview = MapView(zoom=10, Lat=36, Lon=-115)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Python311\Lib\site-packages\kivy_garden\mapview\view.py", line 560, in __init__
super().__init__(**kwargs)
File "D:\Python311\Lib\site-packages\kivy\uix\widget.py", line 357, in __init__
super(Widget, self).__init__(**kwargs)
File "kivy\_event.pyx", line 238, in kivy._event.EventDispatcher.__init__
TypeError: Properties ['Lat', 'Lon'] passed to __init__ may not be existing property names. Valid properties are ['_pause', '_zoom', 'animation_duration', 'background_color', 'bbox', 'cache_dir', 'center', 'center_x', 'center_y', 'children', 'cls', 'delta_x', 'delta_y', 'disabled', 'double_tap_zoom', 'height', 'ids', 'lat', 'lon', 'map_source', 'motion_filter', 'opacity', 'parent', 'pause_on_action', 'pos', 'pos_hint', 'right', 'size', 'size_hint', 'size_hint_max', 'size_hint_max_x', 'size_hint_max_y', 'size_hint_min', 'size_hint_min_x', 'size_hint_min_y', 'size_hint_x', 'size_hint_y', 'snap_to_zoom', 'top', 'width', 'x', 'y', 'zoom']
C:\Users\jan-e>