scientisst / BioSPPy

Biosignal Processing in Python
https://biosppy.readthedocs.io/
Other
72 stars 22 forks source link

How to disable tkinter modules #48

Closed ChaeYeon01 closed 6 months ago

ChaeYeon01 commented 6 months ago

Hi. I have a problem : https://github.com/chaquo/chaquopy/issues/1145

I need to use chaquopy(Python SDK for Android) and import pyhrv in my android studio project. But 'import pyhrv' gets 'no module tkinter error'. pyhrv_cv2 The error was also caused at biosppy module.

Chaquopy doesn't support tkinter. but I don't use tkinter.

I think biosppy might be related to tkinter. I don't want tkinter to be used. Is there any way to tolerate the situation where tkinter is unavailable?

thanks.

sofia3ms commented 6 months ago

Hello @ChaeYeon01 !! Thank you for reporting this. I think this error is happening because the inter_plotting submodule, which uses tkinter, is being loaded in the signals.ecg and signals.acc files. To fix this and avoid future issues, we changed it so that biosppy doesn't import this submodule unless it is explicitly called. Can you check if it works for you now?

ChaeYeon01 commented 6 months ago

Thank you for your comment!! It works!!! ^오^

sofia3ms commented 6 months ago

Great!!