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

Issue when saving max patch under Windows #561

Open
OmsInSerial opened this issue Jun 13, 2023 · 9 comments
Open

Issue when saving max patch under Windows #561

OmsInSerial opened this issue Jun 13, 2023 · 9 comments
Assignees
Labels
bug Something isn't working

Comments

@OmsInSerial
Copy link

Issue with node.script when saving max patcher under Windows. Here is the Max console output :

node.script: artifacts already exists, skipping.
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2
node.script: Building...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2
@ohmtech-rdi ohmtech-rdi added the bug Something isn't working label Jun 13, 2023
@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 13, 2023

To be able to reproduce, I guess that in this case, the package was not added to max? @OmsInSerial eg. #556 (comment)

@ohmtech-rdi
Copy link
Owner

@OmsInSerial We used a different method to launch erbb in Max for Windows. It already landed on main could you please git pull the main branch and give it a go? Thanks!

@OmsInSerial
Copy link
Author

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (main)
$ git status
On branch main
Your branch is up to date with 'origin/main'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   build-system/setup/__init__.py

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        samples/VCV/
        samples/test/

no changes added to commit (use "git add" and/or "git commit -a")
xxxxx@xxxxx MINGW64 ~/eurorack-blocks (main)
$ git pull
remote: Enumerating objects: 206, done.
remote: Counting objects: 100% (206/206), done.
remote: Compressing objects: 100% (104/104), done.
remote: Total 206 (delta 106), reused 174 (delta 98), pack-reused 0
Receiving objects: 100% (206/206), 188.67 KiB | 5.90 MiB/s, done.
Resolving deltas: 100% (106/106), completed with 18 local objects.
From https://github.com/ohmtech-rdi/eurorack-blocks
   073dfdc..7b8ff9a  main                   -> origin/main
 + 413dcc3...5d5f210 erbb-install-simulator -> origin/erbb-install-simulator  (forced update)
error: Your local changes to the following files would be overwritten by merge:
        build-system/setup/__init__.py
Please commit your changes or stash them before you merge.
Aborting
Updating 073dfdc..7b8ff9a
xxxxx@xxxxx MINGW64 ~/eurorack-blocks (main)
$ erbb setup
     --------------------------------------- 15.0/15.0 MB 50.4 MB/s eta 0:00:00
     -------------------------------------- 102.6/102.6 kB 5.8 MB/s eta 0:00:00
Extracting msys2_mingw64.zip...
Extracting kicad_minimal_windows_6.0.11-0.tar.gz...
Extracting gcc-arm-none-eabi-10.3-2021.10-win32.zip...
Installing python packages...
Optimizing erbb...
Checking toolchain...
OK.

Note that no path is added to Max after setup :

Sans titre2

Creating a fresh sample for Max :

xxxxx@xxxxx MINGW64 ~/eurorack-blocks/samples/test (main)
$ erbb init --name test --language max

Saving the sample in Max :

node.script: creating /Users/xxxxx/eurorack-blocks/samples/test/artifacts folder
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2
node.script: Building...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2

Added this link :

xxxxx@xxxxx MINGW64 ~/OneDrive/Documents/Max 8
$ ln -s ~/eurorack-blocks/build-system/

Then saving again :

node.script: creating /Users/xxxxx/eurorack-blocks/samples/test/artifacts folder
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 605, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 572, in main
    import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 42, in <module>
    import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1
node.script: Building...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 605, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 572, in main
    import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 42, in <module>
node.script: Error:     import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1

Hope it'll help. Thanks

@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 19, 2023

@OmsInSerial I think there was some sort of error when pulling:

error: Your local changes to the following files would be overwritten by merge:
        build-system/setup/__init__.py
Please commit your changes or stash them before you merge.
Aborting

@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 19, 2023

But also there is another fix we didn't integrate yet, because this ln -s can't really work properly actually. @eliottparis is currently working on it.

So maybe let's postpone the test until this is integrated @OmsInSerial .

@OmsInSerial
Copy link
Author

xxxxx@xxxxx MINGW64  MINGW64 ~/eurorack-blocks (main)
$ git stash
Saved working directory and index state WIP on main: 073dfdc Merge pull request #560 from ohmtech-rdi/fix-erbui-line-rendering

xxxxx@xxxxx MINGW64  MINGW64 ~/eurorack-blocks (main)
$ git pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0
Unpacking objects: 100% (5/5), 949 bytes | 17.00 KiB/s, done.
From https://github.com/ohmtech-rdi/eurorack-blocks
 * [new branch]      setup-ssl-certificate-for-download -> origin/setup-ssl-certificate-for-download
