carpedm20 / carpedm20/DCGAN-tensorflow

TypeError: float() argument must be a string or a number, not 'JpegImageFile'

Open
#304 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.2k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python36\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File "main.py", line 81, in main
data_dir=FLAGS.data_dir)
File "D:\DCGAN-tensorflow-master\model.py", line 83, in __init__
imreadImg = imread(self.data[0])
File "D:\DCGAN-tensorflow-master\utils.py", line 39, in imread
return scipy.misc.imread(path).astype(np.float)
TypeError: float() argument must be a string or a number, not 'JpegImageFile'

How to solve it?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the traceback through main.py and model.py, then inspect utils.py line 39 where scipy.misc.imread(path).astype(np.float) is called. Check the project’s expected Python, TensorFlow, SciPy, and image-library versions; done means the data-loading path handles the reported JPEG input without this TypeError.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, tensorflow
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.