when starting Mattricks i first get a couple of hundred lines stating things like:
Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: 'NOT AVAILABLE' Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required
the traceback following is:
Traceback (most recent call last): File "./mattricks.py", line 36, in ? Init.start() File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Init.py", line 57, in start Commandline.parse_and_start() File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Commandline.py", line 105, in p arse_and_start all_commands[command](args, help_command) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Commandline.py", line 121, in p arse_cmd_gui Main.main(*args) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Main.py", line 443, in main app = Main(filename) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Main.py", line 395, in __init__ wxApp.__init__(self) File "/usr/lib/python2.3/site-packages/wxPython/wx.py", line 1951, in __init__ _wxStart(self.OnInit) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Main.py", line 418, in OnInit frame.AfterInit() File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Main.py", line 269, in AfterIni t self.pages[name].AfterInit() File "/home/zazell/cvs/cvs/Mattricks/Mattricks/ComparisonPage.py", line 138, i n AfterInit self.Update() File "/home/zazell/cvs/cvs/Mattricks/Mattricks/ComparisonPage.py", line 159, i n Update self.textarea.AppendText(self.__get_change_text()) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/ComparisonPage.py", line 168, i n __get_change_text p1 = Players.Players(self.first_date) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Players.py", line 156, in __ini t__ self.__extract_data(date, team) File "/home/zazell/cvs/cvs/Mattricks/Mattricks/Players.py", line 233, in __ext ract_data player.data["CompetitionGoals"] = (compgoals, TypeError: int argument required
gr Zazell
On Thu, 21 Oct 2004, Zazell Kroeske wrote:
when starting Mattricks i first get a couple of hundred lines stating things like:
Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: 'NOT AVAILABLE' Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required
You have downloaded data during a match which is not a very good thing to do at the moment. Later on we will try to avoid that, but I guess that we must include some error handling for the unlucky ones that have already done it.
The 'NOT AVAILABLE' is where the number of goals should be.
/Oscar
And the only way to solve it is to delete the database, or is there some other option?
Oscar Gustafsson wrote:
On Thu, 21 Oct 2004, Zazell Kroeske wrote:
when starting Mattricks i first get a couple of hundred lines stating things like:
Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: 'NOT AVAILABLE' Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required Conversion error: invalid literal for int(): NOT AVAILABLE Conversion error: int argument required
You have downloaded data during a match which is not a very good thing to do at the moment. Later on we will try to avoid that, but I guess that we must include some error handling for the unlucky ones that have already done it.
The 'NOT AVAILABLE' is where the number of goals should be.
/Oscar _______________________________________________ Mattricks mailing list Mattricks@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/mattricks
On Thu, 21 Oct 2004, Zazell Kroeske wrote:
And the only way to solve it is to delete the database, or is there some other option?
Actually yes, I forgot about that though. You can do a text-based fetch. This should solve it, with the restriction that it will show up again if you select the "NOT AVAILABLE"-XML in the comparison page.
Hopa you haven't deleted the databse yet... ;-)
/Oscar
and how do i do such a text-based fetch? is it just in the ~/Choices/Mattricks/fetchedXMLs doing a search in the xml files and delete the files containing the NOT AVAILABLE content?
Zazell
Oscar Gustafsson wrote:
On Thu, 21 Oct 2004, Zazell Kroeske wrote:
And the only way to solve it is to delete the database, or is there some other option?
Actually yes, I forgot about that though. You can do a text-based fetch. This should solve it, with the restriction that it will show up again if you select the "NOT AVAILABLE"-XML in the comparison page.
Hopa you haven't deleted the databse yet... ;-)
/Oscar _______________________________________________ Mattricks mailing list Mattricks@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/mattricks
On Fri, 22 Oct 2004, Zazell Kroeske wrote:
and how do i do such a text-based fetch? is it just in the ~/Choices/Mattricks/fetchedXMLs doing a search in the xml files and delete the files containing the NOT AVAILABLE content?
Sorry about that. I thought I had recommended it for you previously...
./mattricks.py fetch
There is no need to delete the files (and it actually won't help) since all XML is saved in the internal database. We will have to provide some database management as this problem and other problems with incomplete XML:s seems to happen every now and then.
/Oscar
Oscar Gustafsson wrote:
On Fri, 22 Oct 2004, Zazell Kroeske wrote:
and how do i do such a text-based fetch? is it just in the ~/Choices/Mattricks/fetchedXMLs doing a search in the xml files and delete the files containing the NOT AVAILABLE content?
Sorry about that. I thought I had recommended it for you previously...
./mattricks.py fetch
There is no need to delete the files (and it actually won't help) since all XML is saved in the internal database. We will have to provide some database management as this problem and other problems with incomplete XML:s seems to happen every now and then.
/Oscar _______________________________________________ Mattricks mailing list Mattricks@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/mattricks
I did this, but I still get the same error. can it be that the comparison page is looking at a date that has corrupt data and remembers this date?
Isn't it an idea to convert the value NOT AVAILABLE to -1 or something to prevent this behavior in the future?
Zazell
On Fri, 22 Oct 2004, Zazell Kroeske wrote:
I did this, but I still get the same error. can it be that the comparison page is looking at a date that has corrupt data and remembers this date?
If you are unlucky you would get the "first date" to be (one of) the corrupted XML:s...
Could you do (while in the fetchedXMLs-directory)
grep -H "NOT AVAILABLE" all_players*.xml
Then you will get all the filenames (and rows) where NOT AVAILABLE occurs.
Isn't it an idea to convert the value NOT AVAILABLE to -1 or something to prevent this behavior in the future?
The best would be to avoid downloading XML:s with NOT AVAILABLE. We will try to implement this (I think) quite soon. The problem now is how to find it out before adding the XML to the database (which is our standard procedure).
You could try to change name of your Choices/Mattricks-directory to Choices/Mattricks2 or something similar and make
./mattricks.py import *.xml
I do not know if it will work as expected and you probably would like to move the "NOT AVAILABLE"-xml:s before doing that.
/Oscar
Oscar Gustafsson wrote:
On Fri, 22 Oct 2004, Zazell Kroeske wrote:
I did this, but I still get the same error. can it be that the comparison page is looking at a date that has corrupt data and remembers this date?
If you are unlucky you would get the "first date" to be (one of) the corrupted XML:s...
Could you do (while in the fetchedXMLs-directory)
grep -H "NOT AVAILABLE" all_players*.xml
Then you will get all the filenames (and rows) where NOT AVAILABLE occurs.
Isn't it an idea to convert the value NOT AVAILABLE to -1 or something to prevent this behavior in the future?
The best would be to avoid downloading XML:s with NOT AVAILABLE. We will try to implement this (I think) quite soon. The problem now is how to find it out before adding the XML to the database (which is our standard procedure).
You could try to change name of your Choices/Mattricks-directory to Choices/Mattricks2 or something similar and make
./mattricks.py import *.xml
I do not know if it will work as expected and you probably would like to move the "NOT AVAILABLE"-xml:s before doing that.
/Oscar _______________________________________________ Mattricks mailing list Mattricks@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/mattricks
I guess i'm unlucky then. The grep only returned only 1 xml file. i tried deleting it, doing a new fetch en starting mattricks. but still no luck. is there someway to rebuild the database (i still have practically all hrf's and xml's i fetched through the seasons :))
Zazell
I guess i'm unlucky then. The grep only returned only 1 xml file. i tried deleting it, doing a new fetch en starting mattricks. but still no luck. is there someway to rebuild the database (i still have practically all hrf's and xml's i fetched through the seasons :))
That is what the import command is for.
Do a ./mattricks.py import *.xml, but make a backup copy of your old database first. I do not know if you run inte problems if there are too many XML:s to be imported in one go, but the most important ones are the all_players*.xml as the rest can be fetched again (well, e.g. economy can not be fetched again, but at the moment Mattricks doesn't use old version (although it probably will in the future)).
/Oscar
Oscar Gustafsson wrote:
That is what the import command is for.
Do a ./mattricks.py import *.xml, but make a backup copy of your old database first. I do not know if you run inte problems if there are too many XML:s to be imported in one go, but the most important ones are the all_players*.xml as the rest can be fetched again (well, e.g. economy can not be fetched again, but at the moment Mattricks doesn't use old version (although it probably will in the future)).
/Oscar _______________________________________________ Mattricks mailing list Mattricks@lists.lysator.liu.se http://lists.lysator.liu.se/mailman/listinfo/mattricks
Great, that seemed to have solved it. can old .hrf files be imported to?
Zazell
mattricks@lists.lysator.liu.se