mop-tracker / mop

Stock market tracker for hackers.
MIT License
1.98k stars 302 forks source link

Error fetching market data... #106

Closed ogarcia closed 1 year ago

ogarcia commented 1 year ago

Seems that mop is not working correctly, when you launch it, it gives this error directly, regardless of what you have in the configuration file.

json: cannot unmarshal object into Go value of type []map[string]interface {}

mop error

gireesh971 commented 1 year ago

Something changed on yahoo side?

curl https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL,GOOG,F 2>/dev/null

returns

{"finance":{"result":null,"error":{"code":"Unauthorized","description":"Invalid Cookie"}}}%
brandleesee commented 1 year ago

Thank you @ogarcia for the report. @gireesh971 I think that there was a change in the Yahoo API or layout. This would not be the first time.

Mohit-Agarwa1 commented 1 year ago

Hey,

running curl https://query1.finance.yahoo.com/v7/finance/quote?symbols=AAPL,GOOG,F 2>/dev/null on my end produces a full query, as does doing the same with the v6 API, not too sure what's going on, but I don't think there's a change in the spec. Will continue to look into it though.

brandleesee commented 1 year ago

We would be grateful Mohit, thank you in advance.

I also wish - in the spirit of this collaborative project - to invite anyone who wishes to contribute. Thank you too!

educanorama commented 1 year ago

I also have this issue, exactly as described by ogarcia, but only noticed it today after upgrading openSUSE Tumbleweed to the 6.3 kernel in the 20230503 snapshot. Mop worked fine a couple of days ago.

brandleesee commented 1 year ago

Thank you very much @Mohit-Agarwa1 :)

@ogarcia @gireesh971 @educanorama can any one of you please verify from your end so I can close accordingly?

ogarcia commented 1 year ago

After applying the last commit it works perfectly for me. :wink:

educanorama commented 1 year ago

Fixed on my end, too. Thank you!

bakerbrandond commented 1 year ago

Looks like they changed something again? May I suggest making these strings configurable without recompile? Seems to happen often? Just found and am trying to use this tool for the first time

brandleesee commented 1 year ago

Merged: https://github.com/mop-tracker/mop/commit/9ba04b7c56b1d3efa3ae5c42ee9d3d0f075a5a6c

@bakerbrandond, can you verify from your end that it is now working for you?

bakerbrandond commented 1 year ago

@brandleesee lgtm. thanks.