Open AryanHamedani opened 1 year ago
same bug TAT
#585 issue fix this
pip install pymongo===3.12.1
Yes, it can be fixed like that, But I think it's not right that a popular package like Djongo has this kind of issue Hopefully, somebody from their team sees this issue and fix this problem which is only in the package version number, if there are other dependencies on the higher versions of PyMongo (which I'm not aware of), then I think the code for checking the connection should change, anyway if somebody from Djongo team or contributors have any idea on this, I will be happy if you tell me what is happening, if not, maybe I fix that and try a pull request :D
#585 issue fix this
pip install pymongo===3.12.1
Yes, it can be fixed like that, But I think it's not right that a popular package like Djongo has this kind of issue Hopefully, somebody from their team sees this issue and fix this problem which is only in the package version number if there are other dependencies on the higher versions of PyMongo (which I'm not aware of), then I think the code for checking the connection should change, anyway if somebody from Djongo team or contributors have any idea on this, I will be happy if you tell me what is happening, if not, maybe I fix that and try a pull request :D
I double-checked the code in the master branch with the package I was using on my local computer (considering that I used pip install djongo
command to install the package and version 1.3.6 was installed by default ), the problem has been solved in the latest code in the master branch, but the new package was not released yet, so the error exists for now but there is not anything to fix, release the new one, please
I'm also geting the same error "NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None". Unable to use makemigrations and use the package.
Is the only fix to rollback pymango to version 3.12.1?
I'm also geting the same error "NotImplementedError: Database objects do not implement truth value testing or bool(). Please compare with None instead: database is not None". Unable to use makemigrations and use the package.
Is the only fix to rollback pymango to version 3.12.1?
I think for now it is the best solution, but if you are able to understand the code you can also change the code of the base module where it raises the error, and instead of doing if db. connection
, write if db. connection is None
, it should fix the error too, but the first way is more straightforward and easier.
Issue is still here after 1 years.
Djongo does not work with its own dependency!
The problem is that the bool magic method was not implemented in the latest pymongo ( I don't exactly know from which version of pymongo, this have changed ) and now when the djongo wants to check the exist of the database connection it will raises an error, the problem solved when I removed pymongo 4 and start using pymongo 3.12 but the djongo will install the latest pymongo as its dependency which does not work.
When I just executed:
Traceback