kivy-school / kivy-reloader

Hot reload your Kivy app on multiple phones and computer in real-time.
MIT License
16 stars 2 forks source link

hidden object bugs > solution, kivy-reloader ONLY works with the kivyschool setup described at this point in time #45

Open AccelQuasarDragon opened 1 week ago

AccelQuasarDragon commented 1 week ago

bug 1: Traceback (most recent call last): File "F:\CODING\dii.venv\lib\site-packages\kivy_reloader\app.py", line 262, in rebuild importlib.reload(importlib.import_module(self.module)) File "C:\Users\RaptorPatrolCore.pyenv\pyenv-win\versions\3.10.9\lib\importlib__init.py", line 168, in reload raise ModuleNotFoundError(f"spec not found for the module {name!r}", name=name) ModuleNotFoundError: spec not found for the module 'main__'

probably the android fix wasn't sent to windows fix

bug 2: kv is loaded multiples times > multiple widgets show up

how to get it: kv returns a root widget, and build is not an instantiation of a widget if u then load that kv multiple times, u get multiple root widgets stacked on top of each other soln: do not load the kv multiple times

look here:

                    print("unloaded file", event.src_path)
                    Builder.unload_file(event.src_path)
AccelQuasarDragon commented 1 week ago

UH so this is saying that kivy-reloader will fail if using builder.load_string in the app build method.