Hello everybody,
I’m a beginner and I would like to try pylinac. The issue is that when I want to try any demo, I get the following error:
Traceback (most recent call last):
File “c:\Users\ben-abdellah-aghzout\Code\testlib.py”, line 1, in
from pylinac import PicketFence
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac_init_.py”, line 12, in
from .acr import ACRCT, ACRMRILarge
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\acr.py”, line 24, in
from .ct import (
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\ct.py”, line 46, in
from .core.nps import (
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\core\nps.py”, line 122, in
def plot_nps1d(nps1d: np.ndarray, ax: Axis | None = None) → Axis:
TypeError: unsupported operand type(s) for |: ‘type’ and ‘NoneType’
PS C:\Users\ben-abdellah-aghzout\Code> python -u “c:\Users\ben-abdellah-aghzout\Code\testlib.py”
Traceback (most recent call last):
File “c:\Users\ben-abdellah-aghzout\Code\testlib.py”, line 1, in
from pylinac import CatPhan504
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac_init_.py”, line 12, in
from .acr import ACRCT, ACRMRILarge
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\acr.py”, line 24, in
from .ct import (
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\ct.py”, line 46, in
from .core.nps import (
File “C:\Users\ben-abdellah-aghzout\AppData\Local\Programs\Python\Python38\lib\site-packages\pylinac\core\nps.py”, line 122, in
def plot_nps1d(nps1d: np.ndarray, ax: Axis | None = None) → Axis:
TypeError: unsupported operand type(s) for |: ‘type’ and ‘NoneType’
I tried to find the issue and it appears that it might be because I’m running python 3.8. Isn’t pylinac compatible with every python 3.x version ?
Thank you for your help,
Safir