Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] string index out of range error in codex.py & fleet_carrier.py #90

Open
Tenzian opened this issue Feb 4, 2021 · 1 comment
Open
Assignees
Labels

Comments

@Tenzian
Copy link

Tenzian commented Feb 4, 2021

What is your commander name
Tiath

What version are you running
5.23.0 "Farewell Aricebo the End of an Era"

Describe the bug
It looks like one of the fleet carriers in system has an unexpected name so

EDMC-Canonn/canonn/codex.py

Lines 1277 to 1278 in 4118a9c

FleetCarrier = (entry.get("SignalName") and entry.get(
"SignalName")[-4] == '-' and entry.get("SignalName")[-8] == ' ')
and
FleetCarrier = (entry.get("SignalName") and entry.get(
"SignalName")[-4] == '-' and entry.get("SignalName")[-8] == ' ' and isStation)
are not able to parse it as it's a shorter string than expected.

To Reproduce
I was in Outotz LS-K d8-3, but of course carriers can move 😁.
I've included the journaled FSSSignalDiscovered events from the time of the error (I'm assuming KNY-75Q is the culprit here)

Expected behavior
fleet carrier names are parsed without error messages 😏

Log Files

2021-02-04 03:14:59.371 - ERROR - plug.notify_journal_entry:322: Plugin "Canonn" failed
Traceback (most recent call last):
  File "~/Repositories/EDMarketConnector/plug.py", line 319, in notify_journal_entry
    newerror = journal_entry(cmdr, is_beta, system, station, dict(entry), dict(state))
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/load.py", line 190, in journal_entry
    return journal_entry_wrapper(cmdr, is_beta, system, this.SysFactionState, this.SysFactionAllegiance,
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/load.py", line 215, in journal_entry_wrapper
    this.codexcontrol.journal_entry(
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/canonn/codex.py", line 1164, in journal_entry
    self.journal_entry_wrap(
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/canonn/codex.py", line 1278, in journal_entry_wrap
    "SignalName")[-4] == '-' and entry.get("SignalName")[-8] == ' ')
IndexError: string index out of range
Exception in thread Thread-101:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/canonn/fleet_carrier.py", line 28, in run
    Fleet.process()
  File "~/Library/Application Support/EDMarketConnector/plugins/EDMC-Canonn/canonn/fleet_carrier.py", line 50, in process
    "SignalName")[-4] == '-' and entry.get("SignalName")[-8] == ' ' and isStation)
IndexError: string index out of range

From the journal:

{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"NEBZDYASHIY KNV-B8Q", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"[ALL TH£ MOD CONS]5% JZB-N5L", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"ACE SPACEWAYS JNQ-6TG", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"KAAMELOTT VFK-B8G", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"CHANNELED SCABLANDS X3Q-6VY", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"FINANCIAL PROBLEMS V8B-N9N", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"RUSSIAN HOUSE ATX XNG-4XX", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"TEXAS G7X-GTZ", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"[EIC]LONGMAN LOGISTICS B1T-05Z", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"KNY-75Q", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"THOLIAN WEB K3N-N1Y", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"JUST 1 MORE EYESORE V4V-39L", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"PRIVATE-TAVERN-2.71828 V1G-73M", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"RATSYLVANIA K7B-N3G", "IsStation":true }
{ "timestamp":"2021-02-04T03:14:54Z", "event":"FSSSignalDiscovered", "SystemAddress":113674078411, "SignalName":"XALK XHK-NHB", "IsStation":true }
@Tenzian Tenzian added the bug label Feb 4, 2021
@Tenzian Tenzian changed the title [BUG] string index out of range error in fleet_carrier.py [BUG] string index out of range error in codex.py & fleet_carrier.py Feb 4, 2021
@NoFoolLikeOne
Copy link
Collaborator

Thanks. I'll check to see if this is still an issue. Some of the code has been pushed server side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants