Skip to content
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

File "train.py", line 739, in main class_count = len(image_lists.keys()) AttributeError: 'NoneType' object has no attribute 'keys' #8

Open
monajalal opened this issue Jun 11, 2018 · 5 comments

Comments

@monajalal
Copy link

Hey how do you actually run this?
What are the step-by-step commands to get this going?

[jalal@goku sign-language-alphabet-recognizer]$ python train.py 
/scratch/sjn/anaconda/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
  return f(*args, **kwds)
>> Downloading inception-2015-12-05.tgz 100.0%
Successfully downloaded inception-2015-12-05.tgz 88931400 bytes.
Image directory '' not found.
Traceback (most recent call last):
  File "train.py", line 1022, in <module>
    tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
  File "/scratch/sjn/anaconda/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 48, in run
    _sys.exit(main(_sys.argv[:1] + flags_passthrough))
  File "train.py", line 739, in main
    class_count = len(image_lists.keys())
AttributeError: 'NoneType' object has no attribute 'keys'

@mishra-tanay
Copy link

I think you are not working on a opencv environment .
Check if you have installed python dependencies using pip install.
then try running by
' python3 train.py dataset

@teodorabotez
Copy link

teodorabotez commented Dec 2, 2019

I'm using conda so i tried to train and this showed:

Traceback (most recent call last):
File "train.py", line 1022, in
tf.app.run(main=main, argv=[sys.argv[0]] + unparsed)
AttributeError: module 'tensorflow' has no attribute 'app'

@csyjin6
Copy link

csyjin6 commented Mar 14, 2020

any update for this thread?

@samik-rathore
Copy link

can someone solve the issue?

@santhosh-mee
Copy link

I'm using conda so i tried to train and this showed:

Traceback (most recent call last): File "train.py", line 1022, in tf.app.run(main=main, argv=[sys.argv[0]] + unparsed) AttributeError: module 'tensorflow' has no attribute 'app'

replace all tf. with tf.compat.v1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants