Camelot package error

AndreeaBalcos
AndreeaBalcos Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 3
edited July 16 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

Tagged:

Best Answer

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 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

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 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

  • AndreeaBalcos
    AndreeaBalcos 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

  • Alexandru
    Alexandru Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 1,226 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

  • AndreeaBalcos
    AndreeaBalcos 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.

Setup Info
    Tags
      Help me…