Camelot package error

Tags
Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3
edited July 2024 in Setup & Configuration

Hi Everyone!

I am trying to use the function camelot.read_pdf() and for that I need to install camelot-py[cv]. I tried to install this package but instead the camelot-py is installed, which is not enough. When I try to import the camelot after I installed the package , I get this error :

cannot import name 'TableList'

Do you have any idea how I can import camelot-py[cv] package?

Thank you!


Operating system used: Windows

Welcome!

It looks like you're new here. Sign in or register to get started.

Best Answer

  • Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,270 Dataiker
    Answer ✓

    Hi @AndreeaBalcos
    ,


    The code env is not built for containerized execution. So you are unlikely to run this in a container or running with the wrong code env.

    "allContainerConfs": false,
    "containerConfs": [],

    1) Try to update the "Containerized execution" Build for All containers or select configs and click "Update" to push the image to the registry.

    Screenshot 2023-05-11 at 9.44.01 AM.png

    2) In your notebook make sure to select the correct kernel Andreea_env

    Screenshot 2023-05-11 at 9.45.49 AM.png

    3) Then force reload the notebook and try the import again.
    Screenshot 2023-05-11 at 9.47.25 AM.png

    If this doesn't work, please try to use the option "rebuild env" and update the code env.

    Screenshot 2023-05-11 at 9.50.29 AM.png

    https://stackoverflow.com/questions/61913882/importerror-cannot-import-name-tablelist-from-camelot-core



    Thanks

Answers

  • Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,270 Dataiker

    Hi @AndreeaBalcos
    ,

    Have you added the import line:
    import camelot

    I was able to install and import camelot without any issues. A few things you can check :

    1) Was the package installed successfully based on the logs of the code env

    2) If you are testing in a Notebook make sure to force reload the notebook after updating the code env.

    Thanks

  • Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3

    Hi @AlexT
    ,

    I tried these things and unfortunately I get the same error

  • Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,270 Dataiker

    Could you please attach the Code environment diagnostics? Go to Administration - Code Envs - open the code env - Get diagnostics.

    Screenshot 2023-05-11 at 8.51.02 AM.png

    The exact code you are running and confirm if you are running it in Notebook/Recipe and if this is containerized or local execution.

    Thanks

  • Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3

    I attached the diagnostics and a picture with the code and the error message.

    I am running the code in a Notebook and the execution is containerized.

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.