drestebon / papageorge

Simple client for the Free Internet Chess Server
GNU General Public License v3.0
5 stars 1 forks source link

timeseal #37

Closed enricoT closed 9 years ago

enricoT commented 9 years ago

\ (papageorge:3901): WARNING : Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. Traceback (most recent call last): File "/usr/bin/papageorge", line 60, in papageorge.run(fics_pass) File "/usr/lib/python3.5/site-packages/papageorge/init**.py", line 41, in run log = open(os.path.expanduser(config.general.log),'a') File "/usr/lib/python3.5/posixpath.py", line 228, in expanduser if not path.startswith(tilde): AttributeError: 'bool' object has no attribute 'startswith'

drestebon commented 9 years ago

This is an awfull backward compatibility problem, that shouldn't be so difficult to endure. The general_log_file doesn't exist anymore, now you can set:

general_log = [False | off | log_file_path]

I guess you have a:

general_log = True

in your ~/.papageorge.conf you should get rid of

enricoT commented 9 years ago

> Connecting Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 817, in _glib_idle_callback
    callback()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 554, in connect_at_start
    self.cmd_line.cmd_connect((0,), '')
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 162, in cmd_connect
    self.cli.connect_fics()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 561, in connect_fics
    '5000', '-p','5000'])
  File "/usr/lib/python3.5/subprocess.py", line 950, in __init__
    restore_signals, start_new_session)
  File "/usr/lib/python3.5/subprocess.py", line 1540, in _execute_child
    raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] File o directory non esistente: '/home/enrico/~o/timeseal.Linux-i386'

This is in case of path timeseal

drestebon commented 9 years ago

where is your timeseal binary? which value you gave to general_timeseal in ~/.papageorge.conf?

enricoT commented 9 years ago

[enrico@enrico ~]$ pwd /home/enrico [enrico@enrico ~]$ ls timese* timeseal.Linux-i386 [enrico@enrico ~]$ cat .papageorge.conf | grep timeseal ; Path to timeseal program (f.ex. ~/bin/timeseal.Linux-i386), comment or set to off if you don't have one or don't want to use it general_timeseal = ~/timeseal.Linux-i386

> Connecting Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 817, in _glib_idle_callback
    callback()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 554, in connect_at_start
    self.cmd_line.cmd_connect((0,), '')
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 162, in cmd_connect
    self.cli.connect_fics()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 562, in connect_fics
    fics = telnetlib.Telnet('localhost', port=5000)
  File "/usr/lib/python3.5/telnetlib.py", line 218, in __init__
    self.open(host, port, timeout)
  File "/usr/lib/python3.5/telnetlib.py", line 234, in open
    self.sock = socket.create_connection((host, port), timeout)
  File "/usr/lib/python3.5/socket.py", line 707, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 698, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connessione rifiutata
drestebon commented 9 years ago

say, what happens when you run:

./timeseal.Linux-i386 167.114.65.195 5000 -p 5000

on your home directory? can you connect to your localhost with something like:

telnet 127.0.0.1 5000

in another terminal?

enricoT commented 9 years ago

timeseal 167.114.65.195 5000 -p 5000 Usage: timeseal ICS-host [ICS-port]

this way connects

timeseal 167.114.65.195 5000

allowing me login and password in telnet window as if i type telnet freechess.org 5000

enricoT commented 9 years ago

after last try with 127.0.0.1

Connecting Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 817, in _glib_idle_callback
    callback()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 546, in connect_at_start
    self.cmd_line.cmd_connect((0,), '')
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 162, in cmd_connect
    self.cli.connect_fics()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 554, in connect_fics
    self.fics = telnetlib.Telnet('127.0.0.1', port=5000)
  File "/usr/lib/python3.5/telnetlib.py", line 218, in __init__
    self.open(host, port, timeout)
  File "/usr/lib/python3.5/telnetlib.py", line 234, in open
    self.sock = socket.create_connection((host, port), timeout)
  File "/usr/lib/python3.5/socket.py", line 707, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 698, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connessione rifiutata

i have this answer

enricoT commented 9 years ago

