OpenSyd / syd

Managing images and data for Molecular Radionuclide Therapy (tentative)
Apache License 2.0
1 stars 0 forks source link

windows install #6

Closed ludicludo closed 3 years ago

ludicludo commented 3 years ago

Hi developpers, I'd like to install opensyd on my win10 laptop with python3.9 installed. I followed along the installing procedure in readme file & OpenSyd seems to be correctly installed but we failed at testing stage. At first, we had an issue related to a missing module (uproot3) that install manually (python -m pip install pyroot3). Then, we had a bunch of errors.

test_10_stitch (syd_test.test_syd_db.TestDB) ... Test Stitch (Add a 'labels' column) View Patient_default has been created with 0 elements (Add a 'labels' column) View Radionuclide_default has been created with 33 elements (Add a 'labels' column) View Injection_default has been created with 0 elements (Add a 'labels' column) View DicomStudy_default has been created with 0 elements (Add a 'labels' column) View File_default has been created with 0 elements (Add a 'labels' column) View Acquisition_default has been created with 0 elements (Add a 'labels' column) View DicomSeries_default has been created with 0 elements (Add a 'labels' column) View DicomFile_default has been created with 0 elements (Add a 'labels' column) View Listmode_default has been created with 0 elements View DicomStruct_default has been created with 0 elements (Add a 'labels' column) View Roi_default has been created with 0 elements (Add a 'labels' column) View DoseByOrgan_default has been created with 0 elements (Add a 'labels' column) View Image_default has been created with 0 elements 0%|▏ | 1/366 [00:00<03:20, 1.82it/s]ERROR test_11_DicomStruct (syd_test.test_syd_db.TestDB) ... ERROR test_12_Struct2ROI (syd_test.test_syd_db.TestDB) ... ERROR test_13_ROI (syd_test.test_syd_db.TestDB) ... ERROR test_14_Dose (syd_test.test_syd_db.TestDB) ... ERROR test_1_create_and_read_db (syd_test.test_syd_db.TestDB) Test #1. Create empty db. ... ERROR test_2_PrintFormat (syd_test.test_syd_db.TestDB) ... ERROR test_3_radionuclide (syd_test.test_syd_db.TestDB) ... ERROR test_4_patient (syd_test.test_syd_db.TestDB) ... ERROR test_5_injection (syd_test.test_syd_db.TestDB) ... ERROR test_6_Dicom (syd_test.test_syd_db.TestDB) ... ERROR test_7_Image (syd_test.test_syd_db.TestDB) ... ERROR test_8_listmode (syd_test.test_syd_db.TestDB) ... ERROR test_9_acquisition (syd_test.test_syd_db.TestDB) ... ERROR

====================================================================== ERROR: test_10_stitch (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 777, in test_10_stitch syd.insert_dicom_from_folder(db, "dataTest", p3) File "C:\Partage\developpements\syd\syd\syd_dicom.py", line 202, in insert_dicom_from_folder lm = syd.insert_listmode_from_file(db, tmp, patient) File "C:\Partage\developpements\syd\syd\syd_listmode.py", line 88, in insert_listmode_from_file ds = pydicom.read_file(str(filename)) File "C:\Users\l-ferrer\AppData\Local\Programs\Python\Python39\lib\site-packages\pydicom\filereader.py", line 887, in dcmread dataset = read_partial(fp, stop_when, defer_size=defer_size, File "C:\Users\l-ferrer\AppData\Local\Programs\Python\Python39\lib\site-packages\pydicom\filereader.py", line 670, in read_partial preamble = read_preamble(fileobj, force) File "C:\Users\l-ferrer\AppData\Local\Programs\Python\Python39\lib\site-packages\pydicom\filereader.py", line 623, in read_preamble raise InvalidDicomError("File is missing DICOM File Meta Information " pydicom.errors.InvalidDicomError: File is missing DICOM File Meta Information header or the 'DICM' prefix is missing from the header. Use force=True to force reading.

====================================================================== ERROR: test_11_DicomStruct (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 823, in test_11_DicomStruct db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_12_Struct2ROI (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 904, in test_12_Struct2ROI db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_13_ROI (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 968, in test_13_ROI db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_14_Dose (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 1025, in test_14_Dose db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_1_create_and_read_db (syd_test.test_syd_db.TestDB) Test #1. Create empty db.

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 125, in test_1_create_and_read_db db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_2_PrintFormat (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 145, in test_2_PrintFormat db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_3_radionuclide (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 152, in test_3_radionuclide db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_4_patient (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 166, in test_4_patient db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_5_injection (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 232, in test_5_injection db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_6_Dicom (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 326, in test_6_Dicom db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_7_Image (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 426, in test_7_Image db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_8_listmode (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 509, in test_8_listmode db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'

====================================================================== ERROR: test_9_acquisition (syd_test.test_syd_db.TestDB)

Traceback (most recent call last): File "C:\Partage\developpements\syd\syd_test\test_syd_db.py", line 623, in test_9_acquisition db = syd.create_db('test.db', 'data', True) File "C:\Partage\developpements\syd\syd\syd_db.py", line 69, in create_db os.remove(filename) PermissionError: [WinError 32] Le processus ne peut pas accéder au fichier car ce fichier est utilisé par un autre processus: 'test.db'


Ran 14 tests in 1.761s

FAILED (errors=14)

As far as I understand, it's related to the download procedure. Cheers Ludovic

tbaudier commented 3 years ago

Hi @ludicludo

The pip uproot3 installation is related to GateTools. The noisy warning was removed with that commit https://github.com/OpenGATE/GateTools/commit/b31ecad34061496a86b45c1ddbf119fc321500f1 but it was not integrated inside the last release (comming soon).

For the errors, I did a lot of tests on windows during these days. The problems only occurs on windows and it's related to SQLAlchemy. The database file (test.db) cannot be removed by the system because Python still use it somehow. I found a similar problem (https://groups.google.com/g/sqlalchemy/c/qpx1M4RTLmw?pli=1) but the solution to use NullPool is not suitable for us (https://github.com/OpenSyd/syd/commit/a8403d21ca65f7d39b6fd1fb0f9c8478e06a0cdd). So for the moment I do not have any solution for windows.

ludicludo commented 3 years ago

thank you for your time spent. In your tries, did you used wsl or wsl 2 as well ? Regards Ludovic

tbaudier commented 3 years ago

Hi @ludicludo

No, I used my own installation of Anaconda for windows https://www.anaconda.com/ I tried on old Windows laptop, I'm not sure wsl is availaible for the system.