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

SyntaxError on running inputscope #17

Closed
ulcuber opened this issue Jul 8, 2022 · 12 comments
Closed

SyntaxError on running inputscope #17

ulcuber opened this issue Jul 8, 2022 · 12 comments

Comments

@ulcuber
Copy link
Contributor

ulcuber commented Jul 8, 2022

File "<stdin>", line 1
    start mouse
          ^
SyntaxError: invalid syntax
@suurjaak
Copy link
Owner

suurjaak commented Jul 8, 2022

What was the command that resulted in this error?

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

@suurjaak main inputscope
Running inputscope-* works

@suurjaak
Copy link
Owner

suurjaak commented Jul 8, 2022

Could you post a screenshot?

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

@suurjaak
image

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

@suurjaak and then cannot exit via ctrl+c
image
image

Traceback (most recent call last):
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 362, in OnLogResolution
    def OnLogResolution(self, event=None):
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 66, in <lambda>
    signal.signal(signal.SIGINT,   lambda *a, **kw: self.stop(True))
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 112, in stop
    if self.listener: self.listenerqueue.put("exit"), self.listener.terminate()
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/util.py", line 115, in put
    self.output.flush()
BrokenPipeError: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 362, in OnLogResolution
    def OnLogResolution(self, event=None):
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 66, in <lambda>
    signal.signal(signal.SIGINT,   lambda *a, **kw: self.stop(True))
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 112, in stop
    if self.listener: self.listenerqueue.put("exit"), self.listener.terminate()
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/util.py", line 115, in put
    self.output.flush()
BrokenPipeError: [Errno 32] Broken pipe
Traceback (most recent call last):
  File "/home/victor/.local/lib/python3.9/site-packages/wx/py/shell.py", line 383, in OnIdle
    def OnIdle(self, event):
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 66, in <lambda>
    signal.signal(signal.SIGINT,   lambda *a, **kw: self.stop(True))
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/main.py", line 112, in stop
    if self.listener: self.listenerqueue.put("exit"), self.listener.terminate()
  File "/home/victor/.local/lib/python3.9/site-packages/inputscope/util.py", line 115, in put
    self.output.flush()
BrokenPipeError: [Errno 32] Broken pipe

@suurjaak
Copy link
Owner

suurjaak commented Jul 8, 2022

Can you tell me more about your setup:

  1. What operating system are you using?
  2. How was InputScope installed?

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

@suurjaak
1.

  • OS: Gentoo Base System release 2.8 x86_64
  • Kernel: 5.10.76-gentoo-r1
  1. pip install --user inputscope
    And from source pip install --user ./ same output

@suurjaak
Copy link
Owner

suurjaak commented Jul 8, 2022

Where do those stack traces originate from? It sort of looks like they're from InputScope's Python console?

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

#17 (comment)
That seems like error communicating with subprocess

#17 (comment)
That one probably doing too much in signal.signal(signal.SIGINT, lambda *a, **kw: self.stop(True)). Too heavy handler for signal. Usually they only setting flag like self.running = False

@suurjaak
Copy link
Owner

suurjaak commented Jul 8, 2022

Do I understand the situation correctly:

  1. On running inputscope, the SyntaxError gets printed, but the program itself continues to run?
  2. On pressing Ctrl-C, you get the stack trace?

@ulcuber
Copy link
Contributor Author

ulcuber commented Jul 8, 2022

@suurjaak

  1. Yes, continues but not tracks events.
  2. Yes.
    Program itself shows icon in tray and able to open web server. Main problem affects only listener.

@suurjaak
Copy link
Owner

Fixed in the freshly released v1.6.

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