I am using Python3 and kivymd for my python app.
I am trying to use the MDDataTable module from kivymd but whenever I run it, it gives this "inline error". Is there anyway to fix this?
I already tried reinstalling the kivymd module but that doesn't solve the problem
Thank you for reading this
Problem image
You are giving wrong value to orientation
Valid orientations are ‘lr-tb’, ‘tb-lr’, ‘rl-tb’, ‘tb-rl’, ‘lr-bt’, ‘bt-lr’, ‘rl-bt’ ‘bt-rl’.
‘lr’ means Left to Right. ‘rl’ means Right to Left. ‘tb’ means Top to Bottom. ‘bt’ means Bottom to Top.
See docs:
https://kivy.org/doc/stable/api-kivy.uix.gridlayout.html#kivy.uix.gridlayout.GridLayout.orientation
Related
I know that this might sound weird, but I have a problem considering the screen resolution of my Tkinter program. I have attached two pictures for a comparison.
I think you can clearly tell, what I'm talking about. The problem is that I don't really know why this happened. Suddenly the tkinter window had a way better resolution as you can see in the top picture. I did not change anything related to screensize/resolution by myself and was therefore expecting Tkinter to have published an update which just has better textures for every widget.
But because I had to reinstall python and all its modules this is no longer the case and the widgets look very blurry again (Bottom picture). Now I'm asking myself whether this has something to do with another version of Python or tkinter I'm using or what else could have been the reason for that.
I did not change my PC, Screen or anything like that. I just reinstalled python and its modules. Sadly I don't have the source code of the version where it looked great, but only an .exe file, because im continuously updating my program. But as I said before, I don't know what I could have changed which led to this huge resolution improvement.
I hope you get, what I'm trying to tell you.
Thanks in advance!
I was able so solve it!
I had a look on this question: on Stackoverflow
The answer from #binaryfunt solved my problem completely. So it was not really a tkinter/python thing, but rather windows itself.
I'm new to python so I'm trying to make a python bot for a simple game. I tried making a function that clicks on any color I want to, but I keep getting errors saying "The Pillow Package is required to use this function" does anyone know why? Here is the function.
def findColor():
for x in range(s.width):
for y in range(s.height):
if s.getpixel((x, y)) == color:
click(x, y)
And I made a function called click that will click in the place I want so that isn't the bug, color is a variable I made so I can change it if I need to, and s is a screenshot. The variable for s is
s = pyautogui.screenshot()
Also I am very new to python so if I did something really dumb please go easy on me. Thank you!
This problem is occurring since the screenshot function uses the PIL module,
This may help: https://pyautogui.readthedocs.io/en/latest/screenshot.html
according to the documentation,
"Screenshot functionality requires the Pillow module. "
since s uses the screenshot module and returns a Image object, therefore PIL needs to be installed.
I created a label in kivy which contains a lot of information. It comes under a scrollview widget hence becoming a scrollable label. But since it has a lot of information it turns black and doesn't display anything. Also it has text with font roboto and size 30. I believe this is causing the error. Also it seems to not raise any error.
Could anyone help me overcome this problem?
Thanks
Use a ScrollLabel instead, it was created specifically to avoid this problem.
Iam trying to run a simple sample code of Hello World which is as follows:
import kivy
kivy.require('1.8.0') # replace with your current kivy version !
from kivy.app import App
from kivy.uix.button import Button
class MyApp(App):
def build(self):
return Button(text='Hello World')
if __name__ == '__main__':
MyApp().run()
and i have saved this as hello.py which then i run by using kivy-1.8.0 which in turn gives me an error message titled Kivy Fatal Error and the rest of the description is in Chinese,Japanese or Korean language.
Is there a problem of graphics card? or
Is there any other way to a Kivy application
please help.
Please post the full terminal output from when the app is run.
I don't remember what the funny character message means (it's nonsense, not real text), but I think it indicates a too-low opengl version. The appearance of the garbled message is itself a bug that I think is fixed in kivy master.
Possible issues with kivy (and python):
Indentation issues: make doubly sure that your indents are consistent: they should all be the same. If you are using a tab, make sure it is a tab everywhere. If you are using multiple spaces make sure they are the same number everywhere.
A more kivy specific issue: try to comment out line 2 (kivy.require('1.8.0')). You may not have the correct version of kivy installed. Alternatively, decrease that number (1.0.6 should be more than enough for what you are doing in this simple application).
I don't know what the issue could be with the language you get the message in. Perhaps you installed some weird distribution, or selected some language pack that it is defaulting to.
I'm trying to build a web browser using PyGTK and PyWebKit
However, I'm pretty sure my question only concerns PyGTK
I have a custom gtk.Notebook class, with an "add tab" button as the last tab.
When I click it, it gives me the error
/home/ruiqimao/workspace/PyBrowser/src/browser/__init__.py:161: GtkWarning: IA__gdk_window_get_cursor: assertion `GDK_IS_WINDOW (window)' failed gtk.main()
twice.
And then, my new tab won't show up.
I have no idea what is going on, so here is my whole code
If any of you could help me, that would be great!
Thanks!
[EDIT]: Just found out that the problem lies in the w.show_all() line
What could this mean?
This question has been sitting in "unanswered" for months, without any answer. However, the problem was indeed solved (see comments). Thus, as a service to get this question OUT of "unanswered", I'll restate the apparent answer. If anyone else can top me, pleeeeeeeease do. :)
You forgot to show the new tab.
Thank you, and goodnight. :)