=FI=Genosse Posted February 7, 2024 Posted February 7, 2024 59 minutes ago, =FEW=Revolves said: Sorry for the late reply, I was gone on vacation - I've been meaning to add in an option to disable all the tank stuff as a config option, it's just been rather low priority. To do it on your end: In src/mod_rating_by_type/ you will find a bunch of html files. Open up base.html with a text editor. Line 87 of the html should be: ``` <a href="{% url 'stats:tankmans' %}?tour={{ request.tour.id }}">{% trans 'Tankman Rankings' %}</a> ``` Completely remove that line and restart the server (restart waitress.cmd). This will remove the tank rankings navigation option at the top. ----- There will probably be some references to tanks there and there, but that should be the bulk of it. Thank you for your reply, Revolves! Yes, your description did work. Unfortunately just in the sub menu. I just need to find a way to get of the other tank related entries ... 1
=FEW=Revolves Posted February 7, 2024 Author Posted February 7, 2024 3 minutes ago, =FI=Genosse said: Thank you for your reply, Revolves! Yes, your description did work. Unfortunately just in the sub menu. I just need to find a way to get of the other tank related entries ... For the front page you can look at main.html in the same folder, I think only there are two parts doesn't automatically filter itself out Line 233: <div class="full_rating"> <a href="{% url 'stats:tankmans' %}?tour={{ request.tour.id }}"> <span> {% trans 'Overall Tankman Rankings' %} </span> </a> </div> Line 424: <div class="top_pilots"> <div class="title">{% trans 'Top Tankmen' %}</div> <div class="top_pilots_columns"> {% for player in previous_tour_toptank %} <a class="pilot" href="{{ player.get_tankman_url }}"> <div class="num">{{ forloop.counter }}</div> <div class="nickname">{{ player.nickname }}</div> </a> {% endfor %} </div> </div> You can remove those two references and the front page should be free of tank references. Most of the other tank fields should automatically filter themselves out if the website sees there are no tank players, what other ones do you see? If it's on the main page, searching the main.html for "tank" should get you to the sections which include tank stats.
=FI=Genosse Posted February 7, 2024 Posted February 7, 2024 As far as I can see I found all the tank related entries. Thanks for your help, Revolves! Much appreciated. 1
=gRiJ=ToReRo Posted April 5, 2024 Posted April 5, 2024 (edited) Hello, I am having this error in tank missions on my campaign server, Grij Arena, can you tell me what I am doing wrong specifically, the error is giving me in tank missions, in airplane 500 server error Edited April 5, 2024 by =gRiJ=ToReRo
=FEW=Revolves Posted April 5, 2024 Author Posted April 5, 2024 (edited) 3 hours ago, =gRiJ=ToReRo said: Hello, I am having this error in tank missions on my campaign server, Grij Arena, can you tell me what I am doing wrong specifically, the error is giving me in tank missions, in airplane Hey! Can you check your logs for an error message? A 500 server error can mean a lot of different things are wrong. The error should be recorded be in django.log inside your stats folder which you can open using notepad, and look something like this (you might need to scroll a bit or search for ERROR in the file): 2022-10-31 16:30:14,974 ERROR Internal Server Error: /en/ Traceback (most recent call last): File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\exception.py", line 41, in inner response = get_response(request) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\core\handlers\base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "C:\Users\Revolves\AppData\Local\Programs\Python\Python35-32\lib\contextlib.py", line 30, in inner return func(*args, **kwds) File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 495, in main return main_itaf(request) File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 615, in main_itaf top_mission_streak = __top_mission_current_streak(request.tour) File "C:\Users\Revolves\il2_stats\src\mod_rating_by_type\views.py", line 707, in __top_mission_current_streak relive=0 File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\query.py", line 787, in filter return self._filter_or_exclude(False, *args, **kwargs) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\query.py", line 805, in _filter_or_exclude clone.query.add_q(Q(*args, **kwargs)) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1250, in add_q clause, _ = self._add_q(q_object, self.used_aliases) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1276, in _add_q allow_joins=allow_joins, split_subq=split_subq, File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1154, in build_filter lookups, parts, reffed_expression = self.solve_lookup_type(arg) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1034, in solve_lookup_type _, field, _, lookup_parts = self.names_to_path(lookup_splitted, self.get_meta()) File "C:\Users\Revolves\il2_stats\.venv\lib\site-packages\django\db\models\sql\query.py", line 1352, in names_to_path "Choices are: %s" % (name, ", ".join(available))) django.core.exceptions.FieldError: Cannot resolve keyword 'type' into field. Choices are: accuracy, aircraft_status, ak_assist, ak_total, ammo, bailout, bot_status, captured, ce, cls, coal_pref, crashed, date_first_sortie, date_last_combat, date_last_sortie, dead, disco, ditched, fak_total, fgk_total, flight_time, gk_total, gkhr, gkl, gks, id, in_flight, khr, killboard_pve, killboard_pvp, kl, ks, landed, mission, mission_id, player, player_id, profile, profile_id, ratio, relive, respawn, score, score_heavy, score_light, score_medium, shotdown, sorties_cls, sorties_coal, sorties_total, status, takeoff, tour, tour_id, wl, wounded 2022-10-31 16:41:00,860 ERROR Internal Server Error: /en/ Edited April 5, 2024 by =FEW=Revolves 1
=gRiJ=ToReRo Posted April 5, 2024 Posted April 5, 2024 (edited) Thank you very much for your quick response, I skipped a step in the src by adding the module section, it was corrected Edited April 5, 2024 by =gRiJ=ToReRo 1
=gRiJ=ToReRo Posted February 12 Posted February 12 That's the output of my IL-2 Stats reporter since the latest 5.506 update. Any idea what to do? 2025.02.04 17:08:09] Lock 82820880 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock [2025.02.04 17:08:09] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29 [2025.02.04 17:08:09] missionReport(2025-02-04_15-00-51)[0] - processing new report [2025.02.04 17:08:09] tik: 69350 - respawn before than bot initialization [2025.02.04 17:08:11] missionReport(2025-02-04_15-00-51)[0] - processing finished [2025.02.04 17:08:11] waiting new report... [2025.02.11 17:04:48] Lock 75153168 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock [2025.02.11 17:04:48] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29 [2025.02.11 17:04:48] unexpected error Traceback (most recent call last): File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\management\commands\stats_whore.py", line 16, in handle stats_whore.main() File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\stats_whore.py", line 72, in main online_timestamp = update_online(m_report_files=m_report_files, online_timestamp=online_timestamp) File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\online.py", line 47, in update_online _countries[country] = COALITION_ALIAS[coalition] KeyError: 9 [2025.02.11 17:04:48] Lock 75153168 released on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock [2025.02.11 17:05:37] Lock 76922640 acquired on C:\Users\grijos\Desktop\il2_stats server mod tank\file.lock [2025.02.11 17:05:37] IL2 stats 1.2.81, Python 3.5.2, Django 1.11.29 [2025.02.11 17:05:37] unexpected error Traceback (most recent call last): File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\management\commands\stats_whore.py", line 16, in handle stats_whore.main() File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\stats_whore.py", line 72, in main online_timestamp = update_online(m_report_files=m_report_files, online_timestamp=online_timestamp) File "C:\Users\grijos\Desktop\il2_stats server mod tank\src\stats\online.py", line 47, in update_online _countries[country] = COALITION_ALIAS[coalition] KeyError: 9
super-truite Posted February 12 Posted February 12 same problem. For some reasons there are new "coalitions" and this leads to error because they are not defined in this file : "\il2_stats\src\mission_report\constants.py" As a workaround you can define the missing coalitions by just adding new fields in the line 52. Like this : COALITION_ALIAS = { 0: Coalition.neutral, 1: Coalition.coal_1, 2: Coalition.coal_2, 3: Coalition.coal_1, 4: Coalition.coal_2, 5: "Unknown5", 6: "Unknown6", 7: "Unknown7", 8: "Unknown8", 9: "Unknown9", } then update and restart stats
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now