Closed marcovoliveira closed 4 years ago
Yep same problem here, currently working on a fix.
It is a bug in webdriverdownloader.py here Looks like mozilla changed format returned by - https://api.github.com/repos/mozilla/geckodriver/releases/latest and now filename list length is 2 not 1
Until that gets merged you can fix it yourself by editing the Dockerfile and adding this at the end of the RUN command:
# Disabling geckodriver log file
&& sed -i "s#browser = webdriver.Firefox(#browser = webdriver.Firefox(service_log_path=os.devnull,#g" /usr/local/lib/python3.7/site-packages/instapy/browser.py \
&& sed -i "320s#bitness in name]#bitness in name and name[-3:] != 'asc' ]#g" /usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py
``
Dont forget to append the extra \ on the - currently - last line before adding the new line
Until that gets merged you can fix it yourself by editing the Dockerfile and adding this at the end of the RUN command:
# Disabling geckodriver log file && sed -i "s#browser = webdriver.Firefox(#browser = webdriver.Firefox(service_log_path=os.devnull,#g" /usr/local/lib/python3.7/site-packages/instapy/browser.py \ && sed -i "320s#bitness in name]#bitness in name and name[-3:] != 'asc' ]#g" /usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py `` Dont forget to append the extra \ on the - currently - last line before adding the new line
Even when you change docker-compose/docker-compose.yml
:
version: '3'
services:
web:
build: ../
image: instapy
container_name: "${COMPOSE_PROJECT_NAME}_web"
env_file: .env
environment:
- PYTHONUNBUFFERED=0
- INSTAPY_WORKSPACE=/code/InstaPy
volumes:
- ./:/code
The result is still:
web_1 | InstaPy Version: 0.6.10
web_1 | ._. ._. ._. ._. ._. ._. ._.
web_1 | Workspace in use: "/code/InstaPy"
web_1 | Traceback (most recent call last):
web_1 | File "docker_quickstart.py", line 35, in <module>
web_1 | headless_browser=True)
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 323, in __init__
web_1 | self.logger,
web_1 | File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 124, in set_selenium_local_session
web_1 | options=firefox_options,
web_1 | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in __init__
web_1 | keep_alive=True)
web_1 | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
web_1 | self.start_session(capabilities, browser_profile)
web_1 | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
web_1 | response = self.execute(Command.NEW_SESSION, parameters)
web_1 | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
web_1 | self.error_handler.check_response(response)
web_1 | File "/usr/local/lib/python3.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
web_1 | raise exception_class(message, screen, stacktrace)
web_1 | selenium.common.exceptions.SessionNotCreatedException: Message: Unable to find a matching set of capabilities
web_1 |
instapy_web exited with code 1
Oh yeah, thats a different beast ... ;) Im already after that, and trying to fix the next error ... something seems to be really broken now with firefox.
I also put up an MR with this patch, but please ignore it until i further investigate this
Finally, i think i fixed it and the bot is now running.
The root of the problem was the ancient firefox version in the debian repositories ( it was 68 i think while the newest is 79 )
Geckodriver 0.27 was released 3 days ago and it wasnt compatible with this verison of firefox, solved it by installing manually the newest version of firefox in the container.
Theese are the commands that i ran to solve it:
apt-get update && apt-get install curl bzip2
curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt
rm /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/
I will try to implement theese changes to the Dockerfile itself so it doesnt install the redundant old version, and need to clean up a few things, i will extend my MR soon.
Finally, i think i fixed it and the bot is now running.
The root of the problem was the ancient firefox version in the debian repositories ( it was 68 i think while the newest is 79 )
Geckodriver 0.27 was released 3 days ago and it wasnt compatible with this verison of firefox, solved it by installing manually the newest version of firefox in the container.
Theese are the commands that i ran to solve it:
apt-get update && apt-get install curl bzip2 curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt rm /usr/bin/firefox ln -s /opt/firefox/firefox /usr/bin/
I will try to implement theese changes to the Dockerfile itself so it doesnt install the redundant old version, and need to clean up a few things, i will extend my MR soon.
May i suggest using wget instead of curl, because wget is already installed by the Dockerfile
yeah, i just noticed that too while i was editing the dockerfile ;)
Running tests now, will commit soon and update PR
Fixed, PR updated, see https://github.com/InstaPy/instapy-docker/pull/75
My bot is up and running, can u also please test and tell me if there are any more remaining issues ?
Fixed, PR updated, see #75
My bot is up and running, can u also please test and tell me if there are any more remaining issues ?
I will rebuild my bot right now to check if there are any issues.
Fixed, PR updated, see #75 My bot is up and running, can u also please test and tell me if there are any more remaining issues ?
I will rebuild my bot right now to check if there are any issues.
Seems to work fine on debian 10, works fine on centos to!
im on arch, here it is working too
my pi is running debian 10 too
Hello guys. I'm new to docker and programming. I still having the error:
"RuntimeError: Error, unable to determine correct filename for 64bit linux"
I tried to change the dockerfile as suggested and deploy the container again. I'm running Openmediavault 5 (Debian)...
Should I do something else? thanks
Error, unable to determine correct filename for 64bit linux,
InstaPy Version: 0.6.10,
.. .. .. .. .. .. ._. ,
Workspace in use: "/code/InstaPy",
Traceback (most recent call last):,
File "docker_quickstart.py", line 6, in
Hey Guys, I'm new here... I'm trying to run in my Mac inside an ubuntu container and I'm getting the same issue, even running the "fix" bellow:
apt-get update && apt-get install curl bzip2
curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt
rm /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/
Here is my procedure:
version: "3"
services:
pythonenv:
image: ubuntu:latest
command: /bin/bash
working_dir: /app
volumes:
- .:/app
Cloned Quickstart from: https://github.com/InstaPy/instapy-quickstart.git
Run the install script at: instapy-quickstart/installation/Linux/install.sh
Run the fix:
apt-get update && apt-get install curl bzip2
curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt
rm /usr/bin/firefox
ln -s /opt/firefox/firefox /usr/bin/
Run my: python3 quick.py
Get this error:
File "quick.py", line 22, in <module>
session = InstaPy(username=insta_username,
File "/usr/local/lib/python3.8/dist-packages/instapy/instapy.py", line 312, in __init__
self.browser, err_msg = set_selenium_local_session(
File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 120, in set_selenium_local_session
driver_path = geckodriver_path or get_geckodriver()
File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 36, in get_geckodriver
sym_path = gdd.download_and_install()[1]
File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 174, in download_and_install
filename_with_path = self.download(version,
File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download
download_url = self.get_download_url(version, os_name=os_name, bitness=bitness)
File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url
raise RuntimeError(info_message)
RuntimeError: Error, unable to determine correct filename for 64bit linux
Thanks you in advance @bayi
Hey Guys, I'm new here... I'm trying to run in my Mac inside an ubuntu container and I'm getting the same issue, even running the "fix" bellow:
apt-get update && apt-get install curl bzip2 curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt rm /usr/bin/firefox ln -s /opt/firefox/firefox /usr/bin/
Here is my procedure:
- Run my docker compose that is using ubuntu image:
version: "3" services: pythonenv: image: ubuntu:latest command: /bin/bash working_dir: /app volumes: - .:/app
- Cloned Quickstart from: https://github.com/InstaPy/instapy-quickstart.git
- Run the install script at: instapy-quickstart/installation/Linux/install.sh
- Run the fix:
apt-get update && apt-get install curl bzip2 curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt rm /usr/bin/firefox ln -s /opt/firefox/firefox /usr/bin/
- Run my: python3 quick.py
- Get this error:
File "quick.py", line 22, in <module> session = InstaPy(username=insta_username, File "/usr/local/lib/python3.8/dist-packages/instapy/instapy.py", line 312, in __init__ self.browser, err_msg = set_selenium_local_session( File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 120, in set_selenium_local_session driver_path = geckodriver_path or get_geckodriver() File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 36, in get_geckodriver sym_path = gdd.download_and_install()[1] File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 174, in download_and_install filename_with_path = self.download(version, File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download download_url = self.get_download_url(version, os_name=os_name, bitness=bitness) File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url raise RuntimeError(info_message) RuntimeError: Error, unable to determine correct filename for 64bit linux
Thanks you in advance @bayi
Hello guys. I'm new to docker and programming. I still having the error:
"RuntimeError: Error, unable to determine correct filename for 64bit linux"
I tried to change the dockerfile as suggested and deploy the container again. I'm running Openmediavault 5 (Debian)...
Should I do something else? thanks
Error, unable to determine correct filename for 64bit linux, InstaPy Version: 0.6.10, .. .. .. .. .. .. ._. , Workspace in use: "/code/InstaPy", Traceback (most recent call last):, File "docker_quickstart.py", line 6, in , session = InstaPy(username='xxxxx', password='xxxx', headless_browser=True), File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 323, in init, self.logger,, File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 120, in set_selenium_local_session, driver_path = geckodriver_path or get_geckodriver(), File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 36, in get_geckodriver, sym_path = gdd.download_and_install()[1], File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 177, in download_and_install, show_progress_bar=show_progress_bar), File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download, download_url = self.get_download_url(version, os_name=os_name, bitness=bitness), File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url, raise RuntimeError(info_message), RuntimeError: Error, unable to determine correct filename for 64bit linux,
The solution
The current steps to make this repository work again are:
Clone this repository:
git clone https://github.com/InstaPy/instapy-docker.git
Go into the folder:
cd instapy-docker/
Get the correct Dockerfile:
rm -rf Dockerfile
wget https://raw.githubusercontent.com/InstaPy/instapy-docker/54e2d949aa1f43f556774a3f55d0f8c57f4329da/Dockerfile
Get the latest xpath_compile.py, to make liking work again:
rm -rf xpath_compile.py
wget https://raw.githubusercontent.com/timgrossmann/InstaPy/master/instapy/xpath_compile.py
Change the contents of file docker-compose/docker-compose.yml
to:
version: '3'
services:
web:
build: ../
image: instapy
container_name: "${COMPOSE_PROJECT_NAME}_web"
env_file: .env
environment:
- PYTHONUNBUFFERED=0
- INSTAPY_WORKSPACE=/code/InstaPy
volumes:
- ./:/code
Then run:
docker-compose up --build
And everything should work again.
The problem
The problem here is there are 2 pull requests ready to fix theses issues but not yet merged: https://github.com/InstaPy/instapy-docker/pull/76 https://github.com/InstaPy/instapy-docker/pull/75
@brammittendorff you save my life!! Thanks!!!!!
@brammittendorff how to run docker-compose up --build?
@brammittendorff how to run docker-compose up --build?
I think this issue is already fixed so no need to do this anymore, but when you need to you can run it by executing the following commands in the root of the directory where you cloned this repository:
cd docker-compose/
docker-compose up --build
Hey Guys, I'm new here... I'm trying to run in my Mac inside an ubuntu container and I'm getting the same issue, even running the "fix" bellow:
apt-get update && apt-get install curl bzip2 curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt rm /usr/bin/firefox ln -s /opt/firefox/firefox /usr/bin/
Here is my procedure:
- Run my docker compose that is using ubuntu image:
version: "3" services: pythonenv: image: ubuntu:latest command: /bin/bash working_dir: /app volumes: - .:/app
- Cloned Quickstart from: https://github.com/InstaPy/instapy-quickstart.git
- Run the install script at: instapy-quickstart/installation/Linux/install.sh
- Run the fix:
apt-get update && apt-get install curl bzip2 curl -sL "https://download.mozilla.org/?product=firefox-latest-ssl&os=linux64" | tar -xj -C /opt rm /usr/bin/firefox ln -s /opt/firefox/firefox /usr/bin/
- Run my: python3 quick.py
- Get this error:
File "quick.py", line 22, in <module> session = InstaPy(username=insta_username, File "/usr/local/lib/python3.8/dist-packages/instapy/instapy.py", line 312, in __init__ self.browser, err_msg = set_selenium_local_session( File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 120, in set_selenium_local_session driver_path = geckodriver_path or get_geckodriver() File "/usr/local/lib/python3.8/dist-packages/instapy/browser.py", line 36, in get_geckodriver sym_path = gdd.download_and_install()[1] File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 174, in download_and_install filename_with_path = self.download(version, File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download download_url = self.get_download_url(version, os_name=os_name, bitness=bitness) File "/usr/local/lib/python3.8/dist-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url raise RuntimeError(info_message) RuntimeError: Error, unable to determine correct filename for 64bit linux
Thanks you in advance @bayi
Hello guys. I'm new to docker and programming. I still having the error: "RuntimeError: Error, unable to determine correct filename for 64bit linux" I tried to change the dockerfile as suggested and deploy the container again. I'm running Openmediavault 5 (Debian)... Should I do something else? thanks Error, unable to determine correct filename for 64bit linux, InstaPy Version: 0.6.10, .. .. .. .. .. .. ._. , Workspace in use: "/code/InstaPy", Traceback (most recent call last):, File "docker_quickstart.py", line 6, in , session = InstaPy(username='xxxxx', password='xxxx', headless_browser=True), File "/usr/local/lib/python3.7/site-packages/instapy/instapy.py", line 323, in init, self.logger,, File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 120, in set_selenium_local_session, driver_path = geckodriver_path or get_geckodriver(), File "/usr/local/lib/python3.7/site-packages/instapy/browser.py", line 36, in get_geckodriver, sym_path = gdd.download_and_install()[1], File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 177, in download_and_install, show_progress_bar=show_progress_bar), File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 129, in download, download_url = self.get_download_url(version, os_name=os_name, bitness=bitness), File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url, raise RuntimeError(info_message), RuntimeError: Error, unable to determine correct filename for 64bit linux,
The solution
The current steps to make this repository work again are:
Clone this repository:
git clone https://github.com/InstaPy/instapy-docker.git
Go into the folder:
cd instapy-docker/
Get the correct Dockerfile:
rm -rf Dockerfile wget https://raw.githubusercontent.com/InstaPy/instapy-docker/54e2d949aa1f43f556774a3f55d0f8c57f4329da/Dockerfile
Get the latest xpath_compile.py, to make liking work again:
rm -rf xpath_compile.py wget https://raw.githubusercontent.com/timgrossmann/InstaPy/master/instapy/xpath_compile.py
Change the contents of file
docker-compose/docker-compose.yml
to:version: '3' services: web: build: ../ image: instapy container_name: "${COMPOSE_PROJECT_NAME}_web" env_file: .env environment: - PYTHONUNBUFFERED=0 - INSTAPY_WORKSPACE=/code/InstaPy volumes: - ./:/code
Then run:
docker-compose up --build
And everything should work again.
The problem
The problem here is there are 2 pull requests ready to fix theses issues but not yet merged: #76 #75
Hello, I am using windows ,this {rm -rf Dockerfile wget https://raw.githubusercontent.com/InstaPy/instapy-docker/54e2d949aa1f43f556774a3f55d0f8c57f4329da/Dockerfile} does not work for me, how can i fix my problem?
@brammittendorff I am deploying my Instapy app to Heroku but it gives this error:
RuntimeError: Error, unable to determine correct filename for 64bit linux,
@brammittendorff I am deploying my Instapy app to Heroku but it gives this error:
RuntimeError: Error, unable to determine correct filename for 64bit linux,
Hi There Robin, there could be anything wrong with this error. But this project is not maintained for over 1 year now. So I suggest writing something yourself in Selenium / Docker or running it in python on Heroku. https://github.com/InstaPy/InstaPy
when docker-compose up
File "/usr/local/lib/python3.7/site-packages/webdriverdownloader/webdriverdownloader.py", line 324, in get_download_url web_1 | raise RuntimeError(info_message) web_1 | RuntimeError: Error, unable to determine correct filename for 64bit linux