RequestLibrary module not found - robotframework

I need to use the RequestsLibrary library and when I import it:
*** Settings ***
Library SeleniumLibrary
Library RequestsLibrary
I get an error module not found. When I run pipenv graph I can clearly see it's installed:
(marek) bash-3.2$ pipenv graph
robotframework-requests==0.5.0
- requests [required: Any, installed: 2.22.0]
- certifi [required: >=2017.4.17, installed: 2019.6.16]
- chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
- idna [required: >=2.5,<2.9, installed: 2.8]
- urllib3 [required: >=1.21.1,<1.26,!=1.25.1,!=1.25.0, installed: 1.25.3]
- robotframework [required: Any, installed: 3.1.2]
What am I doing wrong ?

As turned out the issue was the fact that I installed the library using pipenv install xyz and that creates brand new virtual environment prior to library installation. So I basically ended up with a virtual environment within virtual environment and Robot couldn't access it. As soon as I got rid off the extra virtual environment, exited out and ran pipenv install robotframework-requests outside of any venv, it ran.

Related

Why does cirlceCI does not build successfully when renv is part of a R package?

Im trying to set up a CI for a R package. In that regard I`m considering circleCI, which has worked out with previous R projects. However this time, I get the following error:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
devtools::install_deps(dependencies = TRUE)
Error in loadNamespace(x) : there is no package called ‘devtools’
Calls: loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Execution halted
My .circleci/config.yml looks similar to that one
version: 2
jobs:
build:
docker:
- image: my_random_image
steps:
- checkout
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
- run:
name: Build package
command: R CMD build .
- run:
name: Check package
command: R CMD check *tar.gz
and my_random_image looks as follows:
FROM r-base:4.1.2
RUN apt-get update \
&& apt-get install git libssl-dev ssh texlive-latex-base texlive-fonts-recommended
libcurl4-openssl-dev libxml2-dev -y \
&& rm -rf /var/lib/apt/lists/*
RUN R -e "install.packages(c('devtools', 'roxygen2'), repos='http://cran.us.r- project.org')"
So its pretty standard stuff, as far as I can see. The error only occurs if renv is part if my R package. Otherwise circleCI does not complain and runs as expected without any errors.
I would like to keep renv in my R project and therefore struggle to understand the issue and the solution to that.
appreciate any help!!
The issue here is most likely that your run stage, here:
- run:
name: Install package dependencies
command: R -e "devtools::install_deps(dep = TRUE)"
installs packages into the default user / site libraries, but when R is launched in your project's working directory:
Downloading renv 0.14.0 ... OK (downloaded source)
Installing renv 0.14.0 ... Done!
Successfully installed and loaded renv 0.14.0.
Project '~/main' loaded. [renv 0.14.0]
the renv autoloader is automatically downloading renv, and activating the renv project library.
By default, renv isolates projects from the user / site library, so the packages installed in your earlier steps are not visible within the project. This behavior is intentional, and ensures that different project libraries are isolated both from changes in the user / site libraries, as well as in other project libraries.
One of the following should help:
If your renv.lock is up to date, call renv::restore() before trying to use devtools or other packages;
Allow renv to see the user library, with e.g. the environment variable RENV_CONFIG_USER_LIBRARY = TRUE.
I'd recommend reading https://rstudio.github.io/renv/articles/renv.html and https://rstudio.github.io/renv/articles/ci.html if you haven't already.

ERROR: flask 1.1.2 has requirement Werkzeug>=0.15

I am trying to install Airflow on Ubuntu 18.04 by running the following command:
pip install apache-airflow
And I get the following error:
OpenID Flask-JWT-Extended sqlalchemy-utils
ERROR: flask 1.1.2 has requirement Werkzeug>=0.15, but you'll have werkzeug 0.14.1 which is incompatible.
How can I resolve this error and install Airflow?
Judging by the error, you are probably having a version conflict for one of the Airflow's dependencies: Flask requires Werkzeug module with a version >=0.15, but you have version 0.14.1 installed.
To avoid the problem, you can install Airflow into a Python virtual environment. For example, using pipenv.
Install pipenv into your user's install directory:
pip3 install --user pipenv
export PATH=$PATH:~/.local/bin/
Install Airflow into a Python virtual environment:
mkdir my_airflow
cd my_airflow
pipenv install apache-airflow
Activate the virtual environment:
pipenv shell
Initialize the Airflow's database:
airflow initdb
At this point you should have a working Airflow installation. Notice, it is not a production ready installation, but it is enough to continue with the tutorial.

pipenv and Atom packages

I'm trying to download few Python packages for Atom with pipenv but Atom can't "see it". The pop-ups says it's not installed:
flake8==3.7.8
- entrypoints [required: >=0.3.0,<0.4.0, installed: 0.3]
- mccabe [required: >=0.6.0,<0.7.0, installed: 0.6.1]
- pycodestyle [required: >=2.5.0,<2.6.0, installed: 2.5.0]
- pyflakes [required: >=2.1.0,<2.2.0, installed: 2.1.1]
autopep8==1.4.4
- pycodestyle [required: >=2.4.0, installed: 2.5.0]
Clearly it is installed. What can I do ? Before you ask, I did restart the editor.
install one of Terminal packages for Atom, run it and then :
cd "the_path_to_the_directory"
pipenv shell python3(or python depending on your OS) name_of_your_script.py

install salt-minion throw Error: Package: salt-2018.3.3-1.el7.noarch (salt-latest) Requires: python-psutil

I have installed python-psutil with pip and can use it in python.
but still install failed.
Salt requires some python modules to be installed before installing Salt. So just try after installing the given python dependency module into your machine.
Command : pip install psutil
Reference - https://pypi.org/project/psutil/

Installation failed trying to install MySQL ODBC connector on macOS High Sierra

I'm trying to install this mysql odbc connector on my macOS High Sierra machine, but I get this error:
I tried installing it using installer in the hopes of getting information about what went wrong:
➜ ~ sudo installer -pkg Desktop/mysql-connector-odbc-5.3.9-macos10.12-x86-64bit.pkg -target / -verbose
installer: Package name is MySQL Connector/Odbc 5.3.9
installer: Installing at base path /
installer: Preparing for installation….....
installer: Preparing the disk….....
installer: Preparing MySQL Connector/Odbc 5.3.9….....
installer: Waiting for other installations to complete….....
installer: Configuring the installation….....
installer:
#
installer: Validating packages….....
#
installer: The install failed (The Installer encountered an error that caused the installation to fail. Contact the software manufacturer for assistance.)
But that doesn't help. Do you have any tips on how I can debug this and get the connector installed? Thanks.
I just noticed this:
on this page: https://dev.mysql.com/doc/connector-odbc/en/connector-odbc-installation-binary-osx.html
After installing iODBC (http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/Downloads) it was able to install the connector.
I know I'm reviving an old thread, but having just had this exact problem/issue, and not solving with the iodbc installation, I thought I'd post the solution that worked for me. Use the commmand line... open terminal and run...
pip install mysql-connector-python
or
pip install mysql-connector
For those on an Apple Silicone Mac, this might be caused by having the wrong version of iODBC installed. Make sure to install the one labeled arm64 from iODBS website

Resources