Page 1 of 1

Error when PLIN_API_example

Posted: Tue 7. Jan 2025, 13:40
by gagan.k
Hello,
I am working on the PLIN API, the samples folder consists of sample GUI which is interfaced with PLIN_View_Pro application.
When I run the code, the GUI is opening successfully, and interface is working fine.
But when I select the button "Initialize", it is showcasing the errors stated below:

Code: Select all

Exception in thread tmrRead:
Traceback (most recent call last):
  File "C:\Users\AppData\Local\Programs\Python\Python38\lib\threading.py", line 932, in _bootstrap_inner
    self.run()
  File "C:\Users\AppData\Local\Programs\Python\Python38\lib\threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Desktop\plin-api (1)\Samples\Python\PLIN_API_Example3.pyw", line 920, in _run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\Desktop\plin-api (1)\Samples\Python\PLIN_API_Example3.pyw", line 2176, in tmrRead_Tick
    self.readMessages()
  File "C:\Users\Desktop\plin-api (1)\Samples\Python\PLIN_API_Example3.pyw", line 2784, in readMessages
    self.processMessage(lpMsg)
  File "C:\Users\Desktop\plin-api (1)\Samples\Python\PLIN_API_Example3.pyw", line 2808, in processMessage
    self.insertMsgEntry(linMsg)
  File "C:\Users\Desktop\plin-api (1)\Samples\Python\PLIN_API_Example3.pyw", line 2828, in insertMsgEntry
    self.lstMessages.insert(
  File "C:\Users\AppData\Local\Programs\Python\Python38\lib\tkinter\tix.py", line 1455, in insert
    self.tk.call(self._w, 'insert', index, *self._options(cnf, kw))
RuntimeError: main thread is not in main loop
Provide me the solution which execute the program.

Re: Error when PLIN_API_example

Posted: Mon 13. Jan 2025, 12:49
by M.Maidhof
Hi,

which PLIN hardware do you use? Does PLIN-View Pro work on your system correctly?

regards

Michael

Re: Error when PLIN_API_example

Posted: Wed 15. Jan 2025, 06:46
by gagan.k
Hello,
Plin View Pro is working fine, and I am using PLIN USB IPEH-004052-000121

Regards,
Gagan