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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

updatePrices ends with error code

PeterUnb opened this issue · comments

First of, I love your project. I tried it out today and had some fun with it. Thank you for sharing!

I tested a few presets on my listings (41 cards) - all worked fine and was very satisfying to look at.
It ends correctly with "Done. Prices NOT SENT to MKM - running in test mode finished."

I then decided to apply the price update to my collection for real, but got the following error:

Error with sending stock update to MKM: Die Anfrage wurde abgebrochen: Die Anfrage wurde abgebrochen..

I have attached the zipped preset xml file I used.
error.zip

With my settings, some of the card prices are (and should) not be updated due to the reasons

  • no similar items
  • variance of prices too high
  • change too large

Is this behavior intended?
Did I misconfigure the settings?

Or did I put the wrong settings to my API account? (I have configured my tokens & access)

I have set the API type to "Dedicated" and put the app name "trading_beta"
Checking my inventory etc. works fine though.

Kind regards

Hello, the update settings most likely do not have any impact on this error, but I don't why is MKM rejecting the update. The error sounds like something is wrong with authentication, but the token configuration seems to be OK, otherwise you would get errors sooner. Two days ago they had some issues and the whole site wasn't working, did you try it recently? It is working for me today for example.

Also, are you using the latest version (0.7.0.4)? There were some issues with special characters (&, <, > etc.) in card comments, but it has been fixed. Do you have something written as comments for individual cards?

Hi tomasnjanak,

thank you for the fast reply!

I did use the "!", "|", "ü" & "ä" character in my comments. Maybe that is the problem here?

I am going to remove these signs from my comments and reply to this thread again soon.

Further Details (probably not relevant):

I'm using the latest version, I downloaded it yesterday.

I still got the same error message right now:
Error with sending stock update to MKM: Die Anfrage wurde abgebrochen: Die Anfrage wurde abgebrochen..
Last Run finished: 14.11.2019 23:56:59

I experienced the errors from the website like you described (I think error 503 on their website) yesterday. Today, on first glance, everything seems to work fine on the website again. I checked the trends section and my offers as well as single cards I listed without experiencing the error messages from the website., e.g. https://www.cardmarket.com/de/Magic/Products/Einzelkarten/Zwietracht/Bronzene-Sexbombe
https://www.cardmarket.com/de/Magic/Products/Einzelkarten/Kaelteeinbruch/Klimperstein
... and other cards from my profile

On my first look on your code (I'm still a student & didn't launch the app in debug mode & used the precompiled version) I wasn't able to find the origin of that error message. I know a little c# but guessed you are way more efficient at locating potencial errors.

For troubleshooting I have deleted the old app tokens & added them using "MKMTool" as app name. It resulted in the same error as before.

I appreciate your effort!

PS: I'm not only trying to manage my card prices using your tool but am also preparing a student presentation for a seminar held in TU Ilmenau (DE) on cardmarket in 2 weeks.

Apart from ".", "," " ", "-"(space) the card comments/descriptions conatin no more special characters any more.

If you look in the error_log.txt (in the same folder as the exe is) it should contain the error message followed by the entire http request that was send to MKM, you can check if you see something wrong there, though I don't know what to look for. The body of it should be an XML that looks for example like this, except in your case there should be 41 article tags:

<request>
    <article>
        <idArticle>1444912.0</idArticle>
        <price>4</price>
        <idLanguage>1</idLanguage>
        <comments>Edited through the API</comments>
        <count>4</count>
        <condition>EX</condition>
    </article>
    <article>
        <idArticle>42914990</idArticle>
        <idLanguage>1</idLanguage>
        <comments>Edited through the API</comments>
        <count>3</count>
        <price>4</price>
        <condition>EX</condition>
    </article>
</request>

If you download the code and run it yourself, you could try some modifications, like sending just a single (the first) article for update, so that we know whether the problem is because of one of your articles or with the update in general (you would just put if (sRequestXML.Length > 0) break; after line 530 in MKMBot.cs). Alternatively you can delete all your articles and add them back one by one, running the update after you add each, but that seems tedious and if the problem is not with any single article you won't find anything.

Thank you for the troubleshooting help!

I was about to try it, then just started the tool (same version, as-is) again on a different computer from a different network, added my API config and loaded my preset - and it simply worked.

I have no idea what is the issue with my other installation / setup, but it worked for me now.

I will stay tuned.

... it also now works with the initial setup. So probably there was a weird kind of error on cardmarket's side.