This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I came from an accounting background and haven't written HTML since myspace first came out. 20 years later I haven't done much coding.
I downloaded geckodriver and tried to use sublime text to run the python code. I got these errors for both methods. Would it be helpful Re-run the code in pyCharm if that would help. I do know what you mean by Python tool alone (interactive mode)? Can I run that?
Can you please run the worklfow in Alteryx. And once done, click on the PYTHON CODE tool icon which is part of that worklfow, and on the left part of the screen scroll in the code until you find the errror message. Please if you can share that it would be great.
Adjust the path to the driver in the webdriver portion above to your chromium driver
Change the URL you want to scrape in the code above
To be able to scrape the dynamically generated websites (takes some time to fully load) you need to specify an ID of a html tag to wait for. Here "SIP_OV_ClosingPrice" is used. You need to change this to match your use case.
I'm trying to install Selenium via Alteryx Python tool using below code. However it gives the error. It seems like a permission issue. I'm not sure if I need to raise a request to install Selenium at the specified path in Alteryx folder (c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages). Can you please advise on this.
# List all non-standard packages to be imported by your # script here (only missing packages will be installed) from ayx import Package Package.installPackages(['Selenium'])
Collecting Selenium Using cached https://files.pythonhosted.org/packages/80/d6/4294f0b4bce4de0abf13e17190289f9d0613b0a44e5dd6a7f5ca98... Requirement already satisfied: urllib3 in c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages (from Selenium) (1.25.2) Installing collected packages: Selenium ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Access is denied: 'c:\\program files\\alteryx\\bin\\miniconda3\\envs\\jupytertool_venv\\Lib\\site-packages\\selenium' Consider using the `--user` option or check the permissions. --------------------------------------------------------------------------- CalledProcessError Traceback (most recent call last) <ipython-input-5-57531c9622dd> in <module> 2 # script here (only missing packages will be installed) 3 from ayx import Package ----> 4 Package.installPackages(['Selenium'])
c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\ayx\Package.py in installPackages(package, install_type, debug) 200 print(pip_install_result["msg"]) 201 if not pip_install_result["success"]: --> 202 raise pip_install_result["err"]
c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\site-packages\ayx\Utils.py in runSubprocess(args_list, debug) 118 119 try: --> 120 result = subprocess.check_output(args_list, stderr=subprocess.STDOUT) 121 if debug: 122 print("[Subprocess success!]")
I have already established a connection with the website from where I need to download the data using the chromedriver and packaged like selenium. When I am running the code it is opening up a window in which there are multiple steps taking place to download an excel file but that is happening currently on my desktop. My main goal is to download the excel file in Alteryx so that i could use the same as input in my Alteryx workflow.
Any help here would be much appreciated.
Gist - My code is running perfectly fine in Jupyter in downloading the excel file from a website but the same code in Python tool in Alteryx is downloading the same excel file but on desktop rather i want that file to be considered as input to Alteryx.