Encountered parse error and object 'all_data_info' not found error
yaphuiyi opened this issue · 2 comments
Hi, thank you so much for creating this package. I am currently trying to use it to collect financial data for Brazil and I have encountered a few errors along the way, and I would appreciate it if you provide any idea as to overcoming them.
One of the errors I have encountered was "Error in parse_con(txt, bigint_as_char) : parse error: premature EOF" when the function is downloading the data. I tried to delete the json file and redownload it again using this function but it doesn't seem to work.
.
This error occurred when I called bank_df <- get_bank_stats(yyyymm_start = 200203, yyyymm_end = 200212)
Another error I encountered was "Error in dplyr::filter(., Report_column %in% c(5, 79, 91, 94, 98) & td == :
object 'all_data_info' not found".
This happened when I excluded the year and month of the problematic download above (I used bank_df <- get_bank_stats(yyyymm_start = 200203, yyyymm_end = 200209)), but this error will then appear instead.
I would really appreciate if you could provide any insights on this! Thank you!
Thank you for the usage and for reporting this issue, @yaphuiyi!
I will look into them soon. The second issue ('all_data_info' not found
) is due to the optional adjustment done to financial statement variables (income, expenses, etc) on account of Brazilian bank accounting rules stipulating that these accounts be accumulated through the semester, instead of quarterly. If you don't need those accounts for your analyses (ie, if you only need balance sheet variables, branch numbers, etc), then you should be fine with:
bank_df <- get_bank_stats(yyyymm_start = 200203, yyyymm_end = 200212, adjust_income_data = FALSE)
When this bug is patched, the commit will be closing this issue so you will know it will be possible to adjust the financial statement variables.