2

Simple model and 1 row of data, I think any recent version of python and tensorflow, returns:

tensorflow.python.framework.errors_impl.InternalError: Unable to get element as bytes.

https://github.com/jasonsackett/tferrorgeab

I have searched high and low and tried so many things, but something simple is breaking this and the error message is not helping me very much.

Run with:

python mlturn1a1ssa.py

Thank you for any help.

0

2 Answers 2

1

UPDATE: hardcoding the data in this line:

g.train_data = dfin.values

to this instead makes it run:

g.train_data = np.array([[0]*4])

so it is something with the dataframe .values transformation, even though the data looks ok when printed.

Sign up to request clarification or add additional context in comments.

1 Comment

UPDATE 2: This simplified example did not exactly reflect my local issue, dropping columns like this does fix it (code is updated): g.train_data = dfin.drop(columns=['ctags', 'ltags', 't']).values
0

you have to convert the str to unicode, here is the example

df=pd.read_csv('test.csv',encoding='utf-8')
reviews = df['review'].values.astype('U')

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.