[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: RE: [Bug-gnubg] Database tools for the player record

From: Massimiliano . Maini
Subject: RE: RE: [Bug-gnubg] Database tools for the player record
Date: Fri, 28 Jul 2006 09:56:53 +0200

>Many thanks. I am having trouble making the database in the first place
>though. I installed Python, and tried using the db_import script, but when
>pressed Y to confirm the import, I was told that 'gnubg' hadn't been
>and it couldn't proceed. When I ran the database.py script, I get nothing
>all. I also tried the different relational db commands from the GNUbg GUI,
>but to no avail. The add stats seems to work, but I have no idea what it
>importing to. I'd really like to try and use this feature, but am having a
>hard time with it. I'd really appreciate help in getting started.

Hi Albert, to debug this stuff, it's better to use command line version
of gnubg. Start it and at the prompt type "relational test" (no quotes)
and see what happens. If it complains with something like :

(No game) relational test
Unhandled exception...
Traceback (most recent call last):
  File "C:\Program Files\gnubg/scripts\database.py", line 640, in connect
  File "C:\Program Files\gnubg/scripts\database.py", line 603, in

    sqlfile = open("gnubg.games.sql", "r")
IOError: [Errno 2] No such file or directory: 'gnubg.games.sql'
Error connecting to database
(No game)

Then there's a problem in scripts/database.py : there's a typo in
latest commit of database.py (Christian, v 1.19). The line :

      sqlfile = open("gnubg.games.sql", "r")

should be :

      sqlfile = open("gnubg.game.sql", "r")

You can fix this in the script (and somebody should commit this to
the repository) and then try again the test stuff and/or the import_db
script. Should just work.

BTW : what's the python equivalent of the gnubg command 'load python
db_import.py' ? Once I'm in python mode, how do I "load" db_import.py ?
I tried with "import db_import" but it doesn't find it ... is it a
pythonpath problem ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]