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

Error: NSInternalInconsistencyException #14

Open
EsterAuren opened this issue Nov 15, 2023 · 4 comments
Open

Error: NSInternalInconsistencyException #14

EsterAuren opened this issue Nov 15, 2023 · 4 comments

Comments

@EsterAuren
Copy link

Hello! First: thank you so much for building this!
Disclaimer: I am new to python and github and i am grateful if someone can help me with my installation :)
I have spent yesterday and today trying to install it on my machine
(MacOS 12.5.1) and found out that the python installation with homebrew didn't have tkinter
-> so i officially installed python 3.11
tkinter seems to work
then I found out I need to sudo python run.py (like I said, im a beginner)

But now I encounter this upon changing the "activation_key": "f4", to f4 (because ctrl+alt+space didn't do anything for me.

I start up by navigarting to my directory and activating the virtual environment:
cd ~/Documents/Projects/whisper-writer
source venv/bin/activate
sudo python run.py

then everything starts up without error

when I press F4 I get this error:

Starting WhisperWriter...
/Users/username/Documents/Projects/whisper-writer/venv/lib/python3.11/site-packages/whisper/timing.py:57: NumbaDeprecationWarning: The 'nopython' keyword argument was not supplied to the 'numba.jit' decorator. The implicit default value for this argument is currently False, but it will be changed to True in Numba 0.59.0. See https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-object-mode-fall-back-behaviour-when-using-jit for details.
@numba.jit
Script activated. Whisper is set to run using a local model. To change this, modify the "use_api" value in the src\config.json file.
Press F4 to start recording and transcribing. Press Ctrl+C on the terminal window to quit.
^[OS2023-11-15 10:23:25.745 Python[58787:801092] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00000001a63a91a8 __exceptionPreprocess + 240
1 libobjc.A.dylib 0x00000001a60f3e04 objc_exception_throw + 60
2 CoreFoundation 0x00000001a63d4128 _CFBundleGetValueForInfoKey + 0
3 AppKit 0x00000001a8eb7930 -[NSWindow(NSWindow_Theme) _postWindowNeedsToResetDragMarginsUnlessPostingDisabled] + 372
4 AppKit 0x00000001a8ea292c -[NSWindow _initContent:styleMask:backing:defer:contentView:] + 948
5 AppKit 0x00000001a8ea256c -[NSWindow initWithContentRect:styleMask:backing:defer:] + 56
6 libtk8.6.dylib 0x0000000106b75ddc TkMacOSXMakeRealWindowExist + 572
7 libtk8.6.dylib 0x0000000106b75a8c TkWmMapWindow + 56
8 libtk8.6.dylib 0x0000000106adedc4 Tk_MapWindow + 152
9 libtk8.6.dylib 0x0000000106ae7130 MapFrame + 76
10 libtcl8.6.dylib 0x0000000106a1c9b0 TclServiceIdle + 84
11 libtcl8.6.dylib 0x0000000106a0106c Tcl_DoOneEvent + 296
12 libtk8.6.dylib 0x0000000106b68ca8 TkpInit + 800
13 libtk8.6.dylib 0x0000000106ae007c Initialize + 2292
14 _tkinter.cpython-311-darwin.so 0x00000001040da368 Tcl_AppInit + 92
15 _tkinter.cpython-311-darwin.so 0x00000001040da000 Tkapp_New + 548
16 _tkinter.cpython-311-darwin.so 0x00000001040d9dd8 _tkinter_create_impl + 268
17 _tkinter.cpython-311-darwin.so 0x00000001040d9a10 _tkinter_create + 240
18 Python 0x00000001019fa034 cfunction_vectorcall_FASTCALL + 80
19 Python 0x0000000101abbf84 _PyEval_EvalFrameDefault + 52572
20 Python 0x0000000101ac19ec _PyEval_Vector + 156
21 Python 0x0000000101995098 _PyObject_FastCallDictTstate + 96
22 Python 0x0000000101a22754 slot_tp_init + 180
23 Python 0x0000000101a190d8 type_call + 136
24 Python 0x0000000101994d78 _PyObject_MakeTpCall + 128
25 Python 0x0000000101abc06c _PyEval_EvalFrameDefault + 52804
26 Python 0x0000000101ac19ec _PyEval_Vector + 156
27 Python 0x0000000101999158 method_vectorcall + 364
28 Python 0x0000000101bbeeb0 thread_run + 220
29 Python 0x0000000101b3aff4 pythread_wrapper + 48
30 libsystem_pthread.dylib 0x00000001a625c26c _pthread_start + 148
31 libsystem_pthread.dylib 0x00000001a625708c thread_start + 8
)
libc++abi: terminating with uncaught exception of type NSException

Thank you very much if you can help! I greatly appreciate your time!
Best wishes
Kasper

@avi-cenna
Copy link

@EsterAuren unfortunately I got the same error on MacOS, and it looks like this project is unmaintained.

I'm working on a separate project similar to this one that would allow for integration with Hammerspoon (as the Python libraries for interfacing with Mac keyboard events seem to be unreliable.). If you're interested, I can notify you once this project is ready.

You can check the code for Hammerspoon on GitHub. It's a nice project that allows you to define custom hotkeys, similar to AutoHotkey on Windows.

@EsterAuren
Copy link
Author

@avi-cenna hi! Yes that would be lovely if you can notify me once your project is ready :)
If it's possible with a comment here or alternatively via this email:
ester_auren0j@icloud.com

I'll check out Hammerspoon!
I was happy to receive your message and appreciate the effort!
good luck in the meantime, until soon!

@avi-cenna
Copy link

Hello @EsterAuren , the project I mentioned is finally ready. You can find the repo here: https://github.com/avi-cenna/whisper-server

If you have any questions or run into any issues, please don't hesitate to reach out.

@savbell
Copy link
Owner

savbell commented Dec 28, 2023

Hi there,

Awesome project @avi-cenna — thank you for sharing! I'm glad WhisperWriter served as inspiration :)

In another issue (#13), @felixlu07 provided some code that resolved issues with the StatusWindow class. Likely this will be added in a future PR. In the meantime, @EsterAuren could you try and run the code with their changes and see if this fixes your error?

Thanks!

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

3 participants