Deepakchawla / Mobile-Phone-Dataset-GSMArena

Python script for creating Mobile Phones Dataset on GSMArena website.
MIT License
59 stars 46 forks source link

List index out of range error #6

Open kalyantm opened 4 years ago

kalyantm commented 4 years ago

Hey, I was trying to use the library and encountered the following error when I did a python gsmarena_scraping.py


  File "gsmarena_scraping.py", line 154, in <module>
    obj.save_specification_to_file()
  File "gsmarena_scraping.py", line 120, in save_specification_to_file
    phone_brand = self.crawl_phone_brands()
  File "gsmarena_scraping.py", line 44, in crawl_phone_brands
    table = soup.find_all('table')[0]
IndexError: list index out of range

I'm new to web scraping (and python in general), any pointers would be super helpful, thanks!
muhammadfyuliandi commented 4 years ago

Are you already solved the issues? could you guide me?

ksskskksks commented 4 years ago

'pwd' is not recognized as an internal or external command, operable program or batch file. GSMArenaDataset directory already exists Traceback (most recent call last): File "gsmarena_scraping.py", line 134, in obj.save_specification_to_file() File "gsmarena_scraping.py", line 107, in save_specification_to_file files_list = self.check_file_exists() File "gsmarena_scraping.py", line 102, in check_file_exists return os.listdir(self.absolute_path) FileNotFoundError: [WinError 3] The system cannot find the path specified: '/GSMArenaDataset'

i tried the history version of the gsmarena_scraping.py still cannot run the code ,can you helme to solve the problem? i am new in the python. thanks.

sharjeelm commented 4 years ago

@ksskskksks I think this code was made to run on linux as I got same error in case of running on windows and for case of linux there was no such error.

0810nitesh commented 3 years ago

'pwd' is not recognized as an internal or external command, operable program or batch file. GSMArenaDataset directory already exists Traceback (most recent call last): File "gsmarena_scraping.py", line 134, in obj.save_specification_to_file() File "gsmarena_scraping.py", line 107, in save_specification_to_file files_list = self.check_file_exists() File "gsmarena_scraping.py", line 102, in check_file_exists return os.listdir(self.absolute_path) FileNotFoundError: [WinError 3] The system cannot find the path specified: '/GSMArenaDataset'

i tried the history version of the gsmarena_scraping.py still cannot run the code ,can you helme to solve the problem? i am new in the python. thanks.

Use 'cd' instead of pwd for windows