anilabhadatta / educative.io_scraper

Educative.io Course Downloader developed using Python and Selenium. Refer Readme.md for setup instructions.
MIT License
170 stars 57 forks source link

Unable to run in Macos Apple silicon #76

Open sushantgupta opened 11 months ago

sushantgupta commented 11 months ago

I am not able to run this code in mac Apple silicon. do you have cli option to start the scrapper.

(venv) ➜  educative.io_scraper git:(v3-master) python3 EducativeScraper.py

                Educative Scraper (v3.2.8 Master Branch), developed by Anilabha Datta
                Project Link: https://github.com/anilabhadatta/educative.io_scraper/tree/v3-dev
                Check out ReadMe for more information about this project.
                Use the GUI to start scraping.

DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning.
Traceback (most recent call last):
  File "/Users/aaa/workspace/tmp/educative.io_scraper/EducativeScraper.py", line 37, in <module>
    app.run()
  File "/Users/aaa/workspace/tmp/educative.io_scraper/EducativeScraper.py", line 32, in run
    HomeScreen().createHomeScreen(self.version)
  File "/Users/aaa/workspace/tmp/educative.io_scraper/src/UI/HomeScreenGUI.py", line 33, in __init__
    self.app.iconphoto(True, tk.PhotoImage(file=os.path.join(constants.commonFolderPath, "icon.png")))
  File "/Users/aaa/.pyenv/versions/3.9.18/lib/python3.9/tkinter/__init__.py", line 4064, in __init__
    Image.__init__(self, 'photo', name, cnf, master, **kw)
  File "/Users/aaa/.pyenv/versions/3.9.18/lib/python3.9/tkinter/__init__.py", line 4009, in __init__
    self.tk.call(('image', 'create', imgtype, name,) + options)
_tkinter.TclError: couldn't recognize data in image file "/Users/aaa/workspace/tmp/educative.io_scraper/src/Common/icon.png"
(venv) ➜  educative.io_scraper git:(v3-master) 
anilabhadatta commented 11 months ago

@sushantgupta try installing tkinter from terminal brew install python-tk else: comment line 33 in HomeScreenGui.py

anilabhadatta commented 9 months ago

@sushantgupta any update on this?

donadoio commented 9 months ago

@anilabhadatta I had the same issue and it worked, I just had to run install again before running.

anilabhadatta commented 9 months ago

@donadoio i guess the manual steps is better recommended for linux/MacOS env Seems like some dependencies like tkinter and few more are required to be installed separately.

anilabhadatta commented 9 months ago

@donadoio can you test again, latest pull and clean install again.

donadoio commented 9 months ago

@anilabhadatta the installation is succesfull and I'm able to run the Educative Scraper however when I click on Login Account I get this error

 2024-03-05 16:11:14,303 - INFO - LoginAccount - LoginAccount initiated...
                            Login your account in the browser...
                            To Terminate, Click on Logout Button

 2024-03-05 16:11:14,303 - INFO - BrowserUtility - Loading Browser...
 2024-03-05 16:11:14,323 - ERROR - LoginAccount - start: 27: BrowserUtility:loadBrowser: 35: Message: Service /Users/isaacdonado/educative.io_scraper/src/ChromeDrivers/mac/chromedriver-mac-arm64/ucchromedriver unexpectedly exited. Status code was: -9

 2024-03-05 16:11:14,324 - ERROR - BrowserUtility - No Browser was open to close via websocket
 2024-03-05 16:11:14,324 - INFO - BrowserUtility - An error occurred while deleting lock files: [Errno 2] No such file or directory: '/Users/isaacdonado/EducativeScraper/UserData42/ucDriver-True'
anilabhadatta commented 9 months ago

@donadoio disable the ucdriver settings and try again. Also do git pull first. ucdriver is not supported in Mac Arm based chips. Can you confirm if you are using m1 based mac ?

donadoio commented 6 months ago

@anilabhadatta I was using m3 based mac.

anilabhadatta commented 6 months ago

@donadoio use latest pull. Selenium base is integrated so shouldn't cause issues