Updating 073dfdc..7b8ff9a
Fast-forward
 .github/workflows/macos_11.yml                     |    2 +-
 README.md                                          |    1 +
 build-system/build-system.gyp                      |    4 +
 build-system/completion/__init__.py                |    9 +-
 build-system/erbb/__init__.py                      |   40 +-
 .../erbb/generators/daisy/Makefile_template        |    4 +-
 .../erbb/generators/simulator/Makefile_template    |    4 +-
 build-system/erbb/generators/simulator/xcode.py    |   81 +
 .../erbb/generators/simulator/xcscheme_template    |   72 +
 build-system/erbb/generators/vscode/extensions.py  |   39 +
 .../generators/vscode/extensions_template.json     |    3 +
 build-system/erbb/generators/vscode/launch.py      |   50 +-
 .../erbb/generators/vscode/launch_template.json    |   10 +-
 .../erbb/generators/vscode/tasks_template.json     |   12 +-
 .../erbui/generators/vcvrack/code_template.cpp     |   16 +-
 build-system/scripts/erbb                          |    9 +
 build-system/setup/__init__.py                     |   96 +-
 .../setup/xcode/Erbb.ideplugin/Contents/Info.plist |   32 +
 .../Contents/Resources/Erbb.xcplugindata           |    0
 build-system/{ => setup}/xcode/Erbb.xclangspec     |    0
 .../xcode/Erbui.ideplugin/Contents/Info.plist      |   32 +
 .../Contents/Resources/Erbui.xcplugindata          |    0
 build-system/{ => setup}/xcode/Erbui.xclangspec    |    0
 .../xcode/Xcode.SourceCodeLanguage.Erbb.plist      |    0
 .../xcode/Xcode.SourceCodeLanguage.Erbui.plist     |    0
 .../xcode/Erbb.ideplugin/Contents/Info.plist       |   61 -
 .../xcode/Erbui.ideplugin/Contents/Info.plist      |   61 -
 build-system/xcode/README.md                       |   89 -
 build-system/xcode/install.py                      |   63 -
 .../getting-started/setup-vscode-bash1.png         |  Bin 0 -> 99740 bytes
 .../getting-started/setup-vscode-bash2.png         |  Bin 0 -> 36352 bytes
 documentation/getting-started/setup.md             |   29 +
 include/erb/SdramPtr.hpp                           |    5 +-
 include/erb/SramPtr.hpp                            |    5 +-
 include/erb/config.h                               |   18 -
 include/erb/daisy.gypi                             |    5 -
 include/erb/detail/MonotonicMemoryPool.hpp         |    8 +-
 include/erb/detail/Sdram.h                         |    9 +-
 include/erb/detail/Sram.h                          |    9 +-
 include/erb/detail/fnc.hpp                         |    7 +-
 include/erb/erb-vcvrack.gypi                       |    2 +
 include/erb/linux.gypi                             |    5 -
 include/erb/vcvrack/ModuleBoard.h                  |  109 +
 max/Eurorack-blocks/javascript/erb.build.js        |   33 +-
 max/drop/Drop.erbb                                 |   15 +
 max/drop/Drop.erbui                                |  123 +
 max/drop/Drop.maxpat                               | 5775 ++++++++++++++++++++
 max/drop/README.md                                 |    9 +
 max/drop/screenshot.png                            |  Bin 0 -> 74775 bytes
 src/detail/Sdram.cpp                               |   77 +-
 src/detail/Sram.cpp                                |   67 +-
 src/vcvrack/ModuleBoard.cpp                        |  162 +
 test/unit/test.gyp                                 |    4 +
 53 files changed, 6809 insertions(+), 457 deletions(-)
 create mode 100755 build-system/erbb/generators/simulator/xcode.py
 create mode 100644 build-system/erbb/generators/simulator/xcscheme_template
 create mode 100755 build-system/erbb/generators/vscode/extensions.py
 create mode 100644 build-system/erbb/generators/vscode/extensions_template.json
 create mode 100755 build-system/setup/xcode/Erbb.ideplugin/Contents/Info.plist
 rename build-system/{ => setup}/xcode/Erbb.ideplugin/Contents/Resources/Erbb.xcplugindata (100%)
 rename build-system/{ => setup}/xcode/Erbb.xclangspec (100%)
 create mode 100755 build-system/setup/xcode/Erbui.ideplugin/Contents/Info.plist
 rename build-system/{ => setup}/xcode/Erbui.ideplugin/Contents/Resources/Erbui.xcplugindata (100%)
 rename build-system/{ => setup}/xcode/Erbui.xclangspec (100%)
 rename build-system/{ => setup}/xcode/Xcode.SourceCodeLanguage.Erbb.plist (100%)
 rename build-system/{ => setup}/xcode/Xcode.SourceCodeLanguage.Erbui.plist (100%)
 delete mode 100755 build-system/xcode/Erbb.ideplugin/Contents/Info.plist
 delete mode 100755 build-system/xcode/Erbui.ideplugin/Contents/Info.plist
 delete mode 100644 build-system/xcode/README.md
 delete mode 100755 build-system/xcode/install.py
 create mode 100644 documentation/getting-started/setup-vscode-bash1.png
 create mode 100644 documentation/getting-started/setup-vscode-bash2.png
 create mode 100755 include/erb/vcvrack/ModuleBoard.h
 create mode 100644 max/drop/Drop.erbb
 create mode 100644 max/drop/Drop.erbui
 create mode 100644 max/drop/Drop.maxpat
 create mode 100644 max/drop/README.md
 create mode 100644 max/drop/screenshot.png
 create mode 100755 src/vcvrack/ModuleBoard.cpp

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (main)
$ erbb setup
Extracting msys2_mingw64.zip...
Extracting kicad_minimal_windows_6.0.11-0.tar.gz...
Extracting gcc-arm-none-eabi-10.3-2021.10-win32.zip...
Installing python packages...
Optimizing erbb...
Checking toolchain...
OK.

