Skip to content
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

Exception in reset_json function in Dashboard/objects/Table.py #2

Open
jovanrajsic opened this issue Jan 11, 2024 · 7 comments
Open

Comments

@jovanrajsic
Copy link

When running Dashboard app there is an exception and the program aborts:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Users\jrajsic\AppData\Local\Programs\Python\Python39\lib\threading.py", line 950, in _bootstrap_inner
    self.run()
  File "C:\Users\jrajsic\Documents\bfmc\Computer\Dashboard\GUI\GUI_start.py", line 122, in run
    dashBoard.draw()
  File "C:\Users\jrajsic\Documents\bfmc\Computer\Dashboard\GUI\DashBoard.py", line 268, in draw
    object.draw()
  File "C:\Users\jrajsic\Documents\bfmc\Computer\Dashboard\objects\Table.py", line 407, in draw
    for index, e in enumerate(self.valuesFromPi.keys()):
AttributeError: 'set' object has no attribute 'keys'

In reset_json function in Dashboard/objects/Table.py there is an assignment which converts dict to set in line 597 :
self.valuesFromPi = {+ len(self.dataEnums) + len(self.dataRange)}
I do not understand the semantics of this line. I changed the line to:
self.valuesFromPi = {}
and Dashboard works fine.

@Eleches-max
Copy link

Hello! Did you manage to solve the error?

@jovanrajsic
Copy link
Author

As I said i changed the line to self.valuesFromPi = {} and the error was solved.

@Eleches-max
Copy link

The interface opens, but it doesn't connect to the server. The port and IP are set correctly.

@jovanrajsic
Copy link
Author

Did you launch the Brain app on RPi?

@Eleches-max
Copy link

Eleches-max commented Jan 12, 2024

yes
When I start Dashboard.py I get nothing on raspberry

@Eleches-max
Copy link

image
only demo.py connects

@jovanrajsic
Copy link
Author

Maybe the port number is wrong. Anyways, it would be better to open a topic on the forum, your problem is not related to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants