1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

Specific error for API data doesn't match Journal

This commit is contained in:
Jonathan Harris 2017-01-12 00:18:15 +00:00
parent 9cfc9ddc4c
commit 85191508d3
4 changed files with 22 additions and 1 deletions

View File

@ -397,7 +397,7 @@ class AppWindow:
elif not data.get('ship') or not data['ship'].get('modules') or not data['ship'].get('name','').strip():
self.status['text'] = _("What are you flying?!") # Shouldn't happen
elif monitor.cmdr and data['commander']['name'] != monitor.cmdr:
raise companion.CredentialsError() # Companion API credentials don't match Journal
raise companion.CmdrError() # Companion API return doesn't match Journal
elif (auto_update and not data['commander'].get('docked')) or (monitor.system and data['lastSystem']['name'] != monitor.system) or (monitor.shipid and data['ship']['id'] != monitor.shipid) or (monitor.shiptype and data['ship']['name'].lower() != monitor.shiptype):
raise companion.ServerLagging()

View File

@ -157,6 +157,9 @@
/* [companion.py] */
"Error: Verification failed" = "Error: Verification failed";
/* Raised when the user has multiple accounts and the username/password setting is not for the account they're currently playing OR the user has reset their Cmdr and the Companion API server is still returning data for the old Cmdr. [companion.py] */
"Error: Wrong Cmdr" = "Error: Wrong Cmdr";
/* Item in the File menu on Windows. [EDMarketConnector.py] */
"Exit" = "Exit";

View File

@ -132,6 +132,18 @@ This problem is tracked as [Issue #92](https://github.com/Marginal/EDMarketConne
### Doesn't auto-update or track Systems visited
This app uses Elite: Dangerous' “journal” files to track the systems and stations that you visit. If you're running this app on a different machine from the Elite: Dangerous game, or if you find that this app isn't automatically tracking the systems that you visit and/or isn't automatically “updating” on docking (if you have that option selected), then adjust the “E:D journal file location” setting on the Configuration tab to point to the game's journal files.
### Error: Wrong Cmdr
The Frontier server that supplies data to this app is supplying data for a different Cmdr than the one that you're currently playing. Either:
1. You have multiple accounts and the username/password setting is not for the account that you're currently playing; or
2. You have reset your Cmdr but Frontier's server is still supplying data for the old Cmdr.
If 1 check your username/password settings.
If 2 this problem may or may not resolve itself in time.
This problem is tracked as [Issue #165](https://github.com/Marginal/EDMarketConnector/issues/165).
### Error: Can't connect to EDDN
EDMC needs to talk to eddn-gateway.elite-markets.net on port 8080. If you consistently receive this error check that your router or VPN configuration allows port 8080 / tcp outbound.

View File

@ -153,6 +153,12 @@ class CredentialsError(Exception):
def __str__(self):
return unicode(self).encode('utf-8')
class CmdrError(Exception):
def __unicode__(self):
return _('Error: Wrong Cmdr') # Raised when the user has multiple accounts and the username/password setting is not for the account they're currently playing OR the user has reset their Cmdr and the Companion API server is still returning data for the old Cmdr
def __str__(self):
return unicode(self).encode('utf-8')
class VerificationRequired(Exception):
def __unicode__(self):
return _('Error: Verification failed')