-
Notifications
You must be signed in to change notification settings - Fork 112
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
TypeError: 'zip' object is not subscriptable #22
Comments
Can anyone help me with this error? |
Can you make sure that your TF version has tf.gfile.Open, tf.gfile.Exists? |
I have this same issue, and my TF version has tf.gfile.Open, tf.gfile.Exists |
It is probably related to using Python3 instead of 2 (see https://stackoverflow.com/questions/27431390/typeerror-zip-object-is-not-subscriptable ). Cast the |
@homaralex Your reply truely helps. |
This is the error summary
---> 32 import gin.tf
33 import numpy as np
34 import replay_memory
~/anaconda3/lib/python3.6/site-packages/gin/tf/init.py in
66
67 # pylint: disable=unused-import
---> 68 from gin.tf.utils import GinConfigSaverHook
69
70 # pylint: enable=g-import-not-at-top
~/anaconda3/lib/python3.6/site-packages/gin/tf/utils.py in
32
33 # Register TF file reader for Gin's parse_config_file.
---> 34 config.register_file_reader(tf.gfile.Open, tf.gfile.Exists)
35
36
~/anaconda3/lib/python3.6/site-packages/gin/config.py in register_file_reader(*args)
1412 return functools.partial(do_registration, is_readable_fn=args[0])
1413 elif len(args) == 2:
-> 1414 do_registration(*args)
1415 else: # 0 or > 2 arguments supplied.
1416 err_str = 'register_file_reader() takes 1 or 2 arguments ({} given)'
~/anaconda3/lib/python3.6/site-packages/gin/config.py in do_registration(file_reader_fn, is_readable_fn)
1406 """
1407 def do_registration(file_reader_fn, is_readable_fn):
-> 1408 if file_reader_fn not in list(zip(*_FILE_READERS))[0]:
1409 _FILE_READERS.append((file_reader_fn, is_readable_fn))
1410
TypeError: 'zip' object is not subscriptable
1
How do I fix this?
The text was updated successfully, but these errors were encountered: