ModuleNotFoundError: No module named 'kivymd.effects'

814 views
Skip to first unread message

Marri Sri Rahul Siddu

unread,
Jul 24, 2022, 10:33:58 AM7/24/22
to Kivy users support

HI,

I'm able to run my kivy python script using the terminal, but unable to run the executable file of that kivy python script. I get the following exceptions while running my executable file.
I have created executable file using pyinstaller.

Please help me,I want to run a executable file for my kivy python script.

Exceptions thrown while running executable file

2022-07-23:12:22:37,395 ERROR [parser.py:564]
Traceback (most recent call last):
File "kivy/lang/parser.py", line 553, in execute_directives
File "", line 1093, in import
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'kivymd.effects'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "kivy/lang/parser.py", line 556, in execute_directives
File "", line 1093, in import
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 961, in _find_and_load_unlocked
File "", line 219, in _call_with_frames_removed
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'kivymd.effects'
2022-07-23:12:22:37,395 WARNING [logger.py:338] stderr: Traceback (most recent call last):
2022-07-23:12:22:37,395 WARNING [logger.py:338] stderr: File "kivy/lang/parser.py", line 553, in execute_directives
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 1093, in import
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 1014, in _gcd_import
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 961, in _find_and_load_unlocked
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 219, in _call_with_frames_removed
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 1014, in _gcd_import
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 961, in _find_and_load_unlocked
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 219, in _call_with_frames_removed
2022-07-23:12:22:37,396 WARNING [logger.py:338] stderr: File "", line 1014, in _gcd_import
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 973, in _find_and_load_unlocked
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: ModuleNotFoundError: No module named 'kivymd.effects'
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr:
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: During handling of the above exception, another exception occurred:
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr:
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: Traceback (most recent call last):
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "kivy/lang/parser.py", line 556, in execute_directives
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 1093, in import
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 1014, in _gcd_import
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 961, in _find_and_load_unlocked
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 219, in _call_with_frames_removed
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 1014, in _gcd_import
2022-07-23:12:22:37,397 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr: File "", line 973, in _find_and_load_unlocked
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr: ModuleNotFoundError: No module named 'kivymd.effects'
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr:
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr: During handling of the above exception, another exception occurred:
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr:
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr: Traceback (most recent call last):
2022-07-23:12:22:37,398 WARNING [logger.py:338] stderr: File "kube.py", line 63, in
2022-07-23:12:22:37,399 WARNING [logger.py:338] stderr: from kivymd.uix.datatables import MDDataTable
2022-07-23:12:22:37,399 WARNING [logger.py:338] stderr: File "", line 991, in _find_and_load
2022-07-23:12:22:37,400 WARNING [logger.py:338] stderr: File "", line 975, in _find_and_load_unlocked
2022-07-23:12:22:37,400 WARNING [logger.py:338] stderr: File "", line 671, in _load_unlocked
2022-07-23:12:22:37,400 WARNING [logger.py:338] stderr: File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
2022-07-23:12:22:37,400 WARNING [logger.py:338] stderr: File "kivymd/uix/datatables.py", line 86, in
2022-07-23:12:22:37,400 WARNING [logger.py:338] stderr: File "kivy/lang/builder.py", line 372, in load_string
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: File "kivy/lang/parser.py", line 483, in init
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: File "kivy/lang/parser.py", line 590, in parse
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: File "kivy/lang/parser.py", line 565, in execute_directives
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: kivy.lang.parser.ParserException: Parser: File "", line 3:
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: ...
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: 1:
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: 2:#:import DEVICE_TYPE kivymd.material_resources.DEVICE_TYPE
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: >> 3:#:import StiffScrollEffect kivymd.effects.stiffscroll.StiffScrollEffect
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: 4:
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: 5:
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: ...
2022-07-23:12:22:37,401 WARNING [logger.py:338] stderr: Unable to import package 'kivymd.effects.stiffscroll.StiffScrollEffect'

