Comments (15)
I had the same problem and can confirm that the fix from #31 works.
I've put together a slightly more repeatable / durable solution for now:
- Install Python 3.8 from https://www.python.org/downloads/windows/
-- I chose to install for all users, becauase the idea of having a whole Python install in my user directory feels untidy to me. In reality, it probably doesn't make any difference where you install it. - Place the attached .bat file in your Bespoke Synth install directory, probably C:\Program Files\BespokeSynth (rename from .bat.txt to .bat): launcher.bat.txt
- You'll probably need to edit the .bat file to reflect your Python install location
- Edit the shortcut to Bespoke Synth in your Start Menu (right click -> properties) to point to launcher.bat instead of BespokeSynth.exe (in the same directory)
- (Optional) Edit the shortcut's icon to use BespokeSynth.exe to get the nice icon back :)
Now your start menu entry sets up the correct PYTHONHOME variable every time!
from bespokesynth.
this is a good suggestion, I will look into it
from bespokesynth.
Here's the error message:
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = 'C:\\Users\\MyUser\\Desktop\\Bespoke Synth\\BespokeSynth.exe'
sys.base_prefix = ''
sys.base_exec_prefix = ''
sys.executable = 'C:\\Users\\MyUser\\Desktop\\Bespoke Synth\\BespokeSynth.exe'
sys.prefix = ''
sys.exec_prefix = ''
sys.path = [
'C:\\Users\\MyUser\\Desktop\\Bespoke Synth\\python38.zip',
'.\\DLLs',
'.\\lib',
'C:\\Users\\MyUser\\Desktop\\Bespoke Synth',
]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'
Current thread 0x00000760 (most recent call first):
<no Python frame>
from bespokesynth.
I should definitely make this not crash, and give a good error message, but I'd guess this might be caused by an issue with your python install. do you have python installed? to confirm for you, the script module works for me in both windows 10 and macOS.
from bespokesynth.
Yes, I have Python 3.9.0 installed
from bespokesynth.
thank you for confirming! these machine config bugs are so tricky to debug/repro. does this workaround fix the crash for you? https://github.com/awwbees/BespokeSynth/issues/31
I still need to figure out the real fix, and why it's only a problem for some users
from bespokesynth.
Have you made any progress on this?
Would love to see the script module working on windows 10/python 3.9... 🙏
from bespokesynth.
I have not made progress, I'm not yet sure if it's possible to support multiple versions of python simultaneously, and it is not a high priority for me since python 3.8 is functioning fine. have you tried with python 3.8? that should work. here's a much more recent build to try: https://www.dropbox.com/s/5mqkzefw4mubdcx/Bespoke-Windows-20200726.zip?dl=1
is there any specific reason you'd prefer to use python 3.9 over 3.8?
from bespokesynth.
The best solution would be to embed python more directly and link to an interpreter statically.
from bespokesynth.
I was able to resolve this issue with the workaround from #31 by installing Python 3.8.10 to the default install location and entering set PYTHONHOME=C:\Users\<your user>\AppData\Local\Programs\Python\Python38
into the Command Prompt. Now scripts work like a charm!
from bespokesynth.
A suggestion for what might be a low-effort fix in Bespoke itself: a setting in the config menu which would allow the user to set a string for the PYTHONHOME var, which could then hopefully be passed to pybind on init? I had a quick poke at the pybind source to see if there was anything immediately obvious, but I'm not a C++ programmer so it went way over my head.
This suggested fix might be useful on other platforms, too, if folks have system versions of Python installed that aren't 3.8
from bespokesynth.
A slightly more hacky, but would probably work, version of the above would be to set the env var from Bespoke before initing pybind.
from bespokesynth.
Aha! I can't see any obvious way to set PYTHONHOME in pybind, but you can set it by calling Py_SetPythonHome
directly in the Python C API; there's some example code in this pybind issue here: pybind/pybind11#2369 (which I can see you've already come across, @awwbees). Thanks for the awesome software!
from bespokesynth.
The PYTHONHOME fix works for me too. I'd like to add that if you're using Powershell instead of the old Command Prompt (and I think it's the default on Windows nowadays?), you have to set PYTHONHOME with
$Env:PYTHONHOME="C:/path/to/your/python3.8/install"
from bespokesynth.
should be all set now that bespoke includes its own python
from bespokesynth.
Related Issues (20)
- Feat - Extended support for foreign keyboard layouts
- Bug - Foreign/non-ASCII characters insert blank character instead to future inputs HOT 1
- Crash bug opening current windows build HOT 11
- Large labels through a custom module or individual module font size
- Bug - Textbox stuck on-module HOT 2
- Songbuilder: Move scenes and targets with drag and drop
- notesequencer random buttons should accept pulses HOT 1
- drumsynth inconsistent pitch and amp envelopes behavior
- pitchbender module sends pitchbend messages even if disabled or deleted
- Cannot set envelope's target from a script HOT 2
- Songbuilder debug assert
- question about selfcontained fileformat & sample-referencing HOT 4
- pitchsetter sends note off on pitch value change
- Omnisphere plugin data is not reloaded properly between saves HOT 2
- Feature - Assign MIDI channel to notes HOT 9
- Multi-channel audio input/output for plugins
- Bespoke on Windows 7 Error 0xc000007b HOT 1
- Midicontroller does not save scale setting on midi controls
- [Feature request] StudioRack integration HOT 17
- valuesetter passes values when it's turned off, and it feels like it shouldn't.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bespokesynth.