MaddyGuthridge / Flapi

Remotely control FL Studio using the MIDI Controller Scripting API
MIT License
7 stars 0 forks source link

ModuleNotFoundError: No module named 'logging' #11

Closed joshebosh closed 3 months ago

joshebosh commented 3 months ago

Hello Miguel,

Thanks for a cool project, but I'm having trouble. I have FL v21.2.3 [Build 4004] installed I have Python 3.9.x installed because FL is using some pyyhon 3.9.x (i see via "sys.version"

I have followed instuction to install a configure flapi

I get this this error in both device files in the script output window:

init ok
Traceback (most recent call last):
  File "<string>", line 11, in <module>
ModuleNotFoundError: No module named 'logging'

but "pip install logging" does not resolved situation...

Will you please provide a pointer for resolution?

MaddyGuthridge commented 3 months ago

Hi! This is primarily because FL Studio's Python environment is different to your standard Python environment. In all current stable versions of FL Studio, only a limited subset of the standard library is available, which is why logging is failing to import. You can fix this by using the latest beta of FL Studio (at the time of writing this is 2024.1 Beta 9), which has access to far more of the standard library.

That being said, the script will likely still fail (at least on Windows) due to some other technical issues which I haven't resolved yet (I need to restructure the message format so that data can be distributed across many messages, since currently messages are often too long to process correctly).

I hope this helps!

joshebosh commented 3 months ago

I am on windows. I will try Beta and see how far I get. Thanks for the bump.