Elliot Garbus

unread,
Jul 25, 2022, 1:10:35 AM7/25/22
to kivy-...@googlegroups.com
Make sure that kivymd.effects is imported in Python (not just a kv import). Pyinstaller does not parse kv code.

Sent from my iPhone

On Jul 24, 2022, at 4:34 PM, Marri Sri Rahul Siddu <siddusi...@gmail.com> wrote:


--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/656c1413-1696-4127-a0d3-66a05e700882n%40googlegroups.com.

Marri Sri Rahul Siddu

unread,
Jul 25, 2022, 1:28:52 AM7/25/22
to Kivy users support
how to import kivymd.effects??? 

Elliot Garbus

unread,
Jul 25, 2022, 1:36:08 AM7/25/22
to kivy-...@googlegroups.com
In your main.py add

import kivymd.effects 

Sent from my iPhone

On Jul 25, 2022, at 7:28 AM, Marri Sri Rahul Siddu <siddusi...@gmail.com> wrote:

how to import kivymd.effects??? 

Marri Sri Rahul Siddu

unread,
Jul 25, 2022, 5:24:17 AM7/25/22
to kivy-...@googlegroups.com
after adding  import kivymd.effects to main.py and created an new executable file 
after running the new executable file,i get the following exceptions


2022-07-25:14:51:16,538 ERROR    [parser.py:564]
Traceback (most recent call last):
  File "kivy/lang/parser.py", line 553, in execute_directives
  File "<frozen importlib._bootstrap>", line 1093, in __import__
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'kivymd.effects.stiffscroll'


During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "kivy/lang/parser.py", line 556, in execute_directives
  File "<frozen importlib._bootstrap>", line 1093, in __import__
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'kivymd.effects.stiffscroll'
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr: Traceback (most recent call last):
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "kivy/lang/parser.py", line 553, in execute_directives
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 1093, in __import__
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr: ModuleNotFoundError: No module named 'kivymd.effects.stiffscroll'
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr: During handling of the above exception, another exception occurred:
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr:
2022-07-25:14:51:16,539 WARNING  [logger.py:338] stderr: Traceback (most recent call last):
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "kivy/lang/parser.py", line 556, in execute_directives
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 1093, in __import__
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr: ModuleNotFoundError: No module named 'kivymd.effects.stiffscroll'
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr: During handling of the above exception, another exception occurred:
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr: Traceback (most recent call last):
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "kube.py", line 65, in <module>
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:     from kivymd.uix.datatables import MDDataTable
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 991, in _find_and_load
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
2022-07-25:14:51:16,540 WARNING  [logger.py:338] stderr:   File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "PyInstaller/loader/pyimod03_importers.py", line 495, in exec_module
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "kivymd/uix/datatables.py", line 86, in <module>
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "kivy/lang/builder.py", line 372, in load_string
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "kivy/lang/parser.py", line 483, in __init__
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "kivy/lang/parser.py", line 590, in parse
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:   File "kivy/lang/parser.py", line 565, in execute_directives
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr: kivy.lang.parser.ParserException: Parser: File "<inline>", line 3:
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr: ...
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:       1:
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:       2:#:import DEVICE_TYPE kivymd.material_resources.DEVICE_TYPE
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr: >>    3:#:import StiffScrollEffect kivymd.effects.stiffscroll.StiffScrollEffect
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:       4:
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr:       5:
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr: ...
2022-07-25:14:51:16,541 WARNING  [logger.py:338] stderr: Unable to import package 'kivymd.effects.stiffscroll.StiffScrollEffect'

You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/K3-jZrY_FCc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/24E62089-277A-40A7-80AF-F6E223758FC2%40cox.net.

Elliot Garbus

unread,
Jul 25, 2022, 5:37:34 AM7/25/22
to kivy-...@googlegroups.com
Add:
import kivymd.effects.stiffscroll

Sent from my iPhone

