Geuthur / aa-ledger

Character & Corporation Ledger Statistics for Alliance Auth
GNU General Public License v3.0
1 stars 0 forks source link

0.5.3 update issues #28

Closed Husteln closed 4 months ago

Husteln commented 4 months ago

Hi,

Some things seems to have broken with update from 0.5.2.1 to 0.5.3.

Visible stuff - Corporation ledger/overview has no data

Some logs from celery faileds below:

ledger.tasks.update_corp_wallet (same for char_wallet) - happens every update cycle

'NotModifiedError' object has no attribute 'response'

Traceback (most recent call last):
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/etag_helpers.py", line 122, in handle_page_results
    handle_etag_headers(operation, headers, force_refresh, etags_incomplete)
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/etag_helpers.py", line 88, in handle_etag_headers
    raise NotModifiedError()
ledger.task_helpers.etag_helpers.NotModifiedError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 453, in trace_task
    R = retval = fun(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery_once/tasks.py", line 75, in __call__
    return super(QueueOnce, self).__call__(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/celery/app/trace.py", line 736, in __protected_call__
    return self.run(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/core_helpers.py", line 50, in wrapper
    raise excp
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/core_helpers.py", line 43, in wrapper
    _ret = func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/tasks.py", line 139, in update_corp_wallet
    return update_corp_wallet_division(corp_id, force_refresh=force_refresh)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/corp_helpers.py", line 125, in update_corp_wallet_division
    update_corp_wallet_journal(
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/corp_helpers.py", line 191, in update_corp_wallet_journal
    journal_items = etag_results(
                    ^^^^^^^^^^^^^
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/etag_helpers.py", line 148, in etag_results
    results, current_page, total_pages = handle_page_results(
                                         ^^^^^^^^^^^^^^^^^^^^
  File "/home/allianceauth/.local/lib/python3.11/site-packages/ledger/task_helpers/etag_helpers.py", line 127, in handle_page_results
    total_pages = int(e.response.headers["X-Pages"])
                      ^^^^^^^^^^
AttributeError: 'NotModifiedError' object has no attribute 'response'

ledger.tasks.update_corp_wallet (went on for a day after update, no such errors since)

'Deliveries_Take' is not one of ['Account_Take_1', 'Account_Take_2', 'Account_Take_3', 'Account_Take_4', 'Account_Take_5', 'Account_Take_6', 'Account_Take_7', 'Accountant', 'Auditor', 'Communications_Officer', 'Config_Equipment', 'Config_Starbase_Equipment', 'Container_Take_1', 'Container_Take_2', 'Container_Take_3', 'Container_Take_4', 'Container_Take_5', 'Container_Take_6', 'Container_Take_7', 'Contract_Manager', 'Diplomat', 'Director', 'Factory_Manager', 'Fitting_Manager', 'Hangar_Query_1', 'Hangar_Query_2', 'Hangar_Query_3', 'Hangar_Query_4', 'Hangar_Query_5', 'Hangar_Query_6', 'Hangar_Query_7', 'Hangar_Take_1', 'Hangar_Take_2', 'Hangar_Take_3', 'Hangar_Take_4', 'Hangar_Take_5', 'Hangar_Take_6', 'Hangar_Take_7', 'Junior_Accountant', 'Personnel_Manager', 'Project_Manager', 'Rent_Factory_Facility', 'Rent_Office', 'Rent_Research_Facility', 'Security_Officer', 'Skill_Plan_Manager', 'Starbase_Defense_Operator', 'Starbase_Fuel_Technician', 'Station_Manager', 'Trader']

Failed validating 'enum' in schema['properties']['roles']['items']:
    {'description': 'role string',
     'enum': ['Account_Take_1',
              'Account_Take_2',
              'Account_Take_3',
              'Account_Take_4',
              'Account_Take_5',
              'Account_Take_6',
              'Account_Take_7',
              'Accountant',
              'Auditor',
              'Communications_Officer',
              'Config_Equipment',
              'Config_Starbase_Equipment',
              'Container_Take_1',
              'Container_Take_2',
              'Container_Take_3',
              'Container_Take_4',
              'Container_Take_5',
              'Container_Take_6',
              'Container_Take_7',
              'Contract_Manager',
              'Diplomat',
              'Director',
              'Factory_Manager',
              'Fitting_Manager',
              'Hangar_Query_1',
              'Hangar_Query_2',
              'Hangar_Query_3',
              'Hangar_Query_4',
              'Hangar_Query_5',
              'Hangar_Query_6',
              'Hangar_Query_7',
              'Hangar_Take_1',
              'Hangar_Take_2',
              'Hangar_Take_3',
              'Hangar_Take_4',
              'Hangar_Take_5',
              'Hangar_Take_6',
              'Hangar_Take_7',
              'Junior_Accountant',
              'Personnel_Manager',
              'Project_Manager',
              'Rent_Factory_Facility',
              'Rent_Office',
              'Rent_Research_Facility',
              'Security_Officer',
              'Skill_Plan_Manager',
              'Starbase_Defense_Operator',
              'Starbase_Fuel_Technician',
              'Station_Manager',
              'Trader'],
     'title': 'get_characters_character_id_roles_role',
     'type': 'string',
     'uniqueItems': True}

On instance['roles'][1]:
    'Deliveries_Take'
Geuthur commented 4 months ago

Hey,

I have already seen that the Error with "No Data" Occurs and will be fixed soon with 0.5.4

On the Second Error this is difficult to fix cause it is not from my app it is from esi provider maybe with the new Update they have add a new role Deliveries_Take

Version 0.5.4 will release this weekend i need to do some tests etc.

Geuthur commented 4 months ago

The Etag Error is interesting, I can't reproduce this but i will add more loggers that I can see more details.

Geuthur commented 4 months ago

@Husteln

pip install aa-ledger==0.5.4a1
python manage.py collectstatic

Try this i have released a pre-release.

Please Tell me if the Problem is solved.

o/

Husteln commented 4 months ago

Yes, the visibility of Corporation Ledger is now fixed

The graph on the same page looks overlapped, but that's nothing image

Thanks

Geuthur commented 4 months ago

Perfect, then I'll close this Case

The overlap comes from the Billboard addon, which I can't fix. This happens when the resolution is too small, at 4k there is no overlap and at other sizes it can happen, I have tried many options but the overlap remains

The 0.5.4 Release will fix some Issues that I found after testing and maybe later i found a solution for the overlapping