if i run with file or with login name password connection is ok also with name enter guest so the problemwas my timeseal, i cleaned all timeseal i reinstalled timeseal fics-timeseal from aur and now it works!! :moneybag: so i messed up, also github accused me to be a bot :sob:

drestebon commented 9 years ago

Very happy to hear that, I'm closing this issue then ;)

enricoT commented 9 years ago

ops too soon 32 bit is not working 64bit is 32bot client: Connecting Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 817, in _glib_idle_callback callback() File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 546, in connect_at_start self.cmd_line.cmd_connect((0,), '') File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 162, in cmd_connect self.cli.connect_fics() File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 554, in connect_fics self.fics = telnetlib.Telnet('127.0.0.1', port=5000) File "/usr/lib/python3.5/telnetlib.py", line 218, in init self.open(host, port, timeout) File "/usr/lib/python3.5/telnetlib.py", line 234, in open self.sock = socket.create_connection((host, port), timeout) File "/usr/lib/python3.5/socket.py", line 707, in create_connection raise err File "/usr/lib/python3.5/socket.py", line 698, in create_connection sock.connect(sa)

This is papageorge.conf cat .papageorge.conf

; You can copy this file to your home directory for papageorge to use it

; These are overriden by arguments passed to papageorge
fics_user = guest
; fics_pass = 

; #################### General ####################

; Path to log file (for debugging). Set to off if you don't want to keep one
general_log = off
general_log = ~/papageorge.log

; Path to timeseal program (f.ex. ~/bin/timeseal.Linux-i386), comment or set to off if you don't have one or don't want to use it
general_timeseal = /usr/bin/timeseal

; Commands issued after logging in
general_startup_command = tell estebon I'm using Papageorge!

; If >0, papageorge will send a test message to the server after n seconds of innactivity.
; Do not set very low to avoid overloading the server.
; Note that you will not be disconnected for innactivity
general_connection_test_timeout = 60

; #################### Board ####################

board_bg                    = #000000
board_text_active           = #ffffff
board_text_inactive         = #707070
board_turn_box              = #343434
board_turn_box_excl         = #702828
board_dark_square           = #a0a0a8
board_light_square          = #bdbdc5
board_dark_square_selected  = #909098
board_light_square_selected = #d0d0d8
board_square_move_sent      = #b0b0b8
board_square_marked         = #f2f2f2

board_font                  = Inconsolata
board_font_size             = 18

board_border_color          = #000000
board_border                = off
board_font_coords_size      = 10

board_handle_justify        = right

; Default bindings for built-in commands
board_accel_fforward        = <Shift>Up
board_accel_frewind         = <Shift>Down
board_accel_forward         = Up
board_accel_rewind          = Down
board_accel_prev_move       = Left
board_accel_next_move       = Right
board_accel_flip            = <Control>f
board_accel_promote         = Tab
board_accel_border          = <Control>b
board_accel_board_commands  = Escape
board_accel_seek_graph      = F5

; Bind keys to fics commands with:
;
; board_command = (<accelerator>, '"<fics command>"')
;
; The use of single and double quotes is important! it enables you to use format()
; to access parameters of the board

board_command = ('<Control>g',       '"say Hello {}! Good luck!".format(self.state.opponent)')
board_command = ('<Shift>g',         '"say Good game!"')
board_command = ('<Control>o',       '"old {} {}".format(self.state.me, self.state.opponent)')
board_command = ('<Control>a',       '"tell Analysisbot obs {}".format(self.board_number)')
board_command = ('<Control><Shift>a','"tell Analysisbot stop"')

; #################### Console ####################

console_handle_mouse = on ; Note that you can rollback to normal mouse behaviour on your console holding <Shift>

; Colors used for the highlights configured as 'palette'
console_palette = #700
console_palette = #f00
console_palette = #f00
console_palette = #707
console_palette = #f0f
console_palette = #070
console_palette = #0f0
console_palette = #770
console_palette = #ff0
console_palette = #007
console_palette = #00f
console_palette = #077
console_palette = #0ff

