cutright / DVH-Analytics

A DICOM Database Application for Radiation Oncology
Other
82 stars 30 forks source link

DVH Analytics will not start #92

Closed SotiriStathakis closed 3 years ago

SotiriStathakis commented 4 years ago

Hi Dan @cutright I have similar issues this morning when I tried to launch DVH-analytics from the mac. I even installed python 3.7.9 but I could not get rid of the errors.

Any idea?

Thank you in advance. Sotiri


ERROR: Unhandled exception: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/main.py", line 1196, in OnInit self.frame = DVHAMainFrame(None, wx.ID_ANY, "") File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/main.py", line 145, in init self.roi_map = DatabaseROIs() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/tools/roi_name_manager.py", line 226, in init self.import_from_file() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/tools/roi_name_manager.py", line 243, in import_from_file self.import_physician_roi_maps() File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/tools/roi_name_manager.py", line 259, in import_physician_roi_maps self.import_physician_roi_map(abs_file_path, physician) File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/dvha/tools/roi_name_manager.py", line 273, in import_physician_roi_map for line in document: File "/usr/local/bin/../../../Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/codecs.py", line 322, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 2982: invalid start byte

OnInit returned false, exiting...

cutright commented 4 years ago

Can you verify the version of dvha? Since you're running from source, you may have to open dvha/_version.py to see.

Perhaps the previous version is still being picked up?

SotiriStathakis commented 4 years ago

here: version = '0.8.4post1'

cutright commented 4 years ago

Which version of macOS are you on?

I'm doing some tests now. I can't reproduce it, but I suspect this can be resolved by setting the file encoding. Currently DVHA has: https://github.com/cutright/DVH-Analytics/blob/26b118184620551a5c67a2cda93ca4a9291abd4b/dvha/tools/roi_name_manager.py#L272

Resolution might be one of the following: with open(abs_file_path, 'rb') as document: or with open(abs_file_path, 'r', encoding="utf-8", errors='ignore') as document:

If you're comfortable editing the site-package data, you could try manually editing it in the mean time. I'll push a fix as soon as I verify it.

cutright commented 4 years ago

I haven't been able to reproduce the issue yet. I've tried it on macOS Mojave 10.14.6 (w/ python 3.6 and 3.7) and Catalina 10.15.5 (w/ python 3.7).

Just curious, did you happen to manually edit any of ROI maps? Or maybe the TG263 csv file? Could you try renaming ~/Apps/dvh_analytics to ~/Apps/dvh_analytics_old, and then launch dvha?

cutright commented 3 years ago

Is this still an issue? A colleague of mine just set up DVHA from scratch without any issues.

SotiriStathakis commented 3 years ago

Hi,

I am good now. I have it implemented and using it.

Thank you for checking with me.

Best Regards,

Sotiri Stathakis, PhD, DABR

On Oct 22, 2020, at 3:29 PM, Dan Cutright notifications@github.com wrote:



Is this still an issue? A colleague of mine just set up DVHA from scratch without any issues.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fcutright%2FDVH-Analytics%2Fissues%2F92%23issuecomment-714742937&data=04%7C01%7C%7C726e784f91884f437da408d876c923f1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637389953545154027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hKMHq9tsanjnCyQoJpU6HS%2FjDL8URU%2BxdKZUTvyjBek%3D&reserved=0, or unsubscribehttps://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMVYLWSAEILP2SACTRBHJDDSMCIZPANCNFSM4QRZFYAQ&data=04%7C01%7C%7C726e784f91884f437da408d876c923f1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637389953545154027%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=kRJjIR6Y3W38hQzGWcljcfSTTLrRMjIZWTslIp6oBvE%3D&reserved=0.