alexander-pick / MKMTool

MKMTool ist a helper application I wrote for tinkering around with optimization of sale processes on magiccardmarket.eu and the idea of automisation of some tasks most people wouldn’t be able to get done by pure manpower.
GNU Affero General Public License v3.0
65 stars 15 forks source link

Error 400 and program crash #8

Closed titomsantos closed 5 years ago

titomsantos commented 5 years ago

I've been testing the app and it's working fine when i handle a small sample collection.

After this initial test i bulk added through the website a entire Ultimate Masters collection with 4 copys each and wrong prices so i could actually get a feel of how the presets work.

I then press Update prices on the Tool and it scans correctly the entire collection but at the last moment, just before sending the changes, the program displays a error and i get a error 400 in the tool and the update button is greyed out.

tomasjanak commented 5 years ago

According to MKM's own documentation (https://api.cardmarket.com/ws/documentation/API_2.0:Response_Codes) there should be some more information with the error saying what exactly is going wrong. Isn't there some more text with the error message?

titomsantos commented 5 years ago

No, just error 400. I tested cutting down the listed articles again and with just around 10 it works just fine. It's weird since i only tested with one set, 200 and something cards.

It seems to me like there is a name mismatch of some kind on a card name or something similar.

PS: Where are the logs stored?

tomasjanak commented 5 years ago

So according to the message from 6.2.2019 on https://www.mkmapi.eu/ws/documentation/API_Main_Page we are now limited to updating at most 100 articles per one call, otherwise you get error 400. So I have modified MKMTool to respect that and it seems to be working (I was getting 400 before as well, now with the changes I made it works for me). For now, if you are compiling everything yourself, you can download it from my fork on https://github.com/tomasjanak/MKMTool. It also includes some other minor bugfixes I made earlier but didn't make them public because....I was lazy.

I guess I will make a pull request here on Alexander's Github, but he doesn't seem to be active anymore, the last pull request is fixing some important API changes as well (it is included in my fork) but it is still pending since October, so I am not sure if Alexander maintains this anymore.

As for the logs, I don't think they are stored anywhere, but I could be wrong.

titomsantos commented 5 years ago

Thanks. I'll compile it and give it a go.

Just tested it and it seems to be working fine. Updates every 100 articles as described.