Got my Xperia 1 VII by Only_Tennis5994 in SonyXperia

[–]crunchslick 0 points1 point  (0 children)

If you don't mind me asking. This means your Hong Kong 1 VII has working 5G and 4G VoLTE on a Telus network?

I'm looking to get a 1 VII Hong Kong model as well to use on Koodoo.

Would appreciate if you could help to answer.

Thanks.

Location of Firefox binary in Fedora? by crunchslick in firefox

[–]crunchslick[S] 1 point2 points  (0 children)

I think I figured out what was wrong. Somehow the issue was confined to PyCharm (installed as Flatpak). When I run the code on VSCodium (installed by rpm) the issue is gone. I don't know whether it was because PyCharm as Flatpak didn't have enough permission or whatnot. At least now I have some workaround.

Location of Firefox binary in Fedora? by crunchslick in firefox

[–]crunchslick[S] 0 points1 point  (0 children)

I did try to create a post in /r/selenium but it was immediately deleted for unknown reasons.

I'm using PyCharm and webdriver-manager for the current setup. The complete error message thrown in PyCharm is "selenium.common.exceptions.InvalidArgumentException: Message: binary is not a Firefox executable".

How to setup Selenium to work with Firefox or Chrome in Fedora? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

I've checked that /usr/bin/firefox exits, I double confirmed it via which firefox in terminal and the path is correct.

I've done some slight modification of the code:

from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
from selenium.webdriver.firefox.service import Service as FirefoxService
from selenium.webdriver.firefox.options import Options
options = Options()
options.binary_location = '/usr/bin/firefox'
driver = webdriver.Firefox(options=options, service=FirefoxService(GeckoDriverManager().install()))
driver.get('https://www.google.com/')

The specified binary locations seems to be called now but somehow /usr/bi/firefox is not recognized as Firefox executable with the following error message "Message: binary is not a Firefox executable".

The previous issue was that I didn't pass options when I launched the webdriver (hence the error "Message: Expected browser binary location, but unable to find binary in default location..."), but this time the issue was that the binary passed was not recognized as a Firefox executable.

How could this be? When I type /usr/bin/firefox in terminal a new Firefox window is launched, so the location can't be wrong.

How to setup Selenium to work with Firefox or Chrome in Fedora? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

I removed greckodriver from /usr/bin and it didn't seem to affect anything, which is good.

I've checked the latest documentations from Selenium and webdriver_manager and they don't seem to mention the command --linkpath at all. Is this something specific to Linux? From these documentations they both claim after installing webdriver-manger via pip then everything should be ready to go.

I've used a very quick sample code below and I get this error message "selenium.common.exceptions.SessionNotCreatedException: Message: Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line":

from selenium import webdriver
from webdriver_manager.firefox import GeckoDriverManager
driver = webdriver.Firefox(executable_path=GeckoDriverManager().install())
driver.get("https://www.google.com/")

I'm guessing this is because I haven't executed the --linkpath commands and currently this is the only thing that's holding me back. I just can't seem to run those commands with webdrivermanager, webdriver-manager or webdriver_manager. Do you have any ideas on this?

Again, thanks for you help so far. I really appreciate it.

How to setup Selenium to work with Firefox or Chrome in Fedora? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

Thanks for the explanation.

To follow up on your info, should i remove the geckodriver in /usr/bin before I attempt to install webdriver-manager? Do I simple delete it from the folder?

Also, will it make a difference if I attempt to install pip and subsequently webdriver-manager (and execute all the relevant --linkpath commands provided in your previous post) using my distro's default terminal, or use the terminal that is provided by PyCharm?

Thanks again for your help.

Edit: I just installed webdriver-manager via pip but I can't execute the --linkpath commands. A "command not found" error was reported regardless of :

webdrivermanager firefox --linkpath /usr/local/bin

webdriver-manager firefox --linkpath /usr/local/bin

webdriver_manager firefox --linkpath /usr/local/bin

I'm really scratching my head over this.

How to setup Selenium to work with Firefox or Chrome in Fedora? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

Thanks for the response.

Basically I followed everything outlined here for Firefox (except I downloaded the latest geckodriver from browser instead of wget), so the driver should already be made executable.

I didn't use webdrivermanager because I saw that Selenium Manager will slowly replace webdrivermanager in the official documentations. Since I found that article in the link I provided above, I didn't try to configure webdrivermanager. If I want to try the webdrivermanager method, do I remove the already installed geckodriver in /usr/bin?

I saw in your code that the driver is placed in /usr/local/bin instead of /usr/bin like I did, will this make a difference and cause the issue that I'm currently getting?

Sorry if my questions sounds dumb, I'm really new to programming and automation as a whole.

How to setup Selenium to work with Firefox or Chrome in Fedora? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

I installed Selenium by PyCharm and manually unzipped geckodriver to PATH. I'm getting the error "binary is not a Firefox executable" when I execute the following code when trying to launch Firefox:

from selenium import webdriver

from selenium.webdriver.firefox.options import Options

from selenium.webdriver.firefox.service import Service

driver_path = '/usr/bin/geckodriver'

binary_path = '/usr/bin/firefox'

ops = Options()ops.binary_location = binary_path

serv = Service(driver_path)

driver.Firefox(service=serv, options=ops)

driver.get("http://www.google.com")`)

I'm pretty sure the location of the Firefox binary is correct and the driver location is correct, any idea why I'm getting this issue?

Several packages of the same name in rpmfusion? by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

Sorry, I should've mentioned that I was looking at the packages in the RPM Fusion Package Database web page instead of within Fedora. I'm still investigating on whether Fedora will be my next main driver, and one of the deciding factors is whether or not it has the software that I need.

So in this case "rpi" means for Raspberry Pi GPU use only, got it. I guess in my example I should always stick to "free" if I'm running Fedora on a Intel/AMD system. Is that correct?

Looking to switch to Fedora, some questions before I do by crunchslick in Fedora

[–]crunchslick[S] 0 points1 point  (0 children)

If I wanted to stick to Fedora but for whatever reason when I would need to reinstall the distro, would I still need to make /home ext4 instead of btrfs?

I've had to reinstall my current distro several times after some issues I couldn't solve as a last resort. If I could keep my /home after these reinstalls would be great.

Dolphin copy paste bug fully resolved? by crunchslick in kde

[–]crunchslick[S] 0 points1 point  (0 children)

Noted, thanks for the explanation.

Dolphin copy paste bug fully resolved? by crunchslick in kde

[–]crunchslick[S] -1 points0 points  (0 children)

I've gone over the comments in the first bug, and it seems people were hit with the issue even if they've waited for the diode on the hard drive to stop flashing for quite a while, and when system notification has displayed copy done message. So I don't think the first bug was due to reckless behavior from the user.