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 running musescore_flask_server.py #88

Open
BRKNCD opened this issue Aug 17, 2022 · 5 comments
Open

Issue running musescore_flask_server.py #88

BRKNCD opened this issue Aug 17, 2022 · 5 comments

Comments

@BRKNCD
Copy link

BRKNCD commented Aug 17, 2022

I know this installation is deprecated, but I really want to try the MuseScore plugin.
When I run the musescore_flask_server.py command, I get the following error:

C:\Users\****\Desktop\DeepBach\DeepBach-master>musescore_flask_server.py
Traceback (most recent call last):
  File "C:\Users\****\Desktop\DeepBach\DeepBach-master\musescore_flask_server.py", line 4, in <module>
    import click
ModuleNotFoundError: No module named 'click'

C:\Users\Gian\Desktop\DeepBach\DeepBach-master>

I've already installed click by running the command: pip3.10 install click, that succesfully installed click:

Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Requirement already satisfied: colorama in c:\users\****\appdata\local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0\localcache\local-packages\python310\site-packages (from click) (0.4.5)
Installing collected packages: click
Successfully installed click-8.1.3

[notice] A new release of pip available: 22.2.1 -> 22.2.2
[notice] To update, run: C:\Users\****\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip install --upgrade pip

my python --version is: Python 3.10.6

@Ghadjeres
Copy link
Owner

Does the musescore_flask_server.py server works after installing the missing click package?

You may still have problems when using the Musescore plugin deepBachMuseScore.qml as I used the file "/tmp/deepbach.mxl" to read and write DeepBach compositions.
You can try changing this to a Window-style file in deepBachMuseScore.qml.
Hope this helps

@BRKNCD
Copy link
Author

BRKNCD commented Aug 17, 2022

No, it still gives me the error: ModuleNotFoundError: No module named 'click'
I'm not sure I can comprehend your last suggestion, I'm afraid.
I don't know how to proceed and I would really like to try out this script.
Thank you for your help!

@Ghadjeres
Copy link
Owner

Can you check if you are in the correct virtual environment?

@BRKNCD
Copy link
Author

BRKNCD commented Aug 20, 2022

Thank you so much for your help, I really appreciate it!

I tried to install the whole thing again, but unfortunately the installation process is too complicated for someone unfamiliar with either one of cmd, git, python, conda, torch, music21, and so on.
Right now, I'm not able to recreate the issue with the click module I had, only because I'm stuck way before getting to that point.

This is my proceeding from the beginning:

open cmd as admin;
cd C:\Users\****\Desktop\DeepBach\DeepBach-master
to access the folder where I downloaded and extracted the zip archive

conda env create --name deepbach_pytorch -f environment.yml
this one now immediately throws me the following error:
Solving environment: failed

So at the moment I'm not even able to start the virtual environment and I can't figure out why.

Also I tried to download the dataset running the command:
bash dl_dataset_and_models.sh
but it returned me:
"bash" is not a recognized command
so I installed bash:
pip3 install bash
runned the command again:
bash dl_dataset_and_models.sh
but still it returned me:
"bash" is not a recognized command

I'm sorry if I'm wasting anyone's time, but I'm really curious to see this one working!
Thank you so much

@Ghadjeres
Copy link
Owner

Hi,
So sorry, I must admit I know nothing about how to make this work on Windows.
Maybe you already have the deepbach_pytorch virtual environment created, so that you cannot create it again.
Maybe using WSL https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux could help make things easier.

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

No branches or pull requests

2 participants