quitegreensky / akivymd Goto Github PK
View Code? Open in Web Editor NEWA set of fancy widgets for KivyMD
License: MIT License
A set of fancy widgets for KivyMD
License: MIT License
hello this's my first time i use akivymd project and start with the following simple example but I'm facing the following error
kivy.factory.FactoryException: Unknown class <AKBottomNavigation2>
from kivy.lang import Builder
from kivymd.app import MDApp
class App(MDApp):
def build(self):
return Builder.load_string('''
AKBottomNavigation2:
bg_color: app.theme_cls.bg_darkest
On_active_button:
text: 'Alert'
icon: 'bell-outline'
On_active_button:
text: 'Bank'
icon: 'bank-outline'
On_active_button:
text: 'Download'
icon: 'arrow-down-bold-outline'
''')
App().run()
please make the AKBottomNavigation2
and Button_Item
depends on ScreenManager
and Screen
this code works like
<Root>:
AKBottomNavigation2:
Button_Item:
name: "screen 1"
YourContent:
Button_Item:
name: "screen 2"
YourContent:
Button_Item:
name: "screen 3"
YourContent:
this
<Root>:
ScreenManager:
Screen:
name: "screen 1"
YourContent:
Screen:
name: "screen 2"
YourContent:
Screen:
name: "screen 3"
YourContent:
After I cloned the akivymd repo.
I got this:
Traceback (most recent call last):
File "kivy\properties.pyx", line 2023, in kivy.properties.ColorProperty.convert
File "kivy\properties.pyx", line 2041, in kivy.properties.ColorProperty.parse_list
ValueError: Invalid value for color (got [])
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\lang\builder.py", line 701, in _apply_rule
setattr(widget_set, key, value)
File "kivy\weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
File "kivy\properties.pyx", line 498, in kivy.properties.Property.__set__
File "kivy\properties.pyx", line 840, in kivy.properties.ListProperty.set
File "kivy\properties.pyx", line 545, in kivy.properties.Property.set
File "kivy\properties.pyx", line 600, in kivy.properties.Property.dispatch
File "kivy\_event.pyx", line 1248, in kivy._event.EventObservers.dispatch
File "kivy\_event.pyx", line 1154, in kivy._event.EventObservers._dispatch
File "c:\users\titiw\projects\kivyapp\kivymd\kivymd\uix\label.py", line 379, in on_text_color
self.color = self.text_color
File "kivy\properties.pyx", line 498, in kivy.properties.Property.__set__
File "kivy\properties.pyx", line 527, in kivy.properties.Property.set
File "kivy\properties.pyx", line 2025, in kivy.properties.ColorProperty.convert
ValueError: MDIcon.color has an invalid format (got [])
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 136, in <module>
DemoApp().run()
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\app.py", line 950, in run
runTouchApp()
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\base.py", line 582, in runTouchApp
EventLoop.mainloop()
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\base.py", line 347, in mainloop
self.idle()
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\base.py", line 387, in idle
Clock.tick()
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\clock.py", line 733, in tick
self.post_idle(ts, self.idle())
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\clock.py", line 776, in post_idle
self._process_events()
File "kivy\_clock.pyx", line 616, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 649, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 645, in kivy._clock.CyClockBase._process_events
File "kivy\_clock.pyx", line 218, in kivy._clock.ClockEvent.tick
File "c:\users\titiw\projects\kivyapp\akivymd\akivymd\uix\rating.py", line 163, in _update
self._generate_items()
File "c:\users\titiw\projects\kivyapp\akivymd\akivymd\uix\rating.py", line 168, in _generate_items
item = _RaitingItem(
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\uix\behaviors\button.py", line 121, in __init__
super(ButtonBehavior, self).__init__(**kwargs)
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\uix\boxlayout.py", line 145, in __init__
super(BoxLayout, self).__init__(**kwargs)
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\uix\layout.py", line 76, in __init__
super(Layout, self).__init__(**kwargs)
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\uix\widget.py", line 359, in __init__
self.apply_class_lang_rules(
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\uix\widget.py", line 463, in apply_class_lang_rules
Builder.apply(
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\lang\builder.py", line 541, in apply
self._apply_rule(
File "C:\Users\titiw\projects\kivyapp\venv\lib\site-packages\kivy\lang\builder.py", line 710, in _apply_rule
raise BuilderException(rule.ctx, rule.line,
kivy.lang.builder.BuilderException: Parser: File "<inline>", line 11:
...
9: icon: root.icon
10: theme_text_color: "Custom"
>> 11: text_color : root.text_color
12: font_size: root.font_size
13: halign: "center"
@quitegreensky Only if you accept, I can give you the link to check it out and add it to the README.md documentation if you like
Whenever I launch my app on Android AKDialog always crashes my app with the following error
TypeError 'float' object not iterable
. The error is not specifically pointing to a line in akivymd library. I guess from what I'm seeing float was assigned to a radius instead of an integer
I can't post the full error because I don't have access to my laptop right now
It works fine on desktop but crashes on Android
Please I seriously need this to be fixed my company is in production mode and this is the current problem holding us(please help me)
if the user select only 2 options (month/year) it will result in error.
a fix can be in _choose function:
instead of:
try:
date = datetime(
int(self._year_title),
int(self._month_title),
int(self._day_title)
)
except:
self.cancel()
self.callback(False)
self.callback(date)
self.cancel()
something like that:
try:
date = datetime(
int(self._year_title),
int(self._month_title),
int(self._day_title)
)
self.callback(date)
self.cancel()
except:
self.cancel()
self.callback(False)
Hello! I loved these plugins, but when I try to use then in my project, a error occur because its works only for the older kivymd versions. So I receive a lot of warnings and errors. If was updated for a new version I will love this!
in the main.py file MyMenuItem was declared 2 times <MyMenuItem@OneLineAvatarListItem>
and
class MyMenuItem(OneLineAvatarListItem):
pass
I fixed it on my local machine by removing @OneLineAvatarListItem
from the kv code
Also there is a bug in Navigationrail
Screen
19: text: root.text
20: theme_text_color: 'Custom'
>> 21: text_color: root.active_text_color if root.active else root.text_color
22: halign: 'left'
23: valign: 'center'
...
ValueError: MDLabel.color must have 3 or 4 components (got [])
though the python interpreter never showed that I had to manually debug the program by putting a checker on this
def on_start(self):
counter = 0
for screen in self.screens:
if counter ==19:
print(screen)
break
self.mainkv.ids.sm.add_widget(eval('Factory.%s()' % screen))
counter += 1
i guess you missed the adding the active_text_color, that is why it is using the default empty list value.
I noticed something else, which is an awesome feature that you added i.e change_statusbar_color
, which I believe that it makes use of jinus module but in the buildozer.spec file there is no pyjnius module, I think you should add it so that developers who are new to akivymd will not have a bad impression about this project when they try to build it and see how it looks like
Still digging to find a fix
EDITED
parent cannot be assigned on init method
getting this error
line 117, in _update
self.root = self.parent.parent
AttributeError: 'NoneType' object has no attribute 'parent'
the line should be removed and since it of no use to _update() method. It should be added to the on_release() method
here
def _update(self):
if not self.active_text_color:
self.active_text_color = self.theme_cls.primary_color
if not self.text_color:
self.text_color = self.theme_cls.text_color
if not self.active_icon_color:
self.active_icon_color = self.theme_cls.primary_color
if not self.icon_color:
self.icon_color = self.theme_cls.text_color
def on_release(self):
self.root = self.parent.parent
index = self.root.ids.items_box.children.index(self)
self.root.set_current(index, item_index=False)
return super().on_release()
I just download akivymd demo and the installed using pip install akivymd
and no error shows up
and then when I run the demo I get the following error
husam@Hussam-Hardware MINGW64 ~/OneDrive/Desktop
$ python main.py
[INFO ] [Logger ] Record log in C:\Users\husam\.kivy\logs\kivy_20-10-06_108.txt
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer_dev" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.gstreamer" 0.1.18
[INFO ] [deps ] Successfully imported "kivy_deps.angle" 0.1.10
[INFO ] [deps ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO ] [deps ] Successfully imported "kivy_deps.sdl2" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.angle_dev" 0.2.0
[INFO ] [deps ] Successfully imported "kivy_deps.glew_dev" 0.2.0
[INFO ] [Kivy ] v2.0.0rc3, git-20c14b2, 20200615
[INFO ] [Kivy ] Installed at "C:\Users\husam\AppData\Local\Programs\Python\Python37\lib\site-packages\kivy\__init__.py"
[INFO ] [Python ] v3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]
[INFO ] [Python ] Interpreter at "C:\Users\husam\AppData\Local\Programs\Python\Python37\python.exe"
[INFO ] [KivyMD ] 0.104.2.dev0, git-Unknown, 2020-08-11 (installed at "C:\Users\husam\AppData\Local\Programs\Python\Python37\lib\site-packages\kivymd\__init__.py")
[INFO ] [Factory ] 185 symbols loaded
[INFO ] [Image ] Providers: img_tex, img_dds, img_sdl2, img_pil (img_ffpyplayer, img_gif 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 - Build 27.20.100.8587'>
[INFO ] [GL ] OpenGL vendor <b'Intel'>
[INFO ] [GL ] OpenGL renderer <b'Intel(R) HD Graphics 620'>
[INFO ] [GL ] OpenGL parsed version: 4, 6
[INFO ] [GL ] Shading version <b'4.60 - Build 27.20.100.8587'>
[INFO ] [GL ] Texture max size <16384>
[INFO ] [GL ] Texture max units <32>
[INFO ] [Window ] auto add sdl2 input provider
[INFO ] [Window ] virtual keyboard not allowed, single mode, not docked
[INFO ] [AKivymd ] v1.1
Traceback (most recent call last):
File "main.py", line 7, in <module>
from screens import bottomnavigation, spinners, dataloader, selectionlist, piechart,\
File "C:\Users\husam\OneDrive\Desktop\screens\progresswidget.py", line 3, in <module>
from akivymd.uix.progresswidget import AKCircularProgress
ModuleNotFoundError: No module named 'akivymd.uix.progresswidget'
I couldn't find a better way to contact you
Are you going to merge this with kivy md or make it standalone?
Hello, nice work!
Please, could you to create a simple Speedometer example to start?
Thank you.
the radius property of AKDialog is not declared properly(It is throwing an error), Use ListProperty instead of NumericProperty.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.