IB credentials fail

Seems like nothing works. I entered my interactive broker credentials (paper) and got another error. This is a linux install exactly as the install docs specify. (username hidden below)

EDIT: Unlike querying for exchange information, IB credentials succeed for installation on a different machine. First machine is running Ubuntu 20.04. Second is running Ubuntu 18.04.


HTTPError Traceback (most recent call last)
in
1 from quantrocket.ibg import set_credentials
2
----> 3 set_credentials(“ibg1”, username=“XXXXX”, trading_mode=“paper”)

/opt/conda/lib/python3.7/site-packages/quantrocket/ibg.py in set_credentials(gateway, username, password, trading_mode)
89
90 response = houston.put("/{0}/credentials".format(gateway), data=data, timeout=180)
—> 91 houston.raise_for_status_with_json(response)
92 return response.json()
93

/opt/conda/lib/python3.7/site-packages/quantrocket/houston.py in raise_for_status_with_json(response)
204 e.json_response = {}
205 e.args = e.args + (“please check the logs for more details”,)
–> 206 raise e
207
208 # Instantiate houston so that all callers can share a TCP connection (for

/opt/conda/lib/python3.7/site-packages/quantrocket/houston.py in raise_for_status_with_json(response)
196 “”"
197 try:
–> 198 response.raise_for_status()
199 except requests.exceptions.HTTPError as e:
200 try:

/opt/conda/lib/python3.7/site-packages/requests/models.py in raise_for_status(self)
938
939 if http_error_msg:
–> 940 raise HTTPError(http_error_msg, response=self)
941
942 def close(self):

HTTPError: (‘400 Client Error: BAD REQUEST for url: http://houston/ibg1/credentials’, {‘status’: ‘error’, ‘msg’: ‘please stop IB Gateway before setting credentials (current status is: error)’})

IB credentials now work on both machines, after restarting all the docker containers on the machine that wasn’t working.

docker-compose down; docker-compose -p quantrocket up -d