> On Jul 25, 2022, at 11:24 AM, Marri Sri Rahul Siddu <siddusi...@gmail.com> wrote:
>
> kivymd.effects.stiffscroll

Marri Sri Rahul Siddu

unread,
Jul 25, 2022, 5:59:13 AM7/25/22
to kivy-...@googlegroups.com
thanks !!!!  it worked

--
You received this message because you are subscribed to a topic in the Google Groups "Kivy users support" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kivy-users/K3-jZrY_FCc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kivy-users+...@googlegroups.com.

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 8:17:47 AM7/28/22
to kivy-...@googlegroups.com
hi, when i run this code 
from kivy.lang import Builder

from kivymd.app import MDApp

KV = '''
MDBoxLayout:
    orientation: "vertical"

    MDTopAppBar:
        title: "MDTopAppBar"

    MDLabel:
        text: "Content"
        halign: "center"
'''


class Test(MDApp):
    def build(self):
        return Builder.load_string(KV)


Test().run()



i get this error:
     raise FactoryException('Unknown class <%s>' % name)
 kivy.factory.FactoryException: Unknown class <MDTopAppBar>

Elliot Garbus

unread,
Jul 28, 2022, 12:36:23 PM7/28/22
to kivy-...@googlegroups.com

This works for me.  Try installing kivymd from the master as described in the install instructions:

 

If you want to install development version from master branch, you should specify link to zip archive:

 

 

Sent from Mail for Windows

--

You received this message because you are subscribed to the Google Groups "Kivy users support" group.

To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/CAOVTOFXXEgDpeDrOB9Ep2oEygyBFFpvjLKYcZ34mP-u8NqGdrw%40mail.gmail.com.

 

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 1:52:09 PM7/28/22
to kivy-...@googlegroups.com
i get this error after installing 
2022-07-28:23:21:03,387 WARNING  [fitimage.py:14] FitImage: Note!
In the near future the `FitImage` widget will be moved to the `kivymd.uix.fitimage` package.
Use import of this widget like this:`from kivymd.uix.fitimage import FitImage`.
2022-07-28:23:21:03,636 WARNING  [logger.py:338] stderr: Traceback (most recent call last):
2022-07-28:23:21:03,636 WARNING  [logger.py:338] stderr:   File "C:\rahul\programs\kubewithfiles\kube.py", line 74, in <module>
2022-07-28:23:21:03,636 WARNING  [logger.py:338] stderr:     class ImageButtonRight(ButtonBehavior, ImageRightWidget):
2022-07-28:23:21:03,637 WARNING  [logger.py:338] stderr: TypeError: Cannot create a consistent method resolution
2022-07-28:23:21:03,637 WARNING  [logger.py:338] stderr: order (MRO) for bases ButtonBehavior, ImageRightWidget


Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 1:54:58 PM7/28/22
to kivy-...@googlegroups.com
this is the code where i think this error is being showed
class ImageButtonRight(ButtonBehavior, ImageRightWidget):
    pass
class ImageButtonLeft(ButtonBehavior, ImageLeftWidget):
    pass
which i have used in my application,
before installing  https://github.com/kivymd/KivyMD/archive/master.zip
 it was  working fine and good, but after i install this i get this error


Elliot Garbus

unread,
Jul 28, 2022, 2:59:22 PM7/28/22
to kivy-...@googlegroups.com

I’d need to see more code to help. 

 

The error message suggests that the ButtonBehavior and the ImageRightWidget can not be combined. I would suspect the ImageRightWidget may already have a button behavior.  Looking at the documentation and the source code– there is no need to add Button Behavior to the ImageRightWidget – ImageRightWidget already has the ButtonBehavior.

 

See: https://github.com/kivymd/KivyMD/blob/master/kivymd/uix/list/list.py#L942

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 3:06:36 PM7/28/22
to kivy-...@googlegroups.com
hope this helps you .......