Saving in Max, same behavior...

node.script: creating /Users/xxxxx/eurorack-blocks/samples/test/artifacts folder
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2
node.script: Building...
node.script: Error: python3: can't open file 'C:\\Users\\xxxxx\\OneDrive\\Documents\\Max 8\\build-system\\scripts\\erbb': [Errno 2] No such file or directory
node.script: child process exited with code 2

Added the link

xxxxx@xxxxx MINGW64 ~/OneDrive/Documents/Max 8
$ ln -s ~/eurorack-blocks/build-system/

Saving in Max, same error

node.script: artifacts already exists, skipping.
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 614, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 581, in main
    import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 43, in <module>
node.script: Error:     from .generators.simulator.xcode import Xcode as simulatorXcode
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\generators\simulator\xcode.py", line 20, in <module>
    import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1
node.script: Building...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 614, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 581, in main
node.script: Error:     import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 43, in <module>
    from .generators.simulator.xcode import Xcode as simulatorXcode
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\generators\simulator\xcode.py", line 20, in <module>
node.script: Error:     import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1

@ohmtech-rdi
Copy link
Owner

ohmtech-rdi commented Jun 19, 2023

Ok, can you please @OmsInSerial :

git submodule update --init --recursive

Seems like gyp is missing for some reason.

@OmsInSerial
Copy link
Author

xxxxx@xxxxx MINGW64 ~/eurorack-blocks (main)
$ git submodule update --init --recursive

Saving in Max, same error

node.script: artifacts already exists, skipping.
gen~: exported: C:/Users/xxxxx/eurorack-blocks/samples/test/artifacts/module_max.cpp
node.script: Build starting
node.script: module: /Users/xxxxx/eurorack-blocks/samples/test/
node.script: Configuring...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 614, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 581, in main
node.script: Error:     import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 43, in <module>
node.script: Error:     from .generators.simulator.xcode import Xcode as simulatorXcode
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\generators\simulator\xcode.py", line 20, in <module>
node.script: Error:     import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1
node.script: Building...
node.script: Error: Traceback (most recent call last):
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 614, in <module>
node.script: Error:     sys.exit (main ())
              ^^^^^^^
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\scripts\erbb", line 581, in main
node.script: Error:     import erbb
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\__init__.py", line 43, in <module>
node.script: Error:     from .generators.simulator.xcode import Xcode as simulatorXcode
  File "C:\Users\xxxxx\OneDrive\Documents\Max 8\build-system\erbb\generators\simulator\xcode.py", line 20, in <module>
node.script: Error:     import gyp
ModuleNotFoundError: No module named 'gyp'
node.script: child process exited with code 1

@ohmtech-rdi
Copy link
Owner

@OmsInSerial I think we need to pair on it. I'm reading and re-reading the code, and I have absolutely no idea how this could possibly not work. I'll contact you privately

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants