Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission error for export_transactions #26

Closed
Johannes0941 opened this issue Mar 19, 2022 · 3 comments
Closed

Permission error for export_transactions #26

Johannes0941 opened this issue Mar 19, 2022 · 3 comments

Comments

@Johannes0941
Copy link

Description of the bug
When calling the export_transactions function, I get a permission denied error.
Probably the input and ouput should be something else. Could you please clearify that and maybe add it in the code documentation.
Thank you very much!

Error log

(base) C:\Users\49176\Documents\trade_republic>pytr export_transactions C:\Users\49176\Documents\trade_republic C:\Users\49176\Documents\trade_republic
Traceback (most recent call last):
  File "C:\Users\49176\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\49176\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\49176\anaconda3\Scripts\pytr.exe\__main__.py", line 7, in <module>
  File "C:\Users\49176\anaconda3\lib\site-packages\pytr\main.py", line 168, in main
    export_transactions(args.input, args.output, args.lang)
  File "C:\Users\49176\anaconda3\lib\site-packages\pytr\utils.py", line 174, in export_transactions
    with open(input_path, encoding='utf-8') as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\49176\\Documents\\trade_republic'

After calling the function I added the folder previously generated by dl_docs and the same folder, to save the document there.
Are these principally the right steps?

@C0D3D3V
Copy link

C0D3D3V commented Mar 19, 2022

try to use it like: pytr export_transactions C:\Users\49176\Documents\path\to\other_events.json C:\Users\49176\Documents\export\path\to\results.csv

@Johannes0941
Copy link
Author

Thank you! Now I understood what the function does.
However I found that dl_docs already creates such a file, so maybe dl_docs should be positioned a bit clearer, as it seems to me this would be the most important function for most Parquet/ Portfolio Performance users. Also I guess you need to download the docs anyway before being able to export the transactions, so maybe the extended functionality of dl_docs made this method obsolete?

In my initial understanding the method would have created a method of all buy and sell actions of stocks directly, but now when reading the description I understand that it only considers bank transerfs to the account.

But as Parquet has a very good batch importing of pdf´s, this missing funtionality was not really a problem after all.

@marzzzello
Copy link
Collaborator

I updated the help messages in the new version to make things clearer.
The export_transactions command is currently not really needed as dl_docs does the same after the documents are downloaded.
But if you want to change the language of the exported csv file the command is quite useful (yes the csv for Portfolio Performance is language dependent, don't ask me why). Maybe there will be more options in the future.

P.S. Thanks for your donation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants