tensorflow: <built-in function AppendInt32ArrayToTensorProto> returned NULL without setting an error

Viewed 726

Had various issues getting tensorflow onto my system and eventually did with v1.4.1. Trying to run this: https://github.com/sherjilozair/char-rnn-tensorflow

SystemError: built-in function AppendInt32ArrayToTensorProto returned NULL without setting an error

Searched and couldn't find this specific issue or any patches in newer versions with this same isusue.

1 Answers

You are using an older Tensorflow version, which is probably not compatible with your current python version.

  1. check your computer configuration and install a matching Tensorflow version with the help of the following table: https://www.tensorflow.org/install/pip#package-location
  2. Install a python version that matches your Tensorflow version (also can be found in the link provided above)
  3. Check your python version: $ python3 --version
  4. Check your Tensorflow version:$ pip3 list | grep tensorflow
  5. If versions are matching as stated in the table above you'd probably get rid of the error

I've encountered a similar problem when I was trying to run the Tensorflow image retraining script: https://github.com/tensorflow/hub/raw/master/examples/image_retraining/retrain.py

In my case the problem was caused by Tensorflow 1.11.0 not being compatible with python 3.7.0.

Steps that solved the problem for me:

  1. Uninstall python 3.7.0.
  2. Install python 3.6.0.
  3. I run the script again, and now it run properly

Hope it will hellp :)

Related