Qirky / Troop

Real-time Live Coding collaboration app
311 stars 37 forks source link

"Exception in Tkinter callback" #21

Open madskjeldgaard opened 5 years ago

madskjeldgaard commented 5 years ago

Hello, I'm trying (for the first time) to get Troop running on my MacOS machine via Python. I installed the latest version of Troop

I can get the server running, but when connecting a client I get the following error message after logging in to the server. The server responds by saying a client has logged in, but the client just has this error on it:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/tkinter/__init__.py", line 1550, in __call__
    return self.func(*args)
  File "/Users/madskjeldgaard/Dropbox/scripts/sc/Troop/src/interface/conn_info.py", line 118, in store_data
    self.finish()
  File "/Users/madskjeldgaard/Dropbox/scripts/sc/Troop/src/interface/conn_info.py", line 90, in finish
    self.client.setup(**self.options)
  File "/Users/madskjeldgaard/Dropbox/scripts/sc/Troop/src/client.py", line 95, in setup
    self.lang = langtypes[lang](self.args)
TypeError: __init__() takes 1 positional argument but 2 were given
skaermbillede 2019-01-22 kl 11 10 28

Thanks, by the way: This is a really cool project!

Best regards Mads

Qirky commented 5 years ago

Hey thanks for catching this! I updated how arguments are supplied to different interpreters but forgot to update the interpreters that communicate over OSC (so far SuperCollider and Sonic-Pi) so I've just pushed a fix. Let me know if it works ok for you.

madskjeldgaard commented 5 years ago

Works great! Thanks for the quick fix. I can't wait to have fun with this – thanks!

salkin-mada commented 5 years ago

very nice! Had the same issue here. fix works.

sicchio commented 5 years ago

I am having this error - trying to connect on a Mac to use Sonic Pi

Qirky commented 5 years ago

Hi sicchio, is it happening when you log in also? There was an experimental change made recently which has been reverted so if you could try the updated version and let me know if the problem persists that would be great.

sicchio commented 5 years ago

This happens when I try to log in. Tried the update and still happening. :-/

Qirky commented 5 years ago

Can you copy & paste (or screenshot) all of the error text? Thanks

sicchio commented 5 years ago

Here's the error:

python run-client.py --mode SonicPi
Exception in Tkinter callback Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py", line 1536, in call return self.func(*args) File "/Users/ksicchio/Troop/src/interface/conn_info.py", line 150, in store_data self.finish() File "/Users/ksicchio/Troop/src/interface/conn_info.py", line 104, in finish self.client.setup(**self.options) File "/Users/ksicchio/Troop/src/client.py", line 69, in setup except (ConnectionError, ConnectionRefusedError, AssertionError) as e: NameError: global name 'ConnectionRefusedError' is not defined

sicchio commented 5 years ago

It works when connecting to the local host but not another computer to that server. Hope that makes sense.

Qirky commented 5 years ago

Ahh ok it looks like there is an error connecting to the server - possibly network related but it's not clear - but the error handler isn't written for Python 2 and doesn't work as intended.

I've just pushed a change that will print all errors to the user and should give print the correct error to you. If you could try the updated version and let me know a) if it handles the error correctly (should display in red on the login form) and b) what the error is. Thanks.

sicchio commented 5 years ago

Currently getting in red on the login: [Errno 8] nodename nor servname provided or not known

But I am also at the university and under a firewall so will try again at home in a bit and see what other errors I get 😝

Qirky commented 5 years ago

Had to check stackoverflow for this one! I think the error is raised if some networking config doesn't exist so I've updated the code to check the localhost IP address explicitly, which could solve the problem. If you could update & test it again and let me know how you get on that'd be great, thanks.

If it doesn't work, you may need to change some system settings such as System Preferences -> Sharing and enable sharing.

igormpc commented 1 year ago

i cant get syntax highlighting works for supercollider here also:

❯ python3 run-client.py --syntax SuperCollider Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.10/tkinter/init.py", line 1921, in call return self.func(*args) File "/home/igor/code/Troop/src/interface/conn_info.py", line 190, in store_data self.finish() File "/home/igor/code/Troop/src/interface/conn_info.py", line 118, in finish self.client.setup(**self.options) File "/home/igor/code/Troop/src/client.py", line 107, in setup self.lang = langtypes[lang](self, self.args, syntax=getInterpreter(syntax)) File "/home/igor/code/Troop/src/interpreter.py", line 66, in init self.syntax_lang.setup() TypeError: Interpreter.setup() missing 1 required positional argument: 'self'