我正在尝试编译这个:https://gist.github.com/robcarver17/c9b550c4cf335b3ab77eadd330f5c904,但实际上我遇到了一些错误:

Getting full contract details from the server... 
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfarm.nj
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfuture
IB error id -1 errorcode 2104 string Market data farm connection is OK:usfarm
IB error id -1 errorcode 2106 string HMDS data farm connection is OK:ilhmds
IB error id -1 errorcode 2106 string HMDS data farm connection is OK:njhmds
Getting orderid from IB
Using order id of 2
Placed market order, orderid is 2
IB error id -1 errorcode 2104 string Market data farm connection is OK:cashfarm
IB error id -1 errorcode 504 string Not connected
Exceeded maximum wait for wrapper to confirm finished whilst getting orders
Recent fills
{}
Recent fills (should be blank)
{}
Executions today
IB error id -1 errorcode 504 string Not connected
Exceeded maximum wait for wrapper to confirm finished whilst getting exec / commissions
{}
Getting orderid from IB
Wrapper timeout waiting for broker orderid
IB error id -1 errorcode 504 string Not connected
Traceback (most recent call last):
  File "C:/Users/P/PycharmProject/1/api5.py", line 823, in <module>
    orderid2 = app.place_new_IB_order(resolved_ibcontract, order2, orderid=None)
  File "C:/Users/P/PycharmProject/1/api5.py", line 545, in place_new_IB_order
    raise Exception("I couldn't get an orderid from IB, and you didn't provide an orderid")
Exception: I couldn't get an orderid from IB, and you didn't provide an orderid.

我能做什么?