에러/mongodb
[MongoDB] Username and password must be escaped according to RFC 3986, use urllib.parse.quote_plus() 에러
PEKAH
2021. 1. 8. 23:28
몽고디비를 불러올 때 발생하는 에러로 유저네임이나 패스워드에 문제가 있을 때 발생한다.
에러
Username and password must be escaped according to RFC 3986, use urllib.parse.quote_plus()
해결
mongo_uri = "mongodb://username:" + urllib.quote("password") + "@127.0.0.1:27001/"
urllib.quote를 사용해 유저네임이나 패스워드를 따로 분리해 적용하면 된다