tomahim / py-image-dataset-generator

Get a large image dataset with minimal effort by grabbing image through the web and generate new ones by image augmentation.
MIT License
218 stars 41 forks source link

unittest failed on win, with python3.6.1 #8

Closed zoidburg closed 6 years ago

zoidburg commented 6 years ago

Hi, there seems to be something wrong when I run unittest after installing required dependencies:

ImportError: Failed to import test module: tests.image_grabber.test_image_downloader Traceback (most recent call last): File "C:\Anaconda\lib\unittest\loader.py", line 428, in _find_test_path module = self._get_module_from_name(name) File "C:\Anaconda\lib\unittest\loader.py", line 369, in _get_module_from_name import(name) File "C:\Users\admin\Desktop\py-image-dataset-generator-master\tests\image_grabber\test_image_downloader.py", line 6, in from image_grabber.image_downloader import ImageDownloader File "C:\Users\admin\Desktop\py-image-dataset-generator-master\image_grabber\image_downloader.py", line 5, in from typing import NoReturn, Tuple ImportError: cannot import name 'NoReturn'


Ran 1 test in 0.000s

FAILED (errors=1)

I'm using python3.6.1 on Windows, and I checked the changelog https://docs.python.org/3/whatsnew/changelog.html , it looks like NoReturn was added since python3.6.2

So, should I use python 3.6.2 or above to run this project?

tomahim commented 6 years ago

Hi,

You are right, it's better if you try with a latest Python version, I tested it with 3.6.4 for example, it works fine.

It strange since the project works with Python 3.5.4. It seems that 3.5.X versions completly ignore type hints and that's not the case with Python 3.6.X.

It's something I will investigate more in details, for now I recommend to use a 3.6.4 or more version.

Thanks for your feedback ! I hope it helped.

zoidburg commented 6 years ago

Thanks a lot for your help~