joseherazo04 / Covid19-SearchEngine

Search engine for bibliography related to covid-19 from https://pages.semanticscholar.org/coronavirus-research
MIT License
2 stars 2 forks source link

Attribute error on Heroku deployment #4

Open saadhaxxan opened 4 years ago

saadhaxxan commented 4 years ago

AttributeError: Can't get attribute 'RankBM25Index' on <module 'main' from '/app/.heroku/python/bin/gunicorn'>

maybe pickle file has some problems in loading how can I solve this or how you deployed it on the server ? I have also tries on python anywhere but got the same error.

joseherazo04 commented 4 years ago

I have just tested it again and no erros, I am not sure if the source of the problem is the .pickle file. I uploaded the file directly to the server and didn't have any problems.

Maybe you could check if the 'RankBM25Index' class in main.py is actually named in that way. Just let me know.

saadhaxxan commented 4 years ago

I have also tested everything is good and running at local host but I deploy this error appears I have checked the class name its same as RankBM25Index.

Below is the error I hope when bm25_index tries to read the pickle file it does not return RankBM25Index

File "/app/app.py", line 168, in bm25_index = pickle.load(open('index202003221215.pickle','rb')) AttributeError: Can't get attribute 'RankBM25Index' on <module 'main' from '/app/.heroku/python/bin/gunicorn'>

joseherazo04 commented 4 years ago

It is weird, I didn't get this error when I deployed the app on the server and I did it several times.

Unfortunately I have no idea of what's happening, but if you get to fix it let me know it as well.