[Tutor] I Have An Error OS: Windows 10 Python: 3.7 thanks for the help

Alan Gauld alan.gauld at yahoo.co.uk
Wed Jun 24 16:56:50 EDT 2020


On 24/06/2020 21:45, Samuele wrote:
> i start to learn kivy i do the first start but i have an error
> i have 2 files the code is below :

Since there is almost no Python there it is hard to see what
the error might be unless you know kivy.

This is really a kivy issue and you will probably get a
better response asking on the kivy forum.

https://kivy.org/#forum

HTH,

Alan G.

> 
> the Kivy code is :
> 
> <MainWindow>:
>     BoxLayout:
>             id: main_box
>             orientation: "vertical"
> 
> 
> the Python code is :
> 
> from kivy.app import App
> from kivy.uix.boxlayout import BoxLayout
> 
> 
> class MainWindow(BoxLayout):
>     pass
> 
> 
> class MainApp(App):
>     def build(self):
>         return MainWindow()
> 
> 
> sample_app = MainApp()
> sample_app.run()
> 
> 
> 
> 
> 
> this is the error :
> [INFO   ] [Logger      ] Record log in
> C:\Users\marti\.kivy\logs\kivy_20-06-24_26.txt
> [INFO   ] [Kivy        ] v1.11.1
> [INFO   ] [Kivy        ] Installed at
> "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\__init__.py"
> [INFO   ] [Python      ] v3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51)
> [MSC v.1914 64 bit (AMD64)]
> [INFO   ] [Python      ] Interpreter at
> "C:\Users\marti\PycharmProjects\Project [Atom]\venv\Scripts\python.exe"
> [INFO   ] [Factory     ] 184 symbols loaded
> [INFO   ] [Image       ] Providers: img_tex, img_dds, img_gif (img_sdl2,
> img_pil, img_ffpyplayer ignored)
>  Traceback (most recent call last):
>    File "C:/Users/marti/PycharmProjects/Test Kivy/main.py", line 15, in
> <module>
>      sample_app.run()
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\app.py", line 828, in run
>      self.load_kv(filename=self.kv_file)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\app.py", line 599, in load_kv
>      root = Builder.load_file(rfilename)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\builder.py", line 301, in load_file
>      return self.load_string(data, **kwargs)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\builder.py", line 368, in
> load_string
>      parser = Parser(content=string, filename=fn)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\parser.py", line 401, in __init__
>      self.parse(content)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\parser.py", line 510, in parse
>      objects, remaining_lines = self.parse_level(0, lines)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\parser.py", line 614, in parse_level
>      level + 1, lines[i:], spaces)
>    File "C:\Users\marti\PycharmProjects\Project
> [Atom]\venv\lib\site-packages\kivy\lang\parser.py", line 673, in parse_level
>      if current_property[:3] == 'on_':
>  TypeError: 'NoneType' object is not subscriptable
> 
> Process finished with exit code 1
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor
> 


-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos




More information about the Tutor mailing list