Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: float() argument must be a string or a number #12

Open
Molverin00 opened this issue Jul 31, 2018 · 1 comment
Open

TypeError: float() argument must be a string or a number #12

Molverin00 opened this issue Jul 31, 2018 · 1 comment

Comments

@Molverin00
Copy link

I managed to follow the installation guide but i had this error that makes the window crash right after launch
I am using the Raspbian x86 OS to test this program.

Any hint or help will be appreciated.
Thank you in advance

[INFO ] [Logger ] Record log in /home/pi/.kivy/logs/kivy_18-07-31_3.txt
[INFO ] [Kivy ] v1.11.0.dev0, git-5bb2c13, 20180730
[INFO ] [Python ] v2.7.13 (default, Nov 24 2017, 17:33:09)
[GCC 6.3.0 20170516]
[INFO ] [Factory ] 195 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil, img_gif (img_ffpyplayer ignored)
[INFO ] [Text ] Provider: pil(['text_sdl2'] ignored)
[INFO ] [Window ] Provider: sdl2(['window_egl_rpi'] ignored)
[INFO ] [GL ] Using the "OpenGL" graphics system
[INFO ] [GL ] Backend used
[INFO ] [GL ] OpenGL version <3.0 Mesa 13.0.6>
[INFO ] [GL ] OpenGL vendor <VMware, Inc.>
[INFO ] [GL ] OpenGL renderer <Gallium 0.4 on llvmpipe (LLVM 3.9, 256 bits)>
[INFO ] [GL ] OpenGL parsed version: 3, 0
[INFO ] [GL ] Shading version <1.30>
[INFO ] [GL ] Texture max size <8192>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [GL ] NPOT texture support is available
Traceback (most recent call last):
File "main.py", line 2079, in
MainApp().run()
File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 799, in run
self.load_kv(filename=self.kv_file)
File "/usr/local/lib/python2.7/dist-packages/kivy/app.py", line 596, in load_kv
root = Builder.load_file(rfilename)
File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 301, in load_file
return self.load_string(data, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/kivy/lang/builder.py", line 368, in load_string
parser = Parser(content=string, filename=fn)
File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 392, in init
self.parse(content)
File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 498, in parse
self.execute_directives()
File "/usr/local/lib/python2.7/dist-packages/kivy/lang/parser.py", line 462, in execute_directives
mod = import(package)
File "/home/pi/CoPilot/kivymd/tabs.py", line 98, in
class MDTabHeader(MDFlatButton):
File "/home/pi/CoPilot/kivymd/tabs.py", line 101, in MDTabHeader
width = BoundedNumericProperty(dp(None), min=dp(72), max=dp(264), errorhandler=lambda x: dp(72))
File "/usr/local/lib/python2.7/dist-packages/kivy/metrics.py", line 136, in dp
return dpi2px(value, 'dp')
File "kivy/properties.pyx", line 291, in kivy.properties.dpi2px
File "kivy/properties.pyx", line 299, in kivy.properties.dpi2px
TypeError: float() argument must be a string or a number

@chaoman
Copy link

chaoman commented Jan 12, 2019

This issue can be fixed by changing the /kivymd/tab.py file from dp(None) to dp(0) in #6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants