redstreet/beancount_reds_importers

transform() takes 1 positional argument but 2 were given

kantskernel opened this issue · 2 comments

When I run my-smart.import with bean-extract and no pre-existing data everything runs fine.

Once I add in actual data, I get the error:
ERROR:root:Importer beancount_reds_importers.chase.Importer.extract() raised an unexpected error: transform() takes 1 positional argument but 2 were given

I found this:
https://stackoverflow.com/questions/23944657/typeerror-method-takes-1-positional-argument-but-2-were-given

And I was able to go to smart_importer/pipelines.py and and add self to transform() like this:
def transform(self, data):

After a very quick check, it looks to have resolved my issue. Checking if this makes sense and if there might be an actual bug

That is a @staticmethod, and so, it should not have a self. There is something else going on, and I can't tell what it is without a detailed look (for which I unfortunately don't have time right now). You will have to debug and take a deeper look. I doubt it's related to beancount_reds_importers if you're seeing it in smart_importers (even though the importer is in the call stack).

Closing this as I don't believe it's related to beancount_reds_importers. Feel free to reopen if you find out otherwise.