AttributeError: 'super' object has no attribute '__getattr__'. Did you mean: '__setattr__'?
from kivy.lang import Builder
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import AsyncImage
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from kivy.uix.scrollview import ScrollView
from kivymd.app import MDApp
from kivymd.uix.button import MDRectangleFlatIconButton, MDFloatingActionButtonSpeedDial,MDIconButton
from kivy.uix.togglebutton import ToggleButton
from kivymd.uix.screen import MDScreen
from kivymd.uix.textfield import MDTextField
from kivymd.uix.tab import MDTabsBase
results = []
if 'Туда' in marketplaces:
wildberries_results = self.parse_wildberries(product_name)
results.extend(wildberries_results)
if 'Сюда' in marketplaces:
ozon_results = self.parse_ozon(product_name)
results.extend(ozon_results)
После запуска кода все идет хорошо,но после нажатия на кнопку "Начать поиск" мне выдает ошибку :
Traceback (most recent call last):
File "kivy\properties.pyx", line 961, in kivy.properties.ObservableDict.__getattr__
KeyError: 'text_field_error'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\User1\MyRarserApp\jdjbfjdgbk.py", line 127, in
ParserApp().run()
File "C:\Python311\Lib\site-packages\kivy\app.py", line 956, in run
runTouchApp()
File "C:\Python311\Lib\site-packages\kivy\base.py", line 574, in runTouchApp
EventLoop.mainloop()
File "C:\Python311\Lib\site-packages\kivy\base.py", line 339, in mainloop
self.idle()
File "C:\Python311\Lib\site-packages\kivy\base.py", line 383, in idle
self.dispatch_input()
File "C:\Python311\Lib\site-packages\kivy\base.py", line 334, in dispatch_input
post_dispatch_input(*pop(0))
File "C:\Python311\Lib\site-packages\kivy\base.py", line 302, in post_dispatch_input
wid.dispatch('on_touch_up', me)
File "kivy\_event.pyx", line 731, in kivy._event.EventDispatcher.dispatch
File "C:\Python311\Lib\site-packages\kivymd\uix\button\button.py", line 1187, in on_touch_up
return super().on_touch_up(touch)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\kivymd\uix\behaviors\ripple_behavior.py", line 404, in on_touch_up
return super().on_touch_up(touch)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\kivy\uix\behaviors\button.py", line 179, in on_touch_up
self.dispatch('on_release')
File "kivy\_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
File "kivy\_event.pyx", line 1231, in kivy._event.EventObservers._dispatch
File "C:\Users\User1\MyRarserApp\jdjbfjdgbk.py", line 46, in start_search
product_name = self.root.ids.text_field_error.text
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "kivy\properties.pyx", line 964, in kivy.properties.ObservableDict.__getattr__
AttributeError: 'super' object has no attribute '__getattr__'. Did you mean: '__setattr__'?
[Finished in 13.9s]
Please say me,how can I change it
I already tryed read documentation and just tryed search some option,but still anthing
I thing,that it because of ,that string:
product_name = self.root.ids.text_field_error.text
1. Format your code according to this site's rules, using </> button. Right now it's unreadable.
2. English clearly isn't your primary language, so don't bother with trying to use it to seem smarter. It never works.