tem = ThreeLineAvatarIconListItemCustom(text="appname",secondary_text="\n  ",tertiary_text="\n  "
                                         #secondary_text=_active_app,
                                         #tertiary_text=_ip+":"+_location['city'],
                                         #on_press=partial(self.show_text,_location1)
                                         )
        # iconl = ImageButtonLeft(source=_name, on_press=partial(self.show_image,_name))
        # item.add_widget(iconl)
            infobutton=MDIconButton(icon="Info.PNG",pos_hint={'center_x':.70,'top':0.70},
                                    user_font_size= "14sp",
                                    on_press=partial(self.show_text,_location1))
            item.add_widget(infobutton)
            dir=os.getcwd()
            dir=dir.replace('\\','/')
            file_name=f'{dir}/images/{_name}'
            cam_name=f'{dir}/images/{_camshot}'
            if(_name!="Null"):
                try:
                    iconl = ImageButtonLeft(source=file_name,on_press=partial(self.show_image,file_name))
                    item.add_widget(iconl)
                except Exception as e:
                    self._log_logger.error(f'Image cannot be displayed...{e}')

            if(_camshot!="Null"):
                try:
                    iconr = ImageButtonRight(source=cam_name, on_press=partial(self.show_image,cam_name))
                    item.add_widget(iconr)
                except Exception as e:
                    self._log_logger.error(f'Image cannot be displayed...{e}')
            self.recordlist.add_widget(item)


if not please let me know

Elliot Garbus

unread,
Jul 28, 2022, 3:22:17 PM7/28/22
to kivy-...@googlegroups.com

Share a minimal program that demonstrates the issue that I can run.

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 3:34:30 PM7/28/22
to kivy-...@googlegroups.com
#: import utils kivy.utils
GridLayout:
    cols:1
    ScreenManager:
        id:screenmanager
        AppScreen:
            id:app
        FirstScreen:
            id:home
        SecondScreen:
            id:tracker
        ThirdScreen:
            id:log
<AppScreen>:
    MDScreen:
...........
<FirstScreen>:
    name:"home"
    canvas.before:
        Rectangle:
            size:self.size
            pos: self.pos
    MDFloatLayout:

           

<SecondScreen>:
    name:"tracker"
    spacing:50
    MDFloatLayout:
        ScrollView:
            size_hint_x:1.0
            size_hint_y:None
            do_scroll_x: True
            do_scroll_y: True
            bar_width: 12
            bar_color: [0, 0, 255, 1]
            pos_hint: {'top':.65}
            size_hint: 1,.6
            MDList:
                height: self.minimum_height
                id:recordlist
<ThirdScreen>:
   .....

    

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 3:41:30 PM7/28/22
to kivy-...@googlegroups.com
my ku.KV file
my python file

import kivy
from kivy.uix.rst import RstDocument
from kivy.uix.label import Label
from kivy.app import App
from kivy.uix.image import Image
from kivy.uix.textinput import TextInput
from kivy.uix.screenmanager import Screen,ScreenManager
from kivy.lang import Builder
from kivymd.uix.textfield import MDTextField
from kivymd.uix.button import MDRectangleFlatButton
from kivymd.uix.button import MDIconButton
from kivymd.uix.button import MDRaisedButton
from kivymd.uix.card import MDCard
from kivymd.uix.label import MDLabel
from kivymd.app import MDApp
from kivymd.uix.screen import Screen
from kivy.properties import ObjectProperty
from capture import Capture
from kivy.uix.widget import Widget
from logger import get_logger
from kivy.core.window import Window
import kivymd.effects
import kivymd.effects.stiffscroll
import logger
import logging
import math,os
import capture
import shutil
import kivymd.effects
from kivy.uix.popup import Popup
from kivy.properties import StringProperty,ObjectProperty
from kivymd.uix.list import ThreeLineAvatarIconListItem,\
     ImageLeftWidget, ImageRightWidget
