devilking15292 / IMDB_Api_python

Imdb python api to get movie details
GNU General Public License v3.0
6 stars 1 forks source link

pip install error #2

Open samuelcombey opened 6 years ago

samuelcombey commented 6 years ago

with open('requirements.txt') as f: FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'

----------------------------------------

Command "python setup.py egg_info" failed with error code 1

devilking15292 commented 6 years ago

Thanks for reporting the issue,

Can you kindly help me with the version of python you are currently working with

and also confirm that, it is the latest version of the package ?

samuelcombey commented 6 years ago

Yes It's the latest version of pip tried using conda too didn't work both python 3.6

devilking15292 commented 6 years ago

The issue seems to be with the packing of the distribution, the file requirements.txt was not imported into the package.

This is fixed with the latest version, try installing the latest pkg IMDBAPI==1.0.2.

if you are having problems with version not available, kindly use the --no-cache-dir option.

pip install --no-cache-dir IMDBAPI==1.0.2

Thanks Again!

samuelcombey commented 6 years ago

Fixed now

samuelcombey commented 6 years ago

Tried your sample1.py this the error I've been getting

Traceback (most recent call last): File ".../example/sample1.py", line 37, in main() File ".../sample1.py", line 19, in main print("Director: "+ imdb.getDirector(movie)) File "...\Python\Python37\lib\site-packages\IMDBAPI__init.py", line 66, in getDirector return IMDB.getDirectorByImdbId(self, IMDB.getIdFromName(title)) File "...\Python\Python37\lib\site-packages\IMDBAPI\init__.py", line 70, in getDirectorByImdbId return re.sub('\s+', '', IMDB.parseHTML(soup, 'span', 'itemprop', 'director').a.span.text) AttributeError: 'NoneType' object has no attribute 'a'

devilking15292 commented 6 years ago

The results of this API depends on the front end html given by the site,

it may fail if the class or id or the tag which identify particular data is changed.

In this case the tag which used to identify the director field is changed by the Site, hence it results in the error.

I'll suppress the error for now, and will try to find away to identify the particular tag.

Note: The fix/any part of the code, may fail in the future given the change in the html.