Skip to content

How long can the bot run #31

@kernelhacks

Description

@kernelhacks

2022-04-18 23:41:35 python3 main.py //START

2022-04-19T21:32:01.787955976Z 1.07869 1.07906 //EXCEPTION OCCUR
Traceback (most recent call last):
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 700, in _update_chunk_length
self.chunk_left = int(line, 16)
ValueError: invalid literal for int() with base 16: b''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 441, in _error_catcher
yield
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 767, in read_chunked
self._update_chunk_length()
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 704, in _update_chunk_length
raise InvalidChunkLength(self, line)
urllib3.exceptions.InvalidChunkLength: InvalidChunkLength(got length b'', 0 bytes read)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/FXBot/env/lib/python3.8/site-packages/requests/models.py", line 760, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 575, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 796, in read_chunked
self._original_response.close()
File "/usr/lib/python3.8/contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "/root/FXBot/env/lib/python3.8/site-packages/urllib3/response.py", line 458, in _error_catcher
raise ProtocolError("Connection broken: %r" % e, e)
urllib3.exceptions.ProtocolError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/root/FXBot/env/lib/python3.8/site-packages/v20/response.py", line 52, in parts
for line in self.lines:
File "/root/FXBot/env/lib/python3.8/site-packages/requests/models.py", line 804, in iter_lines
for chunk in self.iter_content(chunk_size=chunk_size, decode_unicode=decode_unicode):
File "/root/FXBot/env/lib/python3.8/site-packages/requests/models.py", line 763, in generate
raise ChunkedEncodingError(e)
requests.exceptions.ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 114, in
trader = SMALive(cfg, instrument, granularity, smas, smal, units, stop_loss=stop_loss, stop_profit=stop_profit)
File "/root/FXBot/livetrading/SMALive.py", line 37, in init
super().init(
File "/root/FXBot/livetrading/LiveTrader.py", line 77, in init
self.stream_data(self._instrument)
File "/root/FXBot/env/lib/python3.8/site-packages/tpqoa-0.0.55-py3.8.egg/tpqoa/tpqoa.py", line 346, in stream_data
File "/root/FXBot/env/lib/python3.8/site-packages/v20/response.py", line 57, in parts
raise V20ConnectionError(self.path)
v20.errors.V20ConnectionError: Connection to v20 REST server at https://stream-fxpractice.oanda.com:443/v3/accounts/101-001-22097154-002/pricing/stream?instruments=EUR_USD&snapshot=True failed
2022-04-19T21:32:46.993264831Z : 0 --- 50.0 units, price of $1.07906, profit of $-0.0225, cum profit of $-0.1805

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions