Coder Social home page Coder Social logo

UnicodeDecodeError about deep_trader HOT 5 OPEN

deependersingla avatar deependersingla commented on August 15, 2024
UnicodeDecodeError

from deep_trader.

Comments (5)

tivvit avatar tivvit commented on August 15, 2024

looks like python2 vs python3 problem

from deep_trader.

yeshengyi avatar yeshengyi commented on August 15, 2024

I use python3

from deep_trader.

smileyung avatar smileyung commented on August 15, 2024

UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 0: ordinal not in range(128)
I have the same problem with python 3

/home/smilewater/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
"This module will be removed in 0.20.", DeprecationWarning)
Traceback (most recent call last):
File "dqn_model.py", line 11, in
from train_stock import *
File "/media/smilewater/Disk/pywork/SinicaFinancial/deep_trader/tensor-reinforcement/train_stock.py", line 21, in
data = episodic_data.load_data("data.pkl",episode=10)
File "/media/smilewater/Disk/pywork/SinicaFinancial/deep_trader/tensor-reinforcement/episodic_data.py", line 71, in load_data
data = load_file_data(file)
File "/media/smilewater/Disk/pywork/SinicaFinancial/deep_trader/tensor-reinforcement/episodic_data.py", line 76, in load_file_data
data = six.moves.cPickle.load(myFile)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x97 in position 0: ordinal not in range(128)

from deep_trader.

BTCTON avatar BTCTON commented on August 15, 2024
def load_file_data(file):
with open(file, 'rb') as myFile:
    # data = six.moves.cPickle.load(myFile)
    data = pickle.load(myFile, encoding='latin')
return data

change episodic_data.py to this.

from deep_trader.

greg2paris avatar greg2paris commented on August 15, 2024

I have tried the solution you provided but i got an other error.

return hashlib.md5(string).hexdigest()
Unicode-objects must be encoded before hashing

how do you think I can fix this?

from deep_trader.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.