Code Monkey home page Code Monkey logo

Comments (17)

rossdargan avatar rossdargan commented on June 20, 2024 1

Ok. The issue here is for some reason we are back to getting WrongPushException when we add payees. I'll test with some dummy data and see if I can recreate. The duplicate detection is causing an issue because in our un-synchronised copy we do have the transaction added (it just never get's send to ynab).

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

Are you using something like postman to post these results, or are you actually purchasing things?

from fintech-to-ynab.

dafyddj avatar dafyddj commented on June 20, 2024

These are actual purchases. I've just checked though, and it appears a top-up transaction has gone through.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

The code duplication looks for transactions with the following:
Same Amount on the same date for the same payee.

Are there similar transactions for Tesco on the same day?

from fintech-to-ynab.

dafyddj avatar dafyddj commented on June 20, 2024

No, I've mostly had one transaction a day, and this message appears for all of them.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

Is there anything else in the log?

from fintech-to-ynab.

dafyddj avatar dafyddj commented on June 20, 2024

Sorry, I didn't realise there was more logging than I included above. The full log for the latest transaction is here.

The salient bit seems to be:

2017-06-12T14:28:23.089267+00:00 app[web.1]: DEBUG:pynYNAB.Client:Client.push
2017-06-12T14:28:23.226300+00:00 app[web.1]: ERROR:Fintech to YNAB:Exception on /monzo [POST]
2017-06-12T14:28:23.226304+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1817, in wsgi_app
2017-06-12T14:28:23.226303+00:00 app[web.1]: Traceback (most recent call last):
2017-06-12T14:28:23.226322+00:00 app[web.1]:     response = self.full_dispatch_request()
2017-06-12T14:28:23.226324+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1477, in full_dispatch_request
2017-06-12T14:28:23.226325+00:00 app[web.1]:     rv = self.handle_user_exception(e)
2017-06-12T14:28:23.226325+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1381, in handle_user_exception
2017-06-12T14:28:23.226327+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1475, in full_dispatch_request
2017-06-12T14:28:23.226326+00:00 app[web.1]:     reraise(exc_type, exc_value, tb)
2017-06-12T14:28:23.226328+00:00 app[web.1]:     rv = self.dispatch_request()
2017-06-12T14:28:23.226328+00:00 app[web.1]:   File "/app/.heroku/python/lib/python2.7/site-packages/flask/app.py", line 1461, in dispatch_request
2017-06-12T14:28:23.226329+00:00 app[web.1]:     return self.view_functions[rule.endpoint](**req.view_args)
2017-06-12T14:28:23.226330+00:00 app[web.1]:     body, code = create_transaction_from_monzo(data['data'], settings, 0)
2017-06-12T14:28:23.226329+00:00 app[web.1]:   File "python/main.py", line 47, in route_monzo
2017-06-12T14:28:23.226331+00:00 app[web.1]:   File "python/main.py", line 188, in create_transaction_from_monzo
2017-06-12T14:28:23.226332+00:00 app[web.1]:     ynab_client.client.push(expected_delta)
2017-06-12T14:28:23.226333+00:00 app[web.1]:   File "/app/.heroku/src/pynynab/pynYNAB/Client.py", line 143, in push
2017-06-12T14:28:23.226333+00:00 app[web.1]:     raise WrongPushException(expected_delta, delta)
2017-06-12T14:28:23.226334+00:00 app[web.1]: WrongPushException
2017-06-12T14:28:23.235269+00:00 app[web.1]: INFO:werkzeug:10.10.130.233 - - [12/Jun/2017 14:28:23] "POST /monzo?secret=<redacted> HTTP/1.1" 500 -

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

It looks to me like two calls are being made at once. Can you check the webhooks in monzo and see if you have added the webhook twice please.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

Never mind, checked the logs again and it doesn't appear like two calls are being made.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

Looks connected to #24

from fintech-to-ynab.

ganey avatar ganey commented on June 20, 2024

Also just had this issue today for a new payee.

Wondering if the transaction is only synced in the local copy after being successfully sent to YNAB?
It might improve the false duplication detection, but I'm not sure on what the implications might be.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

I'm thinking there is an issue with adding new payees. I'll look into it when I get a second.

from fintech-to-ynab.

scottrobertson avatar scottrobertson commented on June 20, 2024

I have added full request body logging so that we can easily debug these.

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

@scottrobertson I've confirmed this issue. Adding a new payee causes WrongPushException.

from fintech-to-ynab.

scottrobertson avatar scottrobertson commented on June 20, 2024

@rossdargan can you try it again after the latest commits i just pushed

from fintech-to-ynab.

rossdargan avatar rossdargan commented on June 20, 2024

@scottrobertson yup... confirmed fixed :)

from fintech-to-ynab.

scottrobertson avatar scottrobertson commented on June 20, 2024

Awesome!

from fintech-to-ynab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.