> ERROR:root:Importer beancount_reds_importers.vanguard.Importer.extract() 
raised an unexpected error: name 'hasatrr' is not defined 

Drat, fixed that typo, thanks!

On Sunday, May 23, 2021 at 11:35:01 PM UTC-7 jrgo...@gmail.com wrote:

> Thanks @John for raising this issue and to @reds for fixing it so quickly. 
> I also, coincidentally, encountered this issue today and followed this 
> thread and updated to the git version and it works now too! I got error 
> messages related to CUSIPs that I didn't do a normal buy from at Vanguard. 
> But the error message me the CUSIP and I added them to the fund_info file. 
> These CUSIPS were transferred in from another institution and not buys. I 
> inspected the OFX and pasted the info for that CUSIP if that helps make the 
> importer more robust. If there are parts missing I can send that over to 
> you as well. But I can see that it is a transfer.
>
> >>>
>
> Error: fund info not found for 00206R102
>
> ERROR:root:Importer beancount_reds_importers.vanguard.Importer.extract() 
> raised an unexpected error: name 'hasatrr' is not defined
>
> Traceback (most recent call last):
>
> >>>
>
> OFX snippet:
>
> <MEMO>TRANSFER OF ACCOUNTTRANSFER OF 
> ACCOUNT</INVTRAN><SECID><UNIQUEID>00206R102<UNIQUEIDTYPE>CUSIP</SECID><SUBACCTSEC>CASH<UNITS>7.0<TFERACTION>IN<POSTYPE>LONG</TRANSFER><TRANSFER><INVTRAN>
>
>
>
> On Monday, May 24, 2021 at 1:12:35 PM UTC+12 john.a.r...@gmail.com wrote:
>
>> 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/128422cc-5adc-4d8d-8c3b-79c400434475n%40googlegroups.com.

Reply via email to