fowode / pychess

Automatically exported from code.google.com/p/pychess
GNU General Public License v3.0
0 stars 0 forks source link

Add finger and follow buttons to players tab in FICS lounge #747

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Login to FICS
2. Click on "show console"
3. Type commands in the console

What is the expected output? What do you see instead?

Expected output: the output of the commnads ("help", "finger kayvan", etc.)
What happens instead, the FICS window disappears, along with these messages:

$ PYTHONPATH=lib/ ./pychess
/home/ksylvan/src/pychess/lib/pychess/Main.py:285: GtkWarning: 
IA__gtk_widget_set_events: assertion `!gtk_widget_get_realized (widget)' failed
  widgets["menubar1"].set_events(widgets["menubar1"].get_events() | gtk.gdk.DRAG_STATUS)
/home/ksylvan/src/pychess/lib/pychess/Main.py:286: GtkWarning: 
IA__gtk_widget_set_events: assertion `!gtk_widget_get_realized (widget)' failed
  widgets["Background"].set_events(widgets["Background"].get_events() | gtk.gdk.DRAG_STATUS)
notify flag False
  File "./pychess", line 117, in <module>
    import pychess.Main
  File "/home/ksylvan/src/pychess/lib/pychess/Main.py", line 17, in <module>
    from pychess.widgets import newGameDialog
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/newGameDialog.py", line 28, in <module>
    from pychess.widgets import ionest
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/ionest.py", line 14, in <module>
    from pychess.widgets import gamenanny, gamewidget
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/gamenanny.py", line 18, in <module>
    from gamewidget import getWidgets, key2gmwidg, isDesignGWShown
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/gamewidget.py", line 4, in <module>
    from BoardControl import BoardControl
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/BoardControl.py", line 15, in <module>
    from PromotionDialog import PromotionDialog
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/PromotionDialog.py", line 12, in <module>
    uistuff.cacheGladefile("promotion.glade")
  File "/home/ksylvan/src/pychess/lib/pychess/System/uistuff.py", line 455, in cacheGladefile
    pool.start(readit)
  File "/home/ksylvan/src/pychess/lib/pychess/ic/FICSConnection.py", line 259, in run
    self.client.handleSomeText(self.predictions, self.consolehandler)
  File "/home/ksylvan/src/pychess/lib/pychess/ic/VerboseTelnet.py", line 172, in handleSomeText
    answer = self.__state.handle(line)
  File "/home/ksylvan/src/pychess/lib/pychess/ic/VerboseTelnet.py", line 103, in handle
    self.callback(self.matchlist)
  File "/home/ksylvan/src/pychess/lib/pychess/ic/managers/FingerManager.py", line 298, in onFinger
    gametype = GAME_TYPES_BY_FICS_NAME[groupdict["gametype"].lower()]
<type 'exceptions.KeyError'> 'crazyhouse'

The main pychess window is still up, but trying to reconnect to FICS via the 
"Connect to FICS" window only causes these messages to show up on the terminal:

Traceback (most recent call last):
  File "/home/ksylvan/src/pychess/lib/pychess/widgets/TaskerManager.py", line 250, in connectClicked
    ICLogon.run()
  File "/home/ksylvan/src/pychess/lib/pychess/ic/ICLogon.py", line 19, in run
    dialog.lounge.present()
  File "/home/ksylvan/src/pychess/lib/pychess/ic/ICLounge.py", line 143, in present
    self.widgets["fics_lounge"].present()
TypeError: 'NoneType' object has no attribute '__getitem__'

Did you use PyChess from a repo, tarball, install or hg?

This is using "hg clone" of the latest code.

I can attach the latest logfile if needed. Thanks.

Please use labels and text to provide additional information.

This is Ubuntu-12.10 64bit.

Original issue reported on code.google.com by kayvansy...@gmail.com on 3 Jan 2013 at 10:55

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 5 Jan 2013 at 11:19

GoogleCodeExporter commented 9 years ago
Fixed in hg tip.
Telling the truth, the FICS console implementation is rather dumb yet. It's not 
interacting with the GUI, so many bugs can arise when sending different 
commands. I think it will be disabled in the upcoming releases, until problems 
get fixed.

Original comment by gbtami on 5 Jan 2013 at 11:30

GoogleCodeExporter commented 9 years ago
I did "hg pull" and tried again, with similar results to the first time (I did 
"finger maag" in the console, and it crashed again) but I did a fresh "hg 
clone" and it worked. Thank you.

If the console functionality is disabled, will you make the common commands 
available via the GUI?

Original comment by kayvansy...@gmail.com on 6 Jan 2013 at 5:37

GoogleCodeExporter commented 9 years ago
"hg pull" just hulls chages, "hg update" updates the working directory.
Or you can use "hg pull -u", it updates too.

The plan, regarding FICS, is to support all common functionality via GUI, and 
leave the exotic ones for console.

Original comment by gbtami on 6 Jan 2013 at 8:24

GoogleCodeExporter commented 9 years ago
Thanks, I'm not too familiar with mercurial. Thank you for the quick replies 
and bug fixes.

I can make pychess crash now by using the "follow" command in the console 
window. It would be cool to have a "Follow" button in the Players panel or to 
have some other GUI way of using the FICS follow command.

Original comment by kayvansy...@gmail.com on 6 Jan 2013 at 9:34

GoogleCodeExporter commented 9 years ago
I agree with the "Follow" button idea, but unfortunately PyChess doesn't 
support "follow" command (yet). 

Original comment by gbtami on 10 Jan 2013 at 9:31

GoogleCodeExporter commented 9 years ago
@kayvansylvan, committed a fix to follow crash in rev #ceb04cf64b81

Original comment by gbtami on 24 Mar 2013 at 5:24

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 6 Apr 2013 at 8:47

GoogleCodeExporter commented 9 years ago

Original comment by gbtami on 6 Apr 2013 at 9:05