And you were right -- I didn't have fidelity in the file names of today's downloads.
On Sunday, May 23, 2021 at 9:07:27 PM UTC-4 john.a.r...@gmail.com wrote: > Hi, Red -- > > Thanks again, and definitely no need to apologize. > > It's now working. One challenge along the way is that my data file > includes the transaction types (or keys?) "buyother" and "sellother". The > extract choked with error messages to that effect, giving lines in the file > "investments.py." As a short-term fix (or perhaps a misguided move?), I > added these two terms to the list at line 245 in investments.py and also in > the account_map beginning on line 51. I'm now sure how these buys and sells > are different from the standards "buystock" and "sellstock." They're > associated with transactions involving funds with a CUSIP. > > Thanks again for your responses to my questions and also for the files and > "rants." All of it has been immensely helpful. > > Now to play with smart importer. > > On Sunday, May 23, 2021 at 7:26:21 PM UTC-4 redst...@gmail.com wrote: > >> Apologies, this is unreleased, bleeding edge code, and I should've warned >> that you're bound to run into these types of things. The fix for this one >> is simple: just add 'capgains_lt' and 'capgains_st' to your config. The >> updated example file shows how: >> >> https://github.com/redstreet/beancount_reds_importers/blob/master/beancount_reds_importers/example/my.import >> >> Optional: You might also want to pip3 install again (I just updated the >> example code), and run the example code, which should help as a reference >> for troubleshooting future issues. >> >> I wouldn't be surprised if you ran into a couple more problems on this >> bleeding edge code: simply post here and I'll fix them. >> >> Regarding the ofx file you just downloaded: >> - is it named appropriately (includes 'fidelity' in the filename)? >> - does it include transactions for the account number in your config? >> ("grep <acc_num> fidelity.ofx" should tell you) >> >> On Sunday, May 23, 2021 at 3:22:50 PM UTC-7 john.a.r...@gmail.com wrote: >> >>> Hi, Red -- >>> >>> Thanks very much for the prompt response. >>> >>> I installed the plug-in as instructed above, and unfortunately I've >>> taken a step back. Bean-identify still associates these files with my >>> import settings, but now I can't extract any files. Instead, I get this >>> error message: >>> >>> ERROR:root:Importer beancount_reds_importers.fidelity.Importer.extract() >>> raised an unexpected error: 'capgains_lt' >>> Traceback (most recent call last): >>> File >>> "/Users/johnrakestraw/.pyenv/versions/3.9.1/lib/python3.9\\\\\\/site-packages/beancount/ingest/extract.py", >>> >>> line 182, in extract >>> new_entries = extract_from_file( >>> File >>> "/Users/johnrakestraw/.pyenv/versions/3.9.1/lib/python3.9/site-packages/beancount/ingest/extract.py", >>> >>> line 67, in extract_from_file >>> new_entries = importer.extract(file, **kwargs) >>> File >>> "/Users/johnrakestraw/.pyenv/versions/3.9.1/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", >>> >>> line 311, in extract >>> self.initialize(file) >>> File >>> "/Users/johnrakestraw/.pyenv/versions/3.9.1/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", >>> >>> line 45, in initialize >>> self.build_account_map() # TODO: avoid for identify() >>> File >>> "/Users/johnrakestraw/.pyenv/versions/3.9.1/lib/python3.9/site-packages/beancount_reds_importers/libtransactionbuilder/investments.py", >>> >>> line 57, in build_account_map >>> "capgains_lt": self.config['capgains_lt'], >>> KeyError: 'capgains_lt' >>> >>> And there's a further mystery (at least, a mystery to me). I get this >>> error message on records I downloaded from Fidelity last night. (And, as I >>> said earlier, I successfully extracted transactions for two of my accounts >>> but not for the third.) >>> >>> The mystery is that I downloaded fresh files from Fidelity just now, >>> after getting that error message, using the same commands I used last >>> night. But bean-identify doesn't identify these using my my.import file and >>> bean-extract returns no error messages but instead merely the header -- ;; >>> -*- mode: beancount -*-. >>> >>> Why would it generate the error message with last night's files but not >>> even recognize the ones I just now downloaded? Makes no sense to me. >>> On Sunday, May 23, 2021 at 3:52:08 PM UTC-4 redst...@gmail.com wrote: >>> >>>> Glad you find the importers helpful! >>>> >>>> Thanks for reporting this. Someone else had a case of this too. Filed: >>>> https://github.com/redstreet/beancount_reds_importers/issues/9 >>>> >>>> Made a fix that should help. Could you please try re-running after: >>>> >>>> pip3 install git+https://github.com/redstreet/beancount_reds_importers >>>> >>> -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to beancount+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/665afd87-5d93-478d-bacf-24ff6d0e77f4n%40googlegroups.com.