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

Demo Error #11

Closed
kengoon opened this issue Oct 18, 2020 · 1 comment
Closed

Demo Error #11

kengoon opened this issue Oct 18, 2020 · 1 comment

Comments

@kengoon
Copy link
Contributor

kengoon commented Oct 18, 2020

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()
@quitegreensky
Copy link
Owner

Thanks for your bug report . Fixed.

which I believe that it makes use of jinus module but in the buildozer.spec file there is no pyjnius module

You don't need to add pyjinus to buildozer.spec . It will be added to the builds by default.

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

Successfully merging a pull request may close this issue.

2 participants