Comments (16)
I can reproduce this on
OS: macOS Sonoma 14.4.1, M3 Silicon
pytr version: 0.1.9
My error message and stack:
10:22:29 Received error message: '1 E {"errors":[{"errorCode":"UNKNOWN_ERROR","errorField":null,"errorMessage":"Unknown error","meta":{"source":"PLATFORM"}}]}'
10:22:29 ('1', {'type': 'timeline', 'after': None}, {'errors': [{'errorCode': 'UNKNOWN_ERROR', 'errorField': None, 'errorMessage': 'Unknown error', 'meta': {'source': 'PLATFORM'}}]})
Traceback (most recent call last):
File "/Users/pgoodbread/Library/Python/3.9/bin/pytr", line 8, in <module>
sys.exit(main())
File "/Users/pgoodbread/Library/Python/3.9/lib/python/site-packages/pytr/main.py", line 208, in main
asyncio.get_event_loop().run_until_complete(dl.dl_loop())
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/Users/pgoodbread/Library/Python/3.9/lib/python/site-packages/pytr/dl.py", line 77, in dl_loop
if subscription['type'] == 'timeline':
UnboundLocalError: local variable 'subscription' referenced before assignment
from pytr.
HI,
yes TR definitely changed something. Another (browser based tool), cannot download the docs since 8th june 2024 as well. They also somehow changed the PDF format, so that portfolio performance could not read it. But this is fixed this today.
sorry, I cannot help more than that, as I am not a programmer.
thaks
Juergen
from pytr.
My best guess would be that TradeRepublic has made some changes in their api and therefore the subscriptions
varriable in api.py does not get populated correctly anymore. However, I have not had a closer look at how the data is obtained or how the traderepublic api works.
from pytr.
@marzzzello : if you walk me through where you get your data via the 'private traderepublic api', I can contribute
from pytr.
Same problem here at Windows 11:
C:\Users\juergen>pytr dl_docs H:\Juergen\Finanzen\traderepublic_juergen_downloads --last_days 60 21:15:27 Found credentials file 21:15:27 Phone: +49159********, PIN: **** 21:15:27 Web session resumed 21:15:27 Logged in 21:15:27 Found 3724 lines in history file 21:15:27 Awaiting #1 timeline 21:15:27 Connecting to websocket ... 21:15:27 Connected to websocket ... 21:15:27 Received error message: '1 E {"errors":[{"errorCode":"UNKNOWN_ERROR","errorField":null,"errorMessage":"Unknown error","meta":{"source":"PLATFORM"}}]}' 21:15:27 ('1', {'type': 'timeline', 'after': None}, {'errors': [{'errorCode': 'UNKNOWN_ERROR', 'errorField': None, 'errorMessage': 'Unknown error', 'meta': {'source': 'PLATFORM'}}]}) Traceback (most recent call last): File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "C:\Python310\Scripts\pytr.exe\__main__.py", line 7, in <module> File "C:\Python310\lib\site-packages\pytr\main.py", line 208, in main asyncio.get_event_loop().run_until_complete(dl.dl_loop()) File "C:\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "C:\Python310\lib\site-packages\pytr\dl.py", line 77, in dl_loop if subscription['type'] == 'timeline': UnboundLocalError: local variable 'subscription' referenced before assignment
from pytr.
While with my TR account everything works fine, on the same machine I get the error above with the account of my girlfriend. It seems that this also depends on the used tr account.
from pytr.
Same here.
Could this have to do with the new "Giro-Konto" upgrade they offer?
Hope that someone finds a fix.
from pytr.
Same here. Could this have to do with the new "Giro-Konto" upgrade they offer? Hope that someone finds a fix.
This might be the case, I did the Giro upgrade while my girlfriend did not get the information about this yet.
from pytr.
Got the same error message but I've already updated to Giro. :/
from pytr.
I can confirm, the pull req #74 seems to fix the issues.
"seems" because I didn't test all features & functions, but standard operation works like a charm again.
If you're somewhat familiar with GIT and pip, it's easy to download locally and install.
from pytr.
HI,
I did a
pip uninstall pytr
and a
pip install pytr
But the version number did not change. It still shows
pytr -V
0.1.9
14:46:08 pytr is up to date
Anything else I need to do?
(The "Abrechnung" PDFs are still not downloaded, this is why I am asking.)
thanks
Juergen
from pytr.
HI, I did a
pip uninstall pytr
and apip install pytr
But the version number did not change.
That's because the pull request has not been approved/incorporated by the (original) author yet.
What you can do meanwhile:
- clone a local repo with & cd to it:
git clone https://github.com/pytr-org/pytr.git
cd pytr
- fetch the pull req as a branch:
git fetch origin pull/74/head:datastructure-fix-formating
- change branch:
git checkout datastructure-fix-formating
- install from local source if you're using pip:
pip install -e .
Before item 4. (pip install) I did edit ./setup.py
and changed the version number to 0.1.9.1 - just to be sure, you may not need to though.
from pytr.
Hi @olivermuc ,
thanks a lot.
This does:
17:11:16 Received #88 timeline, awaiting #89 timeline
17:11:16 Received #89 (last) timeline
17:11:16 1/2648: Einzahlung/Auszahlung --
17:11:16 2/2648: Einzahlung/Auszahlung --
Traceback (most recent call last):
and than
Traceback (most recent call last):
File "/opt/homebrew/bin/pytr", line 33, in <module>
sys.exit(load_entry_point('pytr', 'console_scripts', 'pytr')())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/main.py", line 211, in main
asyncio.get_event_loop().run_until_complete(dl.dl_loop())
File "/opt/homebrew/Cellar/[email protected]/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/dl.py", line 80, in dl_loop
await self.tl.timelineDetail(response, self, max_age_timestamp=self.since_timestamp)
File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/utils.py", line 323, in timelineDetail
title_text = self.get_title_text(response)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/utils.py", line 399, in get_title_text
raise RuntimeError('Unable to detect titleText from response')
RuntimeError: Unable to detect titleText from response
as you might think, I have no clue :-) Hopefully someone else
(Just plain TR, no Banking, no credit card.)
Version 0.1.9 did not gave errors, but also did not DL die "Abrechnungen" but downloaded other PDFs
thanks
Juergen
from pytr.
Hi @olivermuc , thanks a lot.
This does: 17:11:16 Received #88 timeline, awaiting #89 timeline 17:11:16 Received #89 (last) timeline 17:11:16 1/2648: Einzahlung/Auszahlung -- 17:11:16 2/2648: Einzahlung/Auszahlung -- Traceback (most recent call last):
and than
Traceback (most recent call last): File "/opt/homebrew/bin/pytr", line 33, in <module> sys.exit(load_entry_point('pytr', 'console_scripts', 'pytr')()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/main.py", line 211, in main asyncio.get_event_loop().run_until_complete(dl.dl_loop()) File "/opt/homebrew/Cellar/[email protected]/3.11.4/Frameworks/Python.framework/Versions/3.11/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete return future.result() ^^^^^^^^^^^^^^^ File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/dl.py", line 80, in dl_loop await self.tl.timelineDetail(response, self, max_age_timestamp=self.since_timestamp) File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/utils.py", line 323, in timelineDetail title_text = self.get_title_text(response) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/ry90/egeling.cloud/portfolio-performance/2024-trade-republic/pytr/pytr/utils.py", line 399, in get_title_text raise RuntimeError('Unable to detect titleText from response') RuntimeError: Unable to detect titleText from response
as you might think, I have no clue :-) Hopefully someone else
(Just plain TR, no Banking, no credit card.) Version 0.1.9 did not gave errors, but also did not DL die "Abrechnungen" but downloaded other PDFs
thanks Juergen
I can confirm - same for me after installing with pull request as above
from pytr.
(Just plain TR, no Banking, no credit card.) Version 0.1.9 did not gave errors, but also did not DL die "Abrechnungen" but downloaded other PDFs
Odd. Like I said, for me it was straight forward and I followed the exact steps outlined above.
However, different accounts could have different "profiles" per your trading and document history.
Since I can't replicate the issue you're (and @mor3dr3ad) is mentioning, I can't dig deeper. Also, I'd be worried if I -for debugging purposes- ran scripts (and auth requests) too rapidly, my account might get flagged 😬.
Perhaps @marzzzello can shed some light on what to watch out for when debugging?! Cheers-
from pytr.
Hi all,
first of all, thanks for this nice tool :-)
I used this tool not before and had also the mistake described in this issue here:
UnboundLocalError: local variable 'subscription' referenced before assignment
As workaround I installed the branch from #74
pipx install git+https://github.com/DayAft3r/pytr
So, this error above was gone, but another one came :-(
For details, please see my comment there #74 (comment)
from pytr.
Related Issues (20)
- event.shares has €-sign and causes an error decimal.InvalidOperation in transactions.py -> format_decimal(event.shares HOT 2
- Support for Visa Card transactions HOT 9
- Provide pre-build binaries HOT 1
- Export investments as CSV HOT 2
- pytr portfolio gets stuck while unsubscribeing HOT 4
- pytr portfolio stuck after connected to websocket HOT 2
- Saveback documents are not downloaded HOT 2
- portfolio_history is not working HOT 1
- pytr dl_docs shows new documents but does not download them HOT 15
- Looking for (co-)maintainers HOT 8
- TypeError for timestamp HOT 1
- pytr download of docs fails if last_days option is provided HOT 8
- Download transactions from date HOT 1
- release is not visible in package manager HOT 3
- Names of Files and their Folders changed HOT 1
- Add the transaction title to the transaction details
- Formatting improvement HOT 2
- Add card transactions into csv automatically HOT 1
- Customizable destination folder structure HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytr.