katrain icon indicating copy to clipboard operation
katrain copied to clipboard

Error when starting contribute

Open Cabu opened this issue 2 years ago • 4 comments

When starting to contribute I got the following error log on the terminal:

Updating contribution settings {'katago': 'C:\\Users\\thier\\.katrain\\katago-v1.10.0-opencl-windows-x64.exe', 'config': 'katrain/KataGo/contribute_config.cfg', 'ownership': True, 'maxgames': 6, 'movespeed': 2, 'username': '[email protected]', 'password': '***', 'savepath': './dist_sgf/', 'savesgf': True}
ERROR: Exception in processing message katago_contribute (): Cannot change graphics instruction outside the main Kivy thread
 Traceback (most recent call last):
   File "C:\Python\Python310\lib\site-packages\katrain\__main__.py", line 308, in _message_loop_thread
     fn(*args, **kwargs)
   File "C:\Python\Python310\lib\site-packages\katrain\__main__.py", line 361, in _do_katago_contribute
     self.update_player(bw, player_type=PLAYER_AI, player_subtype=AI_DEFAULT)
   File "C:\Python\Python310\lib\site-packages\katrain\__main__.py", line 277, in update_player
     player_setup_block.update_player_info(bw, self.players_info[bw])
   File "C:\Python\Python310\lib\site-packages\katrain\gui\kivyutils.py", line 402, in update_player_info
     self.players[bw].update_widget(player_type=player_info.player_type, player_subtype=player_info.player_subtype)
   File "C:\Python\Python310\lib\site-packages\katrain\gui\kivyutils.py", line 364, in update_widget
     self.player_type.select_key(player_type)  # should trigger setup options
   File "C:\Python\Python310\lib\site-packages\katrain\gui\kivyutils.py", line 294, in select_key
     self.text = self.values[ix]
   File "kivy\properties.pyx", line 520, in kivy.properties.Property.__set__
   File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
   File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1213, in kivy._event.EventObservers._dispatch
   File "C:\Python\Python310\lib\site-packages\katrain\gui\kivyutils.py", line 284, in on_text
     self.dispatch("on_select")
   File "kivy\_event.pyx", line 727, in kivy._event.EventDispatcher.dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1191, in kivy._event.EventObservers._dispatch
   File "C:\Python\Python310\lib\site-packages\kivy\lang\builder.py", line 55, in custom_callback
     exec(__kvlang__.co_value, idmap)
   File "C:\Python\Python310\lib\site-packages\katrain\gui.kv", line 941, in <module>
     on_select: root.setup_options(*args)
   File "C:\Python\Python310\lib\site-packages\katrain\gui\kivyutils.py", line 350, in setup_options
     self.mode = self.player_type.selected[1]
   File "kivy\properties.pyx", line 520, in kivy.properties.Property.__set__
   File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
   File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1189, in kivy._event.EventObservers._dispatch
   File "C:\Python\Python310\lib\site-packages\kivy\lang\builder.py", line 67, in call_fn
     setattr(element, key, e_value)
   File "kivy\weakproxy.pyx", line 35, in kivy.weakproxy.WeakProxy.__setattr__
   File "kivy\properties.pyx", line 520, in kivy.properties.Property.__set__
   File "kivy\properties.pyx", line 567, in kivy.properties.Property.set
   File "kivy\properties.pyx", line 606, in kivy.properties.Property._dispatch
   File "kivy\_event.pyx", line 1307, in kivy._event.EventObservers.dispatch
   File "kivy\_event.pyx", line 1213, in kivy._event.EventObservers._dispatch
   File "C:\Python\Python310\lib\site-packages\kivy\uix\widget.py", line 1545, in on_opacity
     canvas.opacity = value
   File "kivy\graphics\instructions.pyx", line 736, in kivy.graphics.instructions.Canvas.opacity.__set__
   File "kivy\graphics\instructions.pyx", line 88, in kivy.graphics.instructions.Instruction.flag_data_update
 TypeError: Cannot change graphics instruction outside the main Kivy thread

System: Windows 10 Python: 3.10.5 Katatrain: Installed via pip install -u katrain (1.10.1 ?)

Cabu avatar Jun 24 '22 13:06 Cabu

Can you try the latest version (1.11) ?

chatdesk avatar Jun 24 '22 17:06 chatdesk

pip install -U katrain==1.11

ERROR: Ignored the following versions that require a different python version: 1.0.5 Requires-Python >=3.6, <3.8; 1.11.0 Requires-Python >=3.7, <3.10; 1.11.1 Requires-Python >=3.7, <3.10; 1.11.2 Requires-Python >=3.7, <3.10
ERROR: Could not find a version that satisfies the requirement katrain==1.11 (from versions: 1.0.6, 1.1.0, 1.1.1, 1.1.2, 1.2.0, 1.2.1, 1.2.2, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0, 1.10.1)
ERROR: No matching distribution found for katrain==1.11

It seems that because I have Python 3.10.5, katrain doesn't whant to install: "1.11.2 Requires-Python >=3.7, <3.10"

Cabu avatar Jun 24 '22 18:06 Cabu

It looks like kivy is now 3.10 compatible. Could you try installing via downloading the source, changing the setup.py to <3.11 and doing a pip install . ?

sanderland avatar Jun 28 '22 13:06 sanderland

I was having the same error on Mac and upgraded to the latest version.

Now I don't see an error, but it doesn't seem to do anything either. It gets stuck on Screen Shot 2022-07-27 at 10 24 11 PM with the status circle half red/yellow and spinning.

I'm using the included KataGo.

bani avatar Jul 28 '22 02:07 bani

Closed among inactive issues as a general cleanup

sanderland avatar Oct 09 '22 18:10 sanderland