ncbi / pgap

NCBI Prokaryotic Genome Annotation Pipeline
Other
310 stars 90 forks source link

[BUG] March 30th update broke our ability to run on Windows #203

Closed bstew3 closed 2 years ago

bstew3 commented 2 years ago

"Windows uses USERPROFILE, instead of HOME. Windows doesn't have HOME and other OSs don't have USERPROFILE, so using either of these drops platform independence." From https://stackoverflow.com/questions/14742064/python-os-environhome-works-on-idle-but-not-in-a-script

To Reproduce Run PGAP on Windows 10. Follow the quick start guide on the PGAP wiki.

Expected behavior Expected PGAP to successfully update and run.

Software versions (please complete the following information):

Log Files Unable to generate log files because PGAP does not run.

Additional context We believe the problem was created with the below update, line 489. (https://github.com/ncbi/pgap/commit/17bae57a1f00f5c6db8f3a82d86262f12b8153cf)

azat-badretdin commented 2 years ago

Thank you for your report! This indeed sounds like a mistake on our side. Is there a way to meaningfully apply the following workaround from Quick Notes on Windows?

but this location can be changed by setting environmental variable PGAP_INPUT_DIR.

bstew3 commented 2 years ago

Thanks for the quick reply!

We've tried a few things, set the "PGAP_INPUT_DIR" environment variable in windows, but that seems to have had no effect. Also tried to comment out the original self.install_dir and set it manually. This works initially, but then pgap.py is redownloaded and replaced by the update process and we're back to square one.

'HOME'
Traceback (most recent call last):
  File "C:\Users\<username>\PGAP\pgap.py", line 938, in <module>
    main()
  File "C:\Users\<username>\PGAP\pgap.py", line 935, in main
    sys.exit(retcode)
SystemExit: 1
azat-badretdin commented 2 years ago

This works initially, but then pgap.py is redownloaded and replaced by the update process and we're back to square one.

That can be prevented by --no-self-update flag.

"PGAP_INPUT_DIR" environment variable in windows, but that seems to have had no effect.

Now this sounds like a bug on our part.

bstew3 commented 2 years ago

It seems as though we have managed to make it work after using --no-self-update and explicitly specifying the "self.install_dir." Is this something that we will have to do with every update to enable us to use a Windows 10 OS. Thank you for your help.

azat-badretdin commented 2 years ago

You are welcome. We are planning to see what we can do on the software side and opened an internal ticket for this.

george-coulouris commented 2 years ago

Hi @bstew3, pgap.py should now use %USERPROFILE% when appropriate, please give it a try. We'll also investigate how PGAP_INPUT_DIR works on Windows. Thank you for your report!