from kivy.clock import Clock
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.boxlayout import BoxLayout
from kivymd.uix.floatlayout import MDFloatLayout
from kivy.uix.gridlayout import GridLayout
import random
from functools import partial
from datetime import datetime
import json
import boto3
import dotenv
from dotenv import load_dotenv, find_dotenv
from postrecords import postrecords_f
from postrecords import postingtime
from kivy.config import Config
from kivy.cache import Cache
#from postrecords import postrecords
from kivymd.uix.snackbar import Snackbar
from datetime import datetime
from datetime import date
from sys import platform
import requests
from pynput import keyboard
from pynput import mouse
from pynput.mouse import Listener
from threading import Thread
from kivy.storage.jsonstore import JsonStore
from os.path import join
import jwt
import webbrowser
from kivy.uix.scrollview import ScrollView
from kivymd.uix.screen import Screen
from kivymd.uix.datatables import MDDataTable
from kivy.metrics import dp
from kivy.config import Config
from kivy.uix.anchorlayout import AnchorLayout
Config.set('kivy', 'exit_on_escape', '0')
class FirstScreen(Screen):
    pass

class ImageButtonRight(ButtonBehavior, ImageRightWidget):
    pass
class ImageButtonLeft(ButtonBehavior, ImageLeftWidget):
    pass

class ThreeLineAvatarIconListItemCustom(ThreeLineAvatarIconListItem, FloatLayout):
    pass
class TimeRecords(Screen):
    pass

class ScreenManager(ScreenManager):
    pass
class AppScreen(Screen):
    pass