; Colors for the console - you must define them before using them!
console_color = ("yellow" ,         "#ff8")
console_color = ("green" ,          "#0f6")
console_color = ("blue" ,           "#0ff")
console_color = ("red" ,            "#f00")
console_color = ("magenta" ,        "#f0f")
console_color = ("gray" ,           "#ddd")
console_color = ("darkyellow" ,     "#860")
console_color = ("darkgreen" ,      "#0a0")
console_color = ("darkblue" ,       "#08f")
console_color = ("darkred" ,        "#800")
console_color = ("darkmagenta" ,    "#a08")
console_color = ("darkgray" ,       "#88a")

console_default_color  = #999
console_game_end_color = #eee
console_echo_color     = #aa0

; Colors for highlighting you can also use regular expressions here!
console_highlight = ("announcements", "darkyellow")
console_highlight = ("-->",           "yellow")
console_highlight = ("tells",         "green")
console_highlight = ("shouts",        "magenta")
console_highlight = ("kibitzes",      "palette")
console_highlight = ("whispers",      "palette")
console_highlight = ("chat",          "#4dd")       ; all channels
console_highlight = ("channel 50",    "#95b")
console_highlight = ("channel 53",    "darkmagenta")
console_highlight = ("channel 74",    "darkred")
console_highlight = ("channel 85",    "darkmagenta")
console_highlight = ("channel 1",     "gray")
console_highlight = ("channel 2",     "darkgray")
console_highlight = ("user estebon",  "red")        ; tell from user

; Bind keys to fics commands in the console
; note that the accelerators here follow the notation from urwid

console_command = ('f1', '"help"')
console_command = ('f2', '"who ar44"')

removed timeseal from disk installed fics-timeseal

locate timeseal /home/enrico/Scaricati/scid-vs-pc-svn/timeseal /home/enrico/Scaricati/scid-vs-pc-svn/timeseal/time__seal.Linux-i386 /usr/bin/fics-xboard-timeseal /usr/bin/timeseal /usr/share/eboard/timeseal.Linux

timeseal is in the proper position

i lost hope :sob:

drestebon commented 9 years ago

In my system it works fine with binary provided by the fics-timeseal package. You say it works in your 64bit machine, but it doesn't in your 32bit machine?

enricoT commented 9 years ago

For 32 bit there is no way to run timeseal, for 64 bit sometime i can start the client with timeseal but i m no 100% sure why starts and why not. i will try some other test to realize in wich condition papageorge starts correctly in 64 bit for 32 bit i have no clue. xboard is c++ or c eboard is c and pychess i bet is python older version, for all 3 client i have no problem connecting with timeseal. Im considering that Popen is too advanced for my freaky notebook :D ciao!

This 32 bit notebook

> Connecting Traceback (most recent call last):
  File "/usr/lib/python3.5/site-packages/urwid/main_loop.py", line 817, in _glib_idle_callback
    callback()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 543, in connect_at_start
    self.cmd_line.cmd_connect((0,), '')
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 162, in cmd_connect
    self.cli.connect_fics()
  File "/usr/lib/python3.5/site-packages/papageorge/cli.py", line 551, in connect_fics
    self.fics = telnetlib.Telnet('127.0.0.1', port=5000)
  File "/usr/lib/python3.5/telnetlib.py", line 218, in __init__
    self.open(host, port, timeout)
  File "/usr/lib/python3.5/telnetlib.py", line 234, in open
    self.sock = socket.create_connection((host, port), timeout)
  File "/usr/lib/python3.5/socket.py", line 707, in create_connection
    raise err
  File "/usr/lib/python3.5/socket.py", line 698, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connessione rifiutata
drestebon commented 9 years ago

Enrico! I changed the implementation for timeseal support in commit 603af10dc1c094807a38d64aff8f1497c96b7581

It doesnt run timeseal so that it creates a telnet server, but it just takes its output from its stdout. So if your timeseal binary works when you run it with:

$ timeseal 167.114.65.195 5000

papageorge should work with timeseal too.

Please try it out and tell me how it goes.

enricoT commented 9 years ago

it goes well :ok:

drestebon commented 9 years ago

excellent!