Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build and Deploy Windows #283

Closed
wants to merge 12 commits into from
Closed

Build and Deploy Windows #283

wants to merge 12 commits into from

Conversation

CodyCBakerPhD
Copy link
Collaborator

@CodyCBakerPhD CodyCBakerPhD commented Aug 11, 2023

The workflow is green: https://github.com/NeurodataWithoutBorders/nwb-guide/actions/workflows/Build-and-deploy-win.yml

But when I install from the release: https://github.com/NeurodataWithoutBorders/nwb-guide/releases/tag/untagged-953a574ccfe5adc959bc

Everything goes well up until the connection to the back-end, which times out

My suggestion, since we all work on different devices, and since Mac is more touchy about signing issues than the other platforms, is that we focus on debugging the sister PR #284 for linux on the DANDI Hub (remote desktop), which is the common linux environment we all have access to

@CodyCBakerPhD CodyCBakerPhD mentioned this pull request Aug 11, 2023
@garrettmflynn
Copy link
Member

Same issue as that reported in #256. Seems like it'll be restricted to Windows, maybe even just my environment. Otherwise the deployment commands should be correct:


[spawn]:   File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "setupUtils\__init__.py", line 3, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "setupUtils\configureRouteHandlers.py", line 1, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "apis\__init__.py", line 2, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "apis\apiNeuroConv.py", line 6, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "manageNeuroconv\__init__.py", line 1, in <module>

[spawn]:   File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "manageNeuroconv\manage_neuroconv.py", line 2, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "neuroconv\__init__.py", line 1, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "neuroconv\basedatainterface.py", line 7, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "pynwb\__init__.py", line 15, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module

[spawn]:   File "hdmf\common\__init__.py", line 210, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "hdmf\common\sparse.py", line 1, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "scipy\sparse\__init__.py", line 287, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "scipy\sparse\csgraph\__init__.py", line 185, in <module>

[spawn]:   File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "scipy\sparse\csgraph\_laplacian.py", line 7, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "scipy\sparse\linalg\__init__.py", line 120, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module

[spawn]:   File "scipy\sparse\linalg\_isolve\__init__.py", line 4, in <module>
  File "PyInstaller\loader\pyimod03_importers.py", line 476, in exec_module
  File "scipy\sparse\linalg\_isolve\iterative.py", line 9, in <module>
ImportError: DLL load failed while importing _iterative: The specified module could not be found.     
[20428] Failed
[spawn]:  to execute script 'app' due to unhandled exception!

[spawn] exit: 1

After running npm run build:flask:win, you can quickly generate the same results by running node tests/testPyinstallerExecutable.js.

@garrettmflynn
Copy link
Member

I've tried uninstalling and reinstalling scipy and numpy several times to no avail. Maybe the .exe file works on someone else's computer or y'all have other ideas?

@CodyCBakerPhD
Copy link
Collaborator Author

Do you run into that same issue when running from an installation of the release version? https://github.com/NeurodataWithoutBorders/nwb-guide/releases/tag/untagged-9f2a67352fcc3420eed5

@CodyCBakerPhD
Copy link
Collaborator Author

Huh, when I adapt your node test to point to my installation from the release (nested now under <app install location>/resources/app/build/...) I also get this same error; odd however that when I build on my local device and run the same test, it works fine.

Trying a rerelease from this branch now

@CodyCBakerPhD
Copy link
Collaborator Author

I also see

image

when I launch the app on windows - but if I hit OK it launches fine

Just leaving here as a record

@garrettmflynn
Copy link
Member

I also see

image

when I launch the app on windows - but if I hit OK it launches fine

Just leaving here as a record

But does it start the Python server properly? The issue is generally that we can't get that script to run properly.

This looks like the previous issues around finding the correct file path. Will see if we need to dig into that more.

@CodyCBakerPhD
Copy link
Collaborator Author

But does it start the Python server properly?

No distributable we currently have that I can test (Linux and Windows) runs the backend successfully due the scipy issue

The front-end itself even started properly in this case, I just wanted to leave a record of the error window that popped up upon launching the app

@CodyCBakerPhD
Copy link
Collaborator Author

@garrettmflynn

The CI shows the same behavior as our local devices, but does not return a zero exit code and so the GitHub workflow proceeds without catching the failure: https://github.com/NeurodataWithoutBorders/nwb-guide/actions/runs/5858252120/job/15881822817

I was going to insert a

throw new Error("The distributable pyflask failed to run!");

below https://github.com/NeurodataWithoutBorders/nwb-guide/blob/fix_windows_deployment/tests/testPyinstallerExecutable.js#L34 - is that what you would recommend?

@garrettmflynn
Copy link
Member

Yeah that should work.

Base automatically changed from build-mac to main August 16, 2023 17:35
Base automatically changed from accidental_push_to_main to main August 19, 2023 00:25
@CodyCBakerPhD CodyCBakerPhD deleted the fix_windows_deployment branch August 22, 2023 03:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants