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

update static data #103

Open
Prossi79 opened this issue Jul 8, 2019 · 1 comment
Open

update static data #103

Prossi79 opened this issue Jul 8, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@Prossi79
Copy link

Prossi79 commented Jul 8, 2019

problem during update static data
` 2019-07-08 22:03:08,645 - main - initialize_optuna - DEBUG - Initialized Optuna:
2019-07-08 22:03:09,700 - main - initialize_optuna - DEBUG - Best reward in (42) trials: -57.909999999999854
2019-07-08 22:03:09,947 - main - init - DEBUG - Initialize RLTrader: PPO2__MlpLnLstmPolicy__IncrementalProfit

done: {<Task finished coro=<save_url_to_csv() done, defined at /root/RLTrader/lib/cli/functions/update_data.py:13> result= ...s x 8 columns]>, <Task finished coro=<save_url_to_csv() done, defined at /root/RLTrader/lib/cli/functions/update_data.py:13> exception=ValueError('unconverted data remains: PM',)>}
pending: set()
2019-07-08 22:03:11,790 - asyncio - default_exception_handler - ERROR - Task exception was never retrieved
future: <Task finished coro=<save_url_to_csv() done, defined at /root/RLTrader/lib/cli/functions/update_data.py:13> exception=ValueError('unconverted data remains: PM',)>
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/pandas/core/tools/datetimes.py", line 291, in _convert_listlike_datetimes
values, tz = conversion.datetime_to_datetime64(arg)
File "pandas/_libs/tslibs/conversion.pyx", line 200, in pandas._libs.tslibs.conversion.datetime_to_datetime64
TypeError: Unrecognized value type: <class 'str'>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/RLTrader/lib/cli/functions/update_data.py", line 17, in save_url_to_csv
csv['Date'] = pd.to_datetime(csv['Date'], format=date_format)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/tools/datetimes.py", line 592, in to_datetime
values = convert_listlike(arg._values, True, format)
File "/usr/local/lib/python3.6/dist-packages/pandas/core/tools/datetimes.py", line 294, in _convert_listlike_datetimes
raise e
File "/usr/local/lib/python3.6/dist-packages/pandas/core/tools/datetimes.py", line 261, in _convert_listlike_datetimes
arg, format, exact=exact, errors=errors)
File "pandas/_libs/tslibs/strptime.pyx", line 159, in pandas._libs.tslibs.strptime.array_strptime
ValueError: unconverted data remains: PM
`

@notadamking notadamking added the bug Something isn't working label Jul 10, 2019
@wavepacket0
Copy link

had your exact same error: the code inside update_data is actually correct.
What i did to fix the problem is: removed and reinstalled python3 on my ubuntu vm.
For example take a look here: https://askubuntu.com/questions/897628/how-to-restore-after-accidentally-apt-get-remove-python...just dont close the terminal while doing this (otherwise you need to install some temrinal emulator like xterm)
I also used venv to create an isolated env afterwards (could be a good thing to try it before refreshing python3 install)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants