-
Notifications
You must be signed in to change notification settings - Fork 4
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
AttributeError: 'int' object has no attribute '_root' #21
Comments
Hi: You might try finding where to post such issues in the Python support community. It might be something new in Ubuntu 22. Tested on earlier 20.x versions work fine. It is interesting that just before that line (140) in the code tk string variables are defined and it chooses to not error there but on the int variable. What version level of Python 3 are you using? I don't have access to Linux computer right now. Could you try editing the file as below as a test for me? ResDivStatus = IntVar() If this doesn't help I can't think of what might have changed in Python |
I did a little more checking and it seems that a lot of things have changed between python 3.9 to 3.10. Finding and correcting all the places that these changes broke in the ALICE code may take a long time. |
Hy, yes I am using Python 3.10.6 I did what you said, but I had to replace every single instance of IntVar(0), and DoubleVar(0) with IntVar(), and DoubleVar() and also I had to add import tkinter on line 56 and it opens, but it tells me that PySMU is not found and I have installed libsmu. Did I miss something? I don't know how to downgrade Python safely in Ubuntu. I know that if I remove python in Ubuntu whole system breaks and Im scared to do it. |
Thanks for testing these apparently not backward compatible changes that were done to 3.10. I've switched to using Anaconda and the Python 10 that comes with that. |
It says after Alice opens. I read in this guide |
I've managed to change all the Intvar() lines (still using Anaconda/Spider) and commented out the photoimage references for the moment and the program "runs" without reporting any errors but none of the ALICE screens are being displayed? The console messages indicate that it is reading from the board and the LED changes from red to green so pysmu is working. |
Oh I see, but It tells me to default to user installation because normal site-packages is not writeable. Can I try to install it with pip? If so which .whl one to choose? |
I have no idea about installing libsmu / pysmu since Travis switched to using the conda packages. Thus why I'm beating my head against the Anaconda wall right now. |
I used this one with Python 3.10: 'python3 -m pip install pysmu-1.0.4-cp310-cp310-manylinux_2_24_x86_64.whl' and it works. Thank you so much for help. Ill report if I find anything strange. |
I don't know what was going on with Anaconda and the tkinter package and Photoimage but if I abandon Anaconda and just do a standard install of Python 3.10 down loaded from the official Python site and install numpy / matplotlib and install the windows 64 pysmu bindings .whl down loaded from: It will take some time for a full time Analog Employee to put a fixed version of the source code up in this repository. |
I had the same issue. I can confirm that the above discussed solution does work on Debian/GNU Linux version 12 with Python 3.11.2. I replaced every occurrence of |
Thanks for confirming that the changes also work on Python 3.11. |
bump. encountered the same issue in 2024. |
Python 3.x
Windowing System is x11
Traceback (most recent call last):
File "/home/alice-desktop-1.3.pyw", line 140, in
ResDivStatus = IntVar(0)
File "/usr/lib/python3.10/tkinter/init.py", line 564, in init
Variable.init(self, master, value, name)
File "/usr/lib/python3.10/tkinter/init.py", line 372, in init
self._root = master._root()
AttributeError: 'int' object has no attribute '_root'
I'm receiving the error above after running: python3 alice-desktop-1.3.pyw
OS: Ubuntu 22.04
The text was updated successfully, but these errors were encountered: