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

400 Client Error: Bad Request #113

Closed
NKDavis opened this issue May 27, 2016 · 25 comments
Closed

400 Client Error: Bad Request #113

NKDavis opened this issue May 27, 2016 · 25 comments
Labels

Comments

@NKDavis
Copy link

NKDavis commented May 27, 2016

Hi,

Thanks for fixing the Invalid Credentials issue with EDH 2.1

Now, when I try to send Station data through I am getting this error message.

Is it perhaps because there are so many new materials in the Commodities Market and they are not all loaded in the back-end database?

@Barracuda4Surf
Copy link

Hi!
I have the same issue. At first I had the "Invalid Credentials" and now I get the "400 Client Error: Bad Request" message when when updating EDMC.

Cross-checking with the station market data on EDDB, it doesn't seem to get updated as well ("Price Update: X mins ago")

@DeadMeatGF
Copy link

I'm getting the same error - I'm thinking the same as NKDavis

@PierreReynaud
Copy link

Had the invalid credentials issue but now it's been solved thanks :D ! now i have the saem error , 400 client error, but I went to the EDDB and it does update the data from the market when i click update or maybe someone else was there at the same time as me and updated it at the same time but i doubt it or it's just my imagination. Can someone confirm this ?

@AnthorNet
Copy link
Contributor

If you encounter this error, please try to send us the JSON returned by the API, I'm not in the bubble actually to test things and add the new outfit classes to EDDN

@Barracuda4Surf
Copy link

Where do I find the json and where should I upload it to?
Thx in advance!

@Marginal
Copy link
Contributor

If you're able to run from source the program will produce the .json output file.

@libbkmz
Copy link

libbkmz commented May 27, 2016

I've got some json files. But, actually my ED Engineers are downloading, so I didn't log in with engineers update, if it makes sense
https://gist.github.com/libbkmz/bf3720f0e4d3ce5816b1e55f223b1772

@Marginal
Copy link
Contributor

I can't see anything novel in that json file. Is this from a station where you get the 400 error?

@scamfield
Copy link

scamfield commented May 28, 2016

When using EDMarketConnector and tcpdump I can see the following FATAL error when sending to EDDN :

`HTTP/1.1 400 Bad Request
Server: nginx/1.0.15
Date: Sat, 28 May 2016 10:47:00 GMT
Content-Type: text/html; charset=UTF-8
Connection: keep-alive
Content-Length: 168

FAIL: [<ValidationError: "{'category': 'hardpoint', 'rating': '?', 'mount': 'Fixed', 'name': 'Pulse Laser', 'class': '4'} is not valid under any of the given schemas">]`

@Marginal
Copy link
Contributor

Marginal commented May 28, 2016

After your edit:
Makes sense - the lookup table needs updating for the new Class 4 lasers (and probably other weapons).

@scamfield
Copy link

@Marginal
It appears to the failing on these

{
  "category": "hardpoint",
  "class": "4",
  "mount": "Fixed",
  "name": "Pulse Laser",
  "rating": "?"
}
{
  "category": "hardpoint",
  "class": "4",
  "mount": "Gimballed",
  "name": "Pulse Laser",
  "rating": "?"
}
{
  "category": "hardpoint",
  "class": "4",
  "mount": "Gimballed",
  "name": "Multi-Cannon",
  "rating": "?"
}

Screenshot:

screen shot 2016-05-28 at 12 35 28

@AnthorNet
Copy link
Contributor

Based on that, it seems that EDMC needs to update his list to comply with the EDDN schema?

@koreldan
Copy link

koreldan commented May 29, 2016

to me worked by deleting ( click into the field than backspacing all the chars ) the API key and pasting again into the field on Edmc.

This way Edsm got correctly the log into the "Flight Log" page.

It works but the message still appear

@ThomasHeliase
Copy link

Also getting 400 Client Error: Bad Request, at Maia [Darnielle's Progress]. No .json - not running in debug.

@Marginal Marginal added the bug label May 30, 2016
@NKDavis
Copy link
Author

NKDavis commented May 30, 2016

The problem definitely appears to be with the Outfitting data. Data from Stations which do not provide Outfitting Services go through with no issues.

@brittmd99
Copy link

I was able to get around this at least at the station I was having an issue with - The data from the companion app had data for "Skimer Components" (which is wierd because that doesn't show up in game in the market, and I believe it's supposed to be named Skimmer Components to boot). That record had "" for the Demand Bracket instead of a number. I hacked the eddn.py python script to just replace "" with a 0. It's not elegant and it is probably not a complete fix but it did work for at least one station.

@libbkmz
Copy link

libbkmz commented May 31, 2016

My little research for this issue.

If I run.exe version, on every place I get 400 error. But, When I look at eddb.io it shows that market data is updated, but outfitting and shipyard dont.

If I try to use from python source code, everything works fine, and market shipyard and outfiting data is updated without 400 bad request issue.

@brittmd99
Copy link

It seems my little hack isn't what made it work, just the fact that I too was running it from source just like libbkmz. I ran the original file and it worked as well. It spits out the following messages in the console window:
Invalid "demandBracket":"" (<type 'unicode'>) for "Skimer Components"
Invalid "demandBracket":"" (<type 'unicode'>) for "Basic Medicines"
Invalid "demandBracket":"" (<type 'unicode'>) for "Liquor"
Outfitting: ('Pulse Laser', None, '4', '?')
Outfitting: ('Beam Laser', None, '4', '?')
Outfitting: ('Multi-Cannon', None, '4', '?')

@AnthorNet
Copy link
Contributor

Thanks for that report will look into it

@Athanasius
Copy link
Contributor

This appears to now be resolved, at least my EDMC 2.1.0.0 is now able to send data to EDDN (which then shows up in eddb.io).

@Athanasius
Copy link
Contributor

Oh maybe I spoke too soon. Perhaps I got lucky with stations that didn't have the culprit weapons available.

@derf-vader
Copy link

No still seeing this error landed at Copernicus Orbital in Ngadakhis and the market update worked
5 min later at Baillaud Ring in Kuwemargl got the error again

@IamNovus
Copy link

IamNovus commented Jun 2, 2016

any work on a fix?

@nemesyssoft
Copy link

I think the fix should come from eddn.io. I think that's the part that is broken, it chokes on new weapons.

@AnthorNet
Copy link
Contributor

@nemesyssoft I will gladly updates when I receive the buggy one !

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