-
Notifications
You must be signed in to change notification settings - Fork 98
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
GUI is not working... #412
Comments
Attach the answer to |
|
Confirmed. Also some freeze at Ubuntu 16.04. |
Same problem with current master branch: |
KiCost v.1.1.4.at Python 3.8.5.on Windows-10-10.0.19041-SP0(64bit).Graphical library: 4.0.7.post2 msw (phoenix) edit During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): During handling of the above exception, another exception occurred: Traceback (most recent call last): |
EDIT: It works now, it seems that dev-partinfo.kitspace.org was down / not responding, and this caused the issue Hi, I have the same issue. The kicost --info output is: The output of the script is:
It seems that dev-partinfo.kitspace.org is not responding, it is down or there is a bug in kicost? |
Ok, I believe a few issues are conflated here (especially since #421 was marked as a duplicate). I think I have an idea what's going on.
... which is exactly what happens. The error messages even tell what the problem is ("wxEXPAND flag will be overridden by alignment flags"). The solution is to either remove the wx.EXPAND flag or the alignment flags, depending on what the intent here is. Getting the GUI to start required a modification in kicost_gui.py of lines 367, 384 and 449. I'm not sending a pull request since I don't know what the GUI is supposed to look like and hence which of the conflicting flags should be removed.
|
- Fixes hildogjr#412 - On Linux it fixes the error: ``` [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. python3: ../../src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. ``` - The solution is just a copy & paste from StackOverflow: https://stackoverflow.com/questions/32410359/threading-in-wxpython - From what I interpret the main point here is the use of wx.CallAfter
Hi @hildogjr ! If you incorporate the flake8 patch first (which I strongly recommend) the #451 becomes: diff --git a/kicost/kicost_gui.py b/kicost/kicost_gui.py
index 231e11f..bb2dcb9 100644
--- a/kicost/kicost_gui.py
+++ b/kicost/kicost_gui.py
@@ -41,7 +41,7 @@ import webbrowser # To update informations.
import sys
import os
import subprocess # To access OS commands and run in the shell.
-import threading
+from threading import Thread
import time # To elapse time.
import tempfile # To create the temporary log file.
from datetime import datetime # To create the log name, when asked to save.
@@ -96,6 +96,18 @@ PAGE_POWERED_BY = 'https://kitspace.org/'
kicostPath = os.path.dirname(os.path.abspath(__file__)) # Application dir.
+# ======================================================================
+class ChildThread(Thread):
+ """ Helper class to safetly call the run action """
+ def __init__(self, myframe):
+ """Init Worker Thread Class."""
+ Thread.__init__(self)
+ self.myframe = myframe
+
+ def run(self):
+ wx.CallAfter(self.myframe.run)
+
+
# ======================================================================
def open_file(filepath):
'''@brief Open a file with the default application in different OSs.
@@ -714,10 +726,9 @@ class formKiCost(wx.Frame):
def button_run(self, event):
''' @brief Call to run KiCost.'''
event.Skip()
- # self.run()
- # wx.CallLater(10, self.run) # Necessary to not '(core dumped)' with wxPython.
- t = threading.Thread(target=self.run) # , args=[self])
- t.start()
+ self.child = ChildThread(myframe=self)
+ self.child.daemon = True
+ self.child.start()
# ----------------------------------------------------------------------
# @anythread |
- Fixes hildogjr#412 - On Linux it fixes the error: ``` [xcb] Unknown sequence number while processing queue [xcb] Most likely this is a multi-threaded client and XInitThreads has not been called [xcb] Aborting, sorry about that. python3: ../../src/xcb_io.c:269: poll_for_event: Assertion `!xcb_xlib_threads_sequence_lost' failed. ``` - The solution is just a copy & paste from StackOverflow: https://stackoverflow.com/questions/32410359/threading-in-wxpython - From what I interpret the main point here is the use of wx.CallAfter
Using (testing) v1.1.5
Using on Ubuntu 20.04
From the GUI
Still seeing this issue
Debugging this with the command line given here it is working.
Maybe the issue is with the flag
Open spreadsheet
So, if I unmark this checkbox, the whole gui hangs.
A 3rd test gave this...
BOM file: board.csv
Reconigzed EDAs: CSV file
Open spreadsheet unmarked
The text was updated successfully, but these errors were encountered: