Closed kaakmal closed 4 months ago
Thank you for the information. Now, it's clear that root cause of the problem is the absence of "QAbstractItemView". However, I'm not sure why it does not exist in your environment... I'm sorry. It would take some time to investigate it. But I will let you know when I have a fix for it. I will get back to you in a month whether or not I found a solution. Thank you.
Hello, Kathryn. I've tested BARAM on macos both with M1 and with Intel CPU but failed to reproduce your issue. The problem seems to come from PySide6 python package according to the error message.
File "/Users/Katy/Baram/baram/view/setup/boundary_conditions/boundary_conditions_page_ui.py", line 69, in setupUi
self.boundaries.setEditTriggers(QAbstractItemView.NoEditTriggers)
NameError: name 'QAbstractItemView' is not defined
Did you set up venv(Python Virtual Environment) and install the packages from requirements.txt? If possible, I could connect to your PC through messages as following page suggests. https://www.anyviewer.com/how-to/quick-assist-for-mac-2578.html Thank you.
Yes I did, using the commands on the installation page.
I ran the pip install again just in case
Same error.
Thank you for the confirmation. I found something strange in your log. The version of PySide6 in your environment is 6.2.1 while that in requirements.txt should be 6.2.4 as you can see here. Actually, PySide 6.2.1 should also be working with BARAM according to my test, but I could presume that something went wrong in you environment. I haven't seen anything like this. Have you manually modify requirements.txt?
I did, because there was a different error and that's how you told me to fix it.
Oh, I'm sorry. I remember now. Then, we don't have other clue for the problem because it's not reproduced on the macs here... I've already confirmed that BARAM worked well with PySide6 6.2.1. Could you check if your PySide6 does have QAbstractItemView like folliwing? (The command was given in baram folder which has venv in it. )
❯ grep -A 5 "class QAbstractItemView" venv/lib/python3.9/site-packages/PySide6/QtWidgets.pyi
class QAbstractItemView(PySide6.QtWidgets.QAbstractScrollArea):
MoveUp : QAbstractItemView.CursorAction = ... # 0x0
MoveDown : QAbstractItemView.CursorAction = ... # 0x1
MoveLeft : QAbstractItemView.CursorAction = ... # 0x2
MoveRight : QAbstractItemView.CursorAction = ... # 0x3
>
It does.
Everything seems ok.
The file under venv
really has QAbstractItemView
in it.
BUT the main.py
in virtual environment could not see the definition...
Shall we check if the PySide6 package in venv
is really used?
Could you please try following command in your virtual environment (venv)?
(venv) MacBook-Air:baram Katy$ python
>>> from pathlib import Path
>>> import PySide6
>>> print(Path(PySide6.__file__).resolve())
In my case, macos showed following output.
❯ python
Python 3.9.16 (main, Dec 7 2022, 10:06:04)
[Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pathlib import Path
>>> import PySide6
>>> print(Path(PySide6.__file__).resolve())
/Users/nextfoam/baram/venv/lib/python3.9/site-packages/PySide6/__init__.py
>>>
Well, something's definitely really screwed up with my venv.
MacBook-Air:baram Katy$ source ./venv/bin/activate (venv) MacBook-Air:baram Katy$ from pathlib import Path from: can't read /var/mail/pathlib (venv) MacBook-Air:baram Katy$ import PySide6 -bash: import: command not found
Did you assume zsh in your code? Because I'm still using bash.
I and most of my colleagues are using bash.
You seem to forget to run python
command before type python commands.
After the command of source ./venv/bin/activate
, you have to enter python
.
Then the python interpreter runs , and from pathlib import Path
command will work.
Derp. Read right over that.
I got this: (venv) MacBook-Air:baram Katy$ python Python 3.9.0 (v3.9.0:9cf6752276, Oct 5 2020, 11:29:23) [Clang 6.0 (clang-600.0.57)] on darwin Type "help", "copyright", "credits" or "license" for more information.
from pathlib import Path import PySide6 print(Path(PySide6.file).resolve()) /Users/Katy/Baram/baram/venv/lib/python3.9/site-packages/PySide6/init.py
On Tue, Dec 20, 2022 at 8:43 PM Jake Yun @.***> wrote:
I and most of my colleagues are using bash.
You seem to forget to run python command before type python commands.
After the command of source ./venv/bin/activate, you have to enter python.
Then the python interpreter runs , and from pathlib import Path command will work.
— Reply to this email directly, view it on GitHub https://github.com/nextfoam/baram/issues/27#issuecomment-1360657554, or unsubscribe https://github.com/notifications/unsubscribe-auth/AU73UCL5SMOMO4WLIBFFS5LWOJODRANCNFSM6AAAAAASXRV4S4 . You are receiving this because you authored the thread.Message ID: @.***>
Then, I'm lost again...
Your venv
has PySide6 package in correct location, and the package has correct interface file (QtWidgets.pyi) that has QAbstractItemView
definition.
The only remaining possibility is that the binary library is not correct... I would suggest following two trial. Could you try them?
Try another version of PySide6 with following commands ( of course, under venv
activated )
pip uninstall PySide6
pip install PySide6==6.2.0 # or 6.1.3
Upgrade macOS version to Big Sur (macOS 11) or higher
Hi, Kathryn. Installation package for macOS with Apple silicon has released today. If your macbook has Apple silicon, please try it. For more information, refer to BARAM Page.
Closed because no response for a long time
Describe the bug Clicking on the boundary conditions option in the menu does not show the boundary conditions (or do anything else). Whatever screen in the menu was previously selected stays there.
Log file baram.log
Desktop (please complete the following information): MacOS 10.15