Closed reza021mohammadi closed 4 years ago
My guess is DVHA crashed because of the DICOM files you're using. Which TPS and version are you using? Have they been anonymized or edited since TPS export? On windows, there should be a terminal, are there any errors printed there?
The TPS is Monaco and version 5 I guess. you can download patient file from below link:
https://mega.nz/file/TXZmGYzb#I9NAgVYjdhTMA2vjUtqT5WixJrxo_9n5GoaoGnulUx0
Have they been anonymized or edited since TPS export? NO Are there any errors printed there? No but I attached and image of it here.
I was able to import the provided files with no issues, both from the macOS executable and from source code. I'm a little unsure of what the issue is right now.
Is your user an admin? I wonder if this is related to write-privilege issues?
Oh... you're running the file from a shared folder and within a VM? That hasn't been tested (at least not by me). Maybe that's causing some file permission problems?
Is this also the case for Mac? What is your computer's OS?
I was able to import the provided files with no issues, both from the macOS executable and from source code. I'm a little unsure of what the issue is right now.
Is your user an admin? I wonder if this is related to write-privilege issues?
Yes, I just have one user which is admin.
Oh... you're running the file from a shared folder and within a VM? That hasn't been tested (at least not by me). Maybe that's causing some file permission problems?
Is this also the case for Mac? What is your computer's OS?
Actually, I tried with a installed windows on a PC and the issue happened again. The Mac OS version is 10.15 Catalina
My only other guess is that this is a PyInstaller issue (the software I use to create the executable).
Any chance you're comfortable with python? If so, can you try a pip install dvha
then call dvha
, and try importing there?
My only other guess is that this is a PyInstaller issue (the software I use to create the executable).
Any chance you're comfortable with python? If so, can you try a
pip install dvha
then calldvha
, and try importing there?
Unfortunately, I have another issue.
Which version of python?
I use python 3.6
on my Mac, python 3.7
on Windows. I seem to recall python 3.7
on Mac comes bundled with tkinter, which causes issues for me with using Pyinstaller... maybe that's related, and I might be mistaken too.
it might be worth installing Mac command line tools too if you haven't already.
@bastula suggested you try pythonw -m dvha
@reza: I would suggest to download the python project from github and run "dvha_app.py" with pyCharm on a Mac. Then all needed files can/ will be downloaded. I had no problems with this approach. Could import yout files, too. @Dan: Maybe the needed SQL-database is not installed correctly? I am not sure. I never tried import without working dvh-Database
sqlite3 comes with python3, which just creates a .db text file on first connection... nothing to install.
This will be a very difficult thing to diagnose without being able to reproduce it. @reza, hopefully you were able to get the source code working?
sqlite3 comes with python3, which just creates a .db text file on first connection... nothing to install.
This will be a very difficult thing to diagnose without being able to reproduce it. @reza, hopefully you were able to get the source code working?
Hi Unfortunately, I tried several times but it didn’t work.
The good news is that we know your system can run DVHA from python source code because PyInstaller executables are basically just zip files of python and the files needed for the app.
Python 3.8 no longer requires the use of pythonw
per their docs. Maybe install a stand alone version of python 3.8. I personally do not use the macOS install of python. And pythonw
is a mac thing, so you could try it within your Windows VM. I'm pretty sure I've tried python 3.8, but opted not to use it because of PyInstaller compatibility (unrelated to DVHA).
Finally, I recommend using virtual environments. If you're using PyCharm, this is really easy to do.
I should really implement error logging so executable users can just send the terminal output. I'll try adding that and post a new executable if I get it working. As far as the original issue, I'm still at a loss but all signs point towards OS or environmental differences.
@reza021mohammadi Can you download the 0.8.0rc1 dmg from here? Then post what you get in the error log (~/Apps/dvh_analytics/logs/dvha.log)?
I've added error logging. Many thanks to @bastula, since I lifted his logging code almost verbatim from dicompyler.
I've tested by injecting an exception immediately after clicking Import as well as within an import thread. So this is able to catch errors from modules outside of the main frame even if raised in another thread, and it works on both source and PyInstaller.
@cutright I have installed that version and there was nothing in the log file. so I couldn't attache it here.
We can't catch a break, can we... any luck running from source with python 3.8 on macOS or in your Windows VM?
I have two more thoughts, one specific and one pretty vague. The first is an easy check. If that fails, I think you just need to figure out how to get a framework version of python working.
Generally, I use threading
for CPU intensive tasks. However, I use multiprocessing
with only one process at a time to do the Dose Summation because threading
had memory allocation issues I could not resolve.
So I wonder, can you try importing but uncheck "Sum all dose grids in a study"? Even if you don't have multiple dose grids, multiprocessing.Pool
is invoked. Maybe that is causing the issue?
This probably won't help... but I just remembered I had a very mysterious issue back in February that I never posted because it was not an issue with DVHA source code.
Running DVHA from source always worked, but the executable would crash on the first call using Shapely
only on my laptop - it worked fine on my iMac and my friend's MacBook Pro. I diagnosed this by systematically commenting out certain lines in the import process and generating executables each time. I even upgraded my OS to Catalina, still got the same issue.
Unfortunately, this was resolved with a fresh OS install. I haven't had the issue since. But it illustrates that there could be conflicts outside of python libraries causing your issue.
@cutright thanks for your kindly support. I have did with PyCharm and source code but same issue.
I have also, tried with windows and use source code but it didn't work too.
I can prepare a remote connection for you with anydesk to remote my laptop if you need. please let me know if you needed. (my email: reza021mohammadi@gmail.com)
Go to your Terminal and try calling: pythonw dvha_app.py
Here are the results.
This is good news. Looks like you did not install the python dependencies.
pip install -r requirements.txt
Actually, you're better off letting PyCharm handle it. If you open pretty much any file (let's say main.py), you'll get a banner up top, click on Install requirements.
Any updates? If not, I'd like to close this issue. I can reopen it if you can provide more information... but it doesn't look like this is really a DVHA source code issue.
Yes unfortunately I have issue with source code
On Sat, May 23, 2020 at 01:03 Dan Cutright notifications@github.com wrote:
Any updates? If not, I'd like to close this issue. I can reopen it if you can provide more information... but it doesn't look like this is really a DVHA source code issue.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/cutright/DVH-Analytics/issues/74#issuecomment-632898603, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIYUXEFGY5QTWMZQPYU3C3RS3OQXANCNFSM4M2T4FRQ .
-- Reza Mohammadi Medical Physicist
Can you elaborate? You haven't pointed to any source code issues yet. Can you run from a python console / pycharm?
As far as I can tell, everything posted thus far has to do with your computer environment, not DVHA explicitly.
I can only speculate with the information provided, but there's either an issue with PyInstaller and your OS, or maybe your computer is failing on the first use of multiprocessing.Pool
.
If it's a PyInstaller, I'm going to need much more help from you since I cannot reproduce it and PyInstaller is not my code. If you can get DVHA running from source code (like you're trying via PyCharm above), please post your console errors or possible an OS error.
I'll be happy to reopen this issue once more information is provided.
Can you try the executable for v0.8.2?
I don't expect it will solve your problem, but it might tell us if the issue is related to writing to the SQL DB. Another user had an issue that looked the same as yours but it was resolved by being an admin user.
If you go to Settings->Database Connection... there is now a "Write Test" button as pictured below. Do both write and delete tests pass for you?
I have installed DVHA-v0.7.8-macOS.Mojave.dmg and DVHA-v0.7.8-Windows7.zip. For Mac version when I clicked to import (attached image), nothing happened. what I do wrong?
And also, when I did same steps with window, during import the software was closed.