Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

TypeError: slice indices must be integers or None or have an __index__ method #58

@loretoparisi

Description

@loretoparisi
(.env) [loretoparisi@:mbploreto tutorial]$ python shakespeare.py 
Starting Shakespeare
Successfully downloaded shakespear.txt 99993 bytes.
Traceback (most recent call last):
  File "shakespeare.py", line 253, in <module>
    tf.app.run()
  File "/Users/loretoparisi/Documents/MyProjects/prettytensor/.env/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "shakespeare.py", line 211, in main
    shakespeare = data_utils.shakespeare(TIMESTEPS + 1)
  File "/Users/loretoparisi/Documents/MyProjects/prettytensor/.env/lib/python3.6/site-packages/prettytensor-0.7.2-py3.6.egg/prettytensor/tutorial/data_utils.py", line 135, in shakespeare
    0:len(shakespeare_full) / chunk_size * chunk_size]
TypeError: slice indices must be integers or None or have an __index__ method

Since the shakespeare.py did not work due to the issue #56 I have used the PR #57 doing

$ virtualenv -p python3 .env
$ pip install tensorflow
$ python setup.py build
$ python setup.py build
$ cd prettytensor/tutorial/
$ python shakespeare.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions