Camelot package error

Solved!
AndreeaBalcos
Level 2
Camelot package error

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

0 Kudos
1 Solution
AlexT
Dataiker

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-c...



Thanks 

View solution in original post

0 Kudos
5 Replies
AlexT
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

0 Kudos
AndreeaBalcos
Level 2
Author

Hi @AlexT ,

I tried these things and unfortunately I get the same error 

0 Kudos
AlexT
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

 

0 Kudos
AndreeaBalcos
Level 2
Author

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.

 

 

0 Kudos
AlexT
Dataiker

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-c...



Thanks 

0 Kudos