In Certification 1 (VS Code), when trying to use the keyword Html To Pdf with the tutorial code on my own machine (Win10), I get the following error right after the log INFO Writing output to file (path):
TypeError: cannot pickle 'dict_keys' object
The same robot worked on the Control room, so there is probably an issue with the library on Win10.
Also, the Html To Pdf keyword worked in the interactive console with just <p>Hello world</p>, and the pdf was created.
Is there some workaround or a way to fix the error?
Store the receipt as a PDF file
[Arguments] ${order_nr}
${pdf_path} = Set Variable ${receipts_dir}${order_nr}.pdf
Wait Until Element Is Visible id:receipt
${receipt_html} = Get Element Attribute id:receipt outerHTML
Html To Pdf ${receipt_html} ${pdf_path}
[Return] ${pdf_path}
and it was running just fine for me on Mac M1, Windows 11 (ARM through Parallels) and Windows Server 2019.
conda.yaml
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==22.4.0 # https://rpaframework.org/releasenotes.html
Can you please ensure you update to the latest rpaframework==22.4.0, try again and if the problem persists, then attach here the robot files and a full traceback from the logs so we can investigate?
Version from template was rpaframework==22.0.0, is now rpaframework==22.4.0. Same error comes up.
Robot and log file attached as zip: level1.zip (290.8 KB)