class ThirdScreen(Screen):
..........
class SecondScreen(Screen):
    def take_shot(self):
        try:
            item = ThreeLineAvatarIconListItemCustom(text=f" appname",secondary_text="\n  ",tertiary_text="\n  "
        except Exception as e:
            print(e)
            self._log_logger.error(f'problem due to ..{e}')


class Test(MDApp):
    Switch=0
    config = ObjectProperty()
    _log_logger=get_logger()
    _log_logger=logging.getLogger(__name__)
    data_dir = App().user_data_dir
    #print(data_dir)
    store = JsonStore(join(data_dir, 'storage.cache'))
                     
    def __init__(self, **kwargs):
        Window.size = (400,660)
        super(Test,self).__init__(**kwargs)
        Window.bind(on_key_up=self._on_keyboard_enter)

    def build (self):
        Window.bind(on_request_close=self.send_request)
        kv=Builder.load_file("ku.kv")
        return kv
...................................
................................
...............................

Test().run()

Elliot Garbus

unread,
Jul 28, 2022, 4:28:55 PM7/28/22
to kivy-...@googlegroups.com

This is not a program I can run… this is segment of your program.

 

That said change:

 

class ImageButtonRight(ButtonBehavior, ImageRightWidget):
    pass
class ImageButtonLeft(ButtonBehavior, ImageLeftWidget):
    pass

to:

 

class ImageButtonRight(ImageRightWidget):
    pass
class ImageButtonLeft(ImageLeftWidget):
    pass

Marri Sri Rahul Siddu

unread,
Jul 28, 2022, 11:25:22 PM7/28/22
to kivy-...@googlegroups.com
after changing  

class ImageButtonRight(ButtonBehavior, ImageRightWidget):
    pass
class ImageButtonLeft(ButtonBehavior, ImageLeftWidget):
    pass

to:

 

class ImageButtonRight(ImageRightWidget):
    pass
class ImageButtonLeft(ImageLeftWidget):
    pass

i m able to run the application
but following errors are being shown
2022-07-29:08:51:16,639 WARNING  [fitimage.py:14] FitImage: Note!


In the near future the `FitImage` widget will be moved to the `kivymd.uix.fitimage` package.
Use import of this widget like this:`from kivymd.uix.fitimage import FitImage`.

2022-07-29:08:51:16,958 INFO     [__init__.py:271] GL: NPOT texture support is available
2022-07-29:08:51:17,278 WARNING  [parser.py:360] Deprecated property "<ColorProperty name=icon_right_color>" of object "<kivymd.uix.textfield.textfield.MDTextField object at 0x000001BCD2BC8200>" was accessed, it will be removed in a future version
2022-07-29:08:51:17,278 WARNING  [parser.py:360] Deprecated property "<ColorProperty name=text_color>" of object "<kivymd.uix.textfield.textfield.MDTextField object at 0x000001BCD2BC8200>" was accessed, it will be removed in a future version
2022-07-29:08:51:17,292 WARNING  [parser.py:360] Deprecated property "<OptionProperty name=color_mode>" of object "<kivymd.uix.textfield.textfield.MDTextField object at 0x000001BCD2C833C0>" was accessed, it will be removed in a future version
2022-07-29:08:51:17,293 WARNING  [button.py:1028] Deprecated property "<NumericProperty name=user_font_size>" of object "<kivymd.uix.button.button.MDIconButton object at 0x000001BCD2D24580>" was accessed, it will be removed in a future version
2022-07-29:08:51:17,298 WARNING  [<string>:74] Deprecated property "<OptionProperty name=theme_text_color>" of object "<kivymd.uix.button.button.MDIconButton object at 0x000001BCD2D24580>" was accessed, it will be removed in a future version
2022-07-29:08:51:17,303 WARNING  [parser.py:360] Deprecated property "<ColorProperty name=text_color>" of object "<kivymd.uix.button.button.MDIconButton object at 0x000001BCD2D60DD0>" was accessed, it will be removed in a future version


Elliot Garbus

unread,
Jul 28, 2022, 11:30:31 PM7/28/22
to kivy-...@googlegroups.com

These warnings all look like internal kivymd changes.  You can ignore them.

Marri Sri Rahul Siddu

unread,
Jul 29, 2022, 1:45:51 AM7/29/22
to kivy-...@googlegroups.com
i want to have dropdown when i press on the left menu button button but i dont get that instead i get an error
2022-07-29:11:08:20,70 WARNING  [logger.py:338] stderr:     dropdown.open()      
2022-07-29:11:08:20,70 WARNING  [logger.py:338] stderr: TypeError: open() missing 1 required positional argument: 'widget'
 
code :
   MDBoxLayout:
        orientation: "vertical"

        MDTopAppBar:
            id:menu
            title: "MDtoolbar"
            size_hint:0.2,0.2
            #left_action_items: [["menu", lambda x: app.callback(x)]]
            left_action_items: [["menu", lambda x:app.dropmenu()]]
            right_action_items: [["dots-vertical", lambda x: app.callback(x)]]

my python code:

def dropmenu(self):
        dropdown = DropDown()
        for index in range(10):
             btn = Button(text='Value %d' % index, size_hint_y=None, height=44)
             btn.bind(on_release=lambda btn: dropdown.select(btn.text))
             dropdown.add_widget(btn)
        #dropdown.bind(on_select=lambda instance, x: setattr(self.root.ids['tracker'].ids.menu.left_action_items, 'text', x))
        #dropdown.bind(on_select="hello")
        print("dropdown button pressed")
        dropdown.open()      

    def callback(self, button):
        self.root.ids['tracker'].ids.menu.caller = button
        print("button pressed")
        menu_items = [
            {
                "viewclass": "OneLineListItem",
                "text": f"Item {i}",
                "height": dp(56),
                "on_release": lambda x=f"Item {i}": self.menu_callback(x),
             } for i in range(5)
        ]
        self.root.ids['tracker'].ids.menu= MDDropdownMenu(
            items=menu_items,
            width_mult=4,
        )
        self.menus=self.root.ids['tracker'].ids.menu
        self.menus.open()

    def menu_callback(self, text_item):
        self.menus.dismiss()
        Snackbar(text=text_item).open()



even when i press on the right 3 vertical dots button it takes much time to show items.....
please help me



Screenshot (265).png

Elliot Garbus

unread,
Jul 29, 2022, 6:54:14 AM7/29/22
to kivy-...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages