[REL] rFactor2 Log Analyzer ver. 2. With offline and league Championship Manager

Discussion in 'Other' started by Nibo, Apr 15, 2015.

  1. DaVeX

    DaVeX Registered

    Joined:
    Feb 7, 2015
    Messages:
    637
    Likes Received:
    701
    Hi, thank you once again for the rapid addition of cloning championship seasons. Making our life a lot easier at amsunofficial.net.
    We are currently running a Time Trial / Hot Lap competition. The first week of the time trial is coming to an end and has been quite a success.
    We wandered if it might be possible to combine the Championship and Time Trial features to make the following possible a Time Trial Championship.
    1. Create a championship eg "Time Trial Championship"
    2. When creating the championship there is an option for "Standard" or "Hot Lap / Time Trial" championship.
    3. Assign the race / tracks as you currently do for a normal championship.
    4. Instead of assigning single races to the results if it is a "Hot Lap / Time Trial" championship then the you can assign results from completed Hot Lap / Time Trial competitions.
    This would allow us to run a 6 week (or what ever we want) time trial championship! Hope that makes sense.
    There might be a more efficient way of doing it than we have suggested :D
     
  2. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Theoretically, I can create a button for competition that will make "fake" xml report from competition results and put it in your /results folder. Then you will be able to assign that "fake" session report as a race result in a championship. I'll let you know here if its possible in practice.
     
  3. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Updated to 2.058.18
    • Added export of DEDI Competitions results to "fake" xml file. You can then assign this reports as results in your championships. Press "Export to XML" button for some competition, this will create "Practice" xml report with competition results in your default .../Results directory and import it in r2la. You will see it in Results Viewer with the same name as competition plus "_". Report will be dated by competition end date.
     
  4. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Thanks @Nibo . DaveX has been relaying messages for me but I thought it was about time I signed up and stopped making Dave do all the hard work.

    The update looks spot on and just what we wanted. We have two hot laps series. One exports fine, the other comes up with the following and does not export when I try it:

    Code:
    Traceback (most recent call last):
      File "D:/web2py_2.14.6/applications/r2la\compiled\controllers.dedi_comps.export_comp.py", line 186, in export_comp
      File "D:\web2py_2.14.6/applications/r2la/modules\la_editor.py", line 130, in create_fake_xml_from_competition
      File "lxml.etree.pyx", line 3103, in lxml.etree.fromstring (src\lxml\lxml.etree.c:70569)
      File "parser.pxi", line 1828, in lxml.etree._parseMemoryDocument (src\lxml\lxml.etree.c:106403)
      File "parser.pxi", line 1716, in lxml.etree._parseDoc (src\lxml\lxml.etree.c:105194)
      File "parser.pxi", line 1086, in lxml.etree._BaseParser._parseDoc (src\lxml\lxml.etree.c:99876)
      File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:94350)
      File "parser.pxi", line 690, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:95786)
      File "parser.pxi", line 620, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:94853)
    XMLSyntaxError: xmlParseEntityRef: no name, line 1, column 22
     
    Last edited: Jan 23, 2019
  5. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Looks like some car has no TeamName there. I re-uploaded latest version to the same link with some changes. Try it. You can just substitute one file - rF2 Log Analyzer ver. 2.058.18\web2py\applications\r2la\modules\la_editor.pyc and restart r2la.
     
  6. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Thanks for that.

    I stopped the server, replaced the file, and restarted server.

    I still can't create the export for that hotlap series (it uses a mod car and a default track).

    The other series (Super V8 at a mod track) works fine.

    No errors appearing in the dos box. Can I give you any files to help investigate?
     
  7. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Go to "Options" page, press "Export hotlap competitions" and send me r2la_competitions.json that will be created in your "rF2 Log Analyzer ver. 2.058.18" directory.
     
  8. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Sorry for the delay.

    Here it is. Had to zip it so that the forum would allow the file.
     

    Attached Files:

  9. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Export of both competitions works fine for me here. Are you sure you didn't miss the "BMW M1 ProCar @ Johannesburg_.xml" in your Results Viewer? Look in your /Results folder with logs it should be there alongside Super V8 @ Bathurst_.xml.
    The fact that you see no error message in dos box after you press "Export" competition, means that file most probably is created ok.

    You can try to unzip new instance of 2.058.18 and setup it from scratch, try importing your competitions there and export to XML from there.

    Here are both exported files:
     

    Attached Files:

  10. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    Very sorry @Nibo . I must have done something wrong. I tried again and it is all working perfectly.

    Thank you.
     
  11. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    187
    Likes Received:
    2
    I hate doing this, but I have a simple question or two, but it would take a LONG time to read all 64 pages of this thread ! So, if someone could point me to roughly what page may answer this, or, just give me a link or short answer, that would be very helpful.

    We've used this utility for a number of years, and it works great, except as the season gets longer and the number of results are stored in the HTML file, the size gets REALLY big and it either is very slow to load or even can crash the browser. Is there something that we can change in how the web page results are created or perhaps a stat that is the space hog ? Maybe an update we missed ?
     
  12. Will Mazeo

    Will Mazeo Registered

    Joined:
    Sep 12, 2015
    Messages:
    2,220
    Likes Received:
    1,578
    How many logs are you putting to make that happen? Never seen that.
     
  13. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    JohnW63, what version of r2la you are using? I think you are talking about static exported championship html files when exported with race results included? That files can get big, yes, there is no other way to put that much info into static web page. You can export championship tables without race results (this option is available when you press "Export standings"), then export every race separately from that race page. You will have many files that will be lower in size and browser should not crash.

    You should not have this problems with regular (not-exported) r2la web pages, because every page there is loaded separately.
     
  14. JohnW63

    JohnW63 Registered

    Joined:
    Dec 13, 2011
    Messages:
    187
    Likes Received:
    2
    Yes, I believe they were exported static web pages. It was great to pull out season stats but it did get REALLY slow at the end ! Now that I know I can have race results separate from the season standings stuff, that would be fine for me.

    Thanks for the help.
     
  15. Nobkins

    Nobkins Registered

    Joined:
    Jan 23, 2019
    Messages:
    36
    Likes Received:
    1
    @Nibo with the Hosted Events (time trials / hot laps) is it possible to support a fuel and tire wear multiplier of zero? The current range is limited to 1-100 but Automobilista supports a Zero fuel and Zero tire wear so that you do not use fuel or wear any tires.

    Thank you.
     
  16. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Nobkins, I changed range to 0-100 and re-uploaded v2.058.18 to same link without version change. Try it.
     
  17. knackko

    knackko Registered

    Joined:
    Oct 6, 2010
    Messages:
    142
    Likes Received:
    65
    Hi Nibo,

    Got something to share about R2LA: last week I had to transfer some R2LA instances from a server to another one, but time transfer was very long. After looking at R2LA files, it seems that there was more than 200 000 files in application/r2la/sessions directory !. Those are not big files, but the number of those files decreased a lot the transfer time. I wonder if it doesnt also had an impact on R2LA perfs. After removing those files, the transfer was ok and R2LA works fine now.

    Another thing is that R2LA is the only livetiming at ODS so I began to integrate the jsonp output in ODS website. Server names are with "rFactor2 Dedicated.exe", is there a way to have it with rF2 server name for jsonp like in livetiming? Thanks.
     
  18. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    Those are session files which web2py creates for every unique request to app (user IP + browser). It is how it works and I can not change that. But it should not have effect on r2la performance. Number that you posted is very big however... I would expect it to be in hundreds, maybe couple of thousands even if hosted publicly. How long were you using that instance of r2la? You can clear that folder from time to time if there will be build-up of files there. r2la will forget you as admin because of this and you will need to re-login.

    I added server name to jsonp output and re-uploaded r2la to same link without version change. Try it.
    • Added "server_name" to get_server_data_jsonp output. Added "mServerName" to get_full_server_data_jsonp output, in "mScoringInfo" section.
     
  19. knackko

    knackko Registered

    Joined:
    Oct 6, 2010
    Messages:
    142
    Likes Received:
    65
    I see that there is a crontab directory in r2la application, maybe it can be easy to add a cron to clean sessions directory automatically every week for example. It has been running for 3 months I think as it was still in version 15 if I remember. But at every upgrades done on our instance, sessions dir is cleaned as it is installed with new package.

    Yes it works for jsonp ! thanks !
     
  20. Nibo

    Nibo Registered

    Joined:
    Oct 12, 2010
    Messages:
    2,263
    Likes Received:
    977
    web2py CRON and Scheduler tasks is fairly complicated subject for me. I read about it, but I don't see it as easy solution. I don't want to add another level of complexity to r2la for this. It will be easier to just clean that folder manually from time to time. Or automate it with some other solution on your system side.
     

Share This Page