Wont choose between dependencies: pip=22.1.2 vs. pip=20.1

Hi!

I just created a new bot using the standard template in robocorp lab and I’m getting the “Failed to update the Lab environment: Please check the configuration files robot.yaml and conda yaml” error.
If I check the error details then everything else is OK but “Wont choose between dependencies: pip=22.1.2 vs. pip=20.1”
conda.yaml is as set on template, nothing configured:

channels:
  # Define conda channels here.
  - conda-forge

dependencies:
  # Define conda packages here.
  # If available, always prefer the conda version of a package.
  # Installation will be faster and more efficient.
  # https://anaconda.org/search
  - python=3.9.13

  - pip=22.1.2
  - pip:
      # Define pip packages here.
      # https://pypi.org/
      - rpaframework==15.6.0 # https://rpaframework.org/releasenotes.html

and robot.yaml also as set by template

tasks:
  Run all tasks:
    shell: python -m robot --report NONE --outputdir output --logtitle "Task log" tasks.robot

condaConfigFile: conda.yaml
artifactsDir: output
PATH:
  - .
PYTHONPATH:
  - .
ignoreFiles:
  - .gitignore

Hi,

This is because we have to update the templates to newer versions of Python and Pip as libraries are starting not to release updates to older versions.
One of the reasons we have deprecated the Robocorp Lab product is the fact that it is so tightly bound to these versions and these types of updates are a lot of work to manage.

I would highly recommend switching to our VS Code extensions or Automation Studio. If you have been developing bots in Lab for longer, the VS Code is probably for you as we have a lot of new features there, and it is not that big of a difference.
The Automation Studio is under heavy development and is getting new features all the time but cannot yet handle the more complex bot implementations.

To keep working with Lab, you would need to edit the conda.yaml of the new robot via text editor and drop the versions to the ones that match Lab’s internals (but this will start hitting problems sooner or later as the Python community is moving forward):

channels:
  - conda-forge

dependencies:
  - python=3.7.5
  - pip=20.1
  - pip:
      - rpaframework==15.6.0

BR, Kari

1 Like

Thank you for your reply. I am actually using VS code, but every now and then I need to visualise the tables and then I’m using the Lab for development.

Great,

The “sometimes need to visualize tables”, seems to me like a good feature thing that we can look into getting to other tools as well. These feedbacks are great to pick out as we can get blind to the implementations, so thanks for these.

BR, Kari

1 Like

I’ve butchered @mika example from Slack and have used it couple times.

from prettytable import PrettyTable
from robot.libraries.BuiltIn import BuiltIn
​
def print_table_to_console(
    table_to_print, columns: int = None, rows: int = None):
    """Print table content to console
    :param columns: maximum columns to print
    :param rows: maximum rows to print
    Example.
    .. code-block:: robotframework
        ${sheet}=  Print Table To Console
        ...  columns=3
        ...  rows=10
    """
    rpa_table = table_to_print
    pt = PrettyTable()
    pt.field_names = rpa_table.columns[:columns] if columns else rpa_table.columns
    for index, row in enumerate(rpa_table):
        if rows and (index + 1) > rows:
            break
        values = list(row.values())
        values = values[:columns] if columns else values
        pt.add_row(values)
    BuiltIn().log_to_console(f"\n{pt}")
1 Like