biocore / qiime

Official QIIME 1 software repository. QIIME 2 (https://qiime2.org) has succeeded QIIME 1 as of January 2018.
GNU General Public License v2.0
286 stars 267 forks source link

Potential fix for RDP classifier issue with removing temp directory #674

Open jairideout opened 11 years ago

jairideout commented 11 years ago

David Soong suggested a fix for the issue where the temporary directory can't be removed when using assign_taxonomy.py -m rdp.

From this QIIME forum post:

The problem is in lib/qiime/pycogent_backports/rdp_classifier.py: when you rmtree(training_dir) in train_rdp_classifier_and_assign_taxonomy, some of the file handles in training_dir haven't been released by training_results. You can delete training_results to free up the file handles and rmtree would work.

i.e.

if model_output_dir is None:
    del training_results
    rmtree(training_dir)
gregcaporaso commented 11 years ago

@kylebittinger, do you want to check into this? Or have you already addressed the issue?

kylebittinger commented 11 years ago

I saw this on Friday and am still in shock at receiving such a helpful forum post! We should try to recruit this guy.

I will check over the code and add the fix if everything checks out. However, I was never able to reproduce the original problem in tests, so I will not be completely sure that it fixes the problem until I hear back from our users.

--Kyle

On Sun, Feb 10, 2013 at 7:56 PM, Greg Caporaso notifications@github.comwrote:

@kylebittinger https://github.com/kylebittinger, do you want to check into this? Or have you already addressed the issue?

— Reply to this email directly or view it on GitHubhttps://github.com/qiime/qiime/issues/674#issuecomment-13365229..

gregcaporaso commented 11 years ago

OK, thanks Kyle! You might want to point out to the user that they can make the changes and submit a pull request for this type of thing.