Skip to content

Automatic Trading fails #1

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

Open
rockstardotb opened this issue Feb 4, 2021 · 2 comments
Open

Automatic Trading fails #1

rockstardotb opened this issue Feb 4, 2021 · 2 comments

Comments

@rockstardotb
Copy link

rockstardotb commented Feb 4, 2021

Please see the following Traceback:

> Trading Automatically for ['2020_10']
#################################################################################################

Account Balance: $ 1000 BTC: $ 0 USD: $ 1000

#################################################################################################
########################################## DAY 1 #########################################
Traceback (most recent call last):
File "Controller.py", line 75, in
auto_trader.runSimulation(x_test, prices)
File "/home/crypto-trading-ai-bot-basic/AutoTrader.py", line 54, in runSimulation
prediction = self.advisor.predict(np.array([samples[i]]))
File "/home/crypto-trading-ai-bot-basic/Model.py", line 73, in predict
prediction = np.array(tf.argmax(self.model.predict(sample),1))[0]
IndexError: too many indices for array: array is 0-dimensional, but 1 were indexed

Any idea what could be wrong?

@rockstardotb
Copy link
Author

rockstardotb commented Feb 4, 2021

I added a print statement above line 73 in Model.py (print(tf.argmax(self.model.predict(sample),1)) and got the following:

Tensor("ArgMax:0", shape=(1,), dtype=int64)

followed by the same Traceback as above.

@rockstardotb
Copy link
Author

rockstardotb commented Feb 4, 2021

I am using ubuntu-1804-bionic-v20210129

my python version is 3.6.9

and pip3 freeze outputs the following:

absl-py==0.11.0
asn1crypto==0.24.0
astor==0.8.1
attrs==17.4.0
Automat==0.6.0
blinker==1.4
cached-property==1.5.2
cbpro==1.1.4
certifi==2018.1.18
chardet==3.0.4
click==6.7
cloud-init==20.4
colorama==0.3.7
command-not-found==0.3
configobj==5.0.6
constantly==15.1.0
cryptography==2.1.4
distro-info===0.18ubuntu0.18.04.1
gast==0.4.0
google-compute-engine==20190801.0
google-pasta==0.2.0
grpcio==1.35.0
h5py==3.1.0
httplib2==0.9.2
hyperlink==17.3.1
idna==2.6
importlib-metadata==3.4.0
incremental==16.10.1
Jinja2==2.10
joblib==1.0.0
jsonpatch==1.16
jsonpointer==1.10
jsonschema==2.6.0
Keras-Applications==1.0.8
Keras-Preprocessing==1.1.2
keyring==10.6.0
keyrings.alt==3.0
language-selector==0.1
Markdown==3.3.3
MarkupSafe==1.0
netifaces==0.10.4
numpy==1.19.5
oauthlib==2.0.6
PAM==0.4.2
protobuf==3.14.0
pyasn1==0.4.2
pyasn1-modules==0.2.1
pycrypto==2.6.1
pygobject==3.26.1
PyJWT==1.5.3
pymongo==3.5.1
pyOpenSSL==17.5.0
pyserial==3.4
python-apt==1.6.5+ubuntu0.5
python-debian==0.1.32
pyxdg==0.25
PyYAML==3.12
requests==2.13.0
requests-unixsocket==0.1.5
scikit-learn==0.24.1
scipy==1.5.4
SecretStorage==2.3.1
service-identity==16.0.0
six==1.15.0
sklearn==0.0
sortedcontainers==2.3.0
ssh-import-id==5.7
systemd-python==234
tensorboard==1.14.0
tensorflow==1.14.0
tensorflow-estimator==1.14.0
termcolor==1.1.0
threadpoolctl==2.1.0
Twisted==17.9.0
typing-extensions==3.7.4.3
ufw==0.36
unattended-upgrades==0.1
urllib3==1.22
websocket-client==0.40.0
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.4.0
zope.interface==4.3.2

Repository owner deleted a comment from HMR25 Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant