ocean-data-factory-sweden / kso

Notebooks to upload/download marine footage, connect to a citizen science project, train machine learning models and publish marine biological observations.
GNU General Public License v3.0
5 stars 12 forks source link

Issues with panoptes import #269

Closed victor-wildlife closed 10 months ago

victor-wildlife commented 1 year ago

I have successfully installed the KSO software from scratch following the guidelines in the readme. However, the notebooks get stack importing the projectprocessor. I have dug into it and found the problem is when trying to import panoptes_client. I know I have had this problem before and fixed it manually uninstalling and reinstalling different packages but I can't find the solution in the readme.

Image

victor-wildlife commented 1 year ago

I fixed the issue by following the troubleshooting section and installing the libmagic and python-magic. I have updated the troubleshooting section to reflect that this might not be only a problem to upload movies to Zooniverse but a general issue with panoptes package

Diewertje11 commented 1 year ago

I find it really strange that I do not get this problem... I have re-checked the instructions by creating a new environment, but the problem does not occur for me. However, I did find on the github page from the python-magic package that we are using in our environment (gets automatically installed by the panoptes-client), that for windows, you should install the python-magic-bin (see https://github.com/ahupp/python-magic). So it might be that we just need that one in our standard environment and that we should include it in the requirements in the utils. Could you maybe test this by including the python-magic-bin in the requirements and setting up a new environment? I cannot do this since the problem does not occur for me.

The python-libmagic should not be needed I think, since that should be doing the same as the python-magic if I understand it correctly. (But this will get confirmed if you have tested above. otherwise we can include that one as well)

Also, I get an error when I try to install python-libmagic (both locally and in colab), since it depends on cffi and it fails in building that. But if the above mentioned solution solves it, then we do not need to look at this.

victor-wildlife commented 1 year ago

@Diewertje11 thanks for the follow up. I will try next week to set up a new environment with the python-magic-bin in the requirements and let you know how it goes. It's weird that only happens on my end but it will be good to get it sorted in case others run into the same problem

jannesgg commented 1 year ago

@victor-wildlife Was there any follow-up on this issue or could it be closed for now?

victor-wildlife commented 1 year ago

@jannesgg yes, I still need to test this. So keep it open for now...

jannesgg commented 1 year ago

@victor-wildlife This should be resolved now, I believe?

victor-wildlife commented 1 year ago

Not yet I never got around to try it. So we might need to leave it here for now....