에러 모음
-
SyntaxError: EOL while scanning string literal에러 모음 2023. 1. 7. 09:24
프로그램 구문이 잘못 쓰였을 때 발생합니다. 위의 구문 에러는 따옴표를 제대로 여닫지 않았을 때 발생합니다. 구문 에러가 발생하면 철자를 확인하고, 따옴표나 괄호 여닫기를 제대로 했는지 확인합니다. 문자열을 표현하는 따옴표를 제대로 여닫았는지 확인합니다. 빠진 따옴표가 있다면 입력하고, 필요 없는 따옴표가 있으면 지웁니다. 특히 문자열을 확인합니다! @app.route("/todo", methods=["GET"]) def bucket_get(): todos_list = list(db.todo.find({},{'_id':False})) return jsonify({'todos:todos_list}) 마지막줄에 ' 작은따옴표가 빠져서 에러가 났던것!! 이 간단한것을 못봐서 몇시간이 걸리다니 ㅜㅜ @app.r..
-
400 Bad Request에러 모음 2023. 1. 6. 23:47
raise exceptions.BadRequestKeyError(key) werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand. KeyError: 'todo_give' https://blog.npcode.com/2013/04/23/400-bad-request%EC%99%80-403-forbidden%EC%9D%98-%EC%9D%98%EB%AF%B8%EC%97%90-%EB%8C%80%ED%95%B4/ 400 Bad Request와 403 Forbidden의 의미에 대해 HTTP/1.1 HTTP/1.1을 정의한 최신 명세인 R..
-
localhost:5000 연결 안됨에러 모음 2023. 1. 5. 19:31
@app.route("/bucket", methods=["GET"]) def bucket_get(): buckets_list = list(db.bucket.find({},{'_id':False})) return jsonify({'buckets':buckets_list}) if __name__ == '__main__': app.run('0.0.0.0', port=5001, debug=True) 제일 하단에 port=5001 이므로 localhost:5001 로 연결해야됨! . . . . . . 오늘도 새로운 걸 알아간다. 나자신 화이팅.
-
pymongo.errors.InvalidURI에러 모음 2023. 1. 5. 19:28
raise InvalidURI("The empty string is not valid username.") pymongo.errors.InvalidURI: The empty string is not valid username. 연결이 안되어서 왜 그럴까 알아보니 하단에 있는 몽고 주소가 sparta:sparta@cluster0 로 되어있어서 연결이 안된거였음! 상단에 있는 test:sparta@cluster0 가 맞는 주소! from pymongo import MongoClient client = MongoClient('mongodb+srv://test:sparta@cluster0.cjpopbp.mongodb.net/cluster0?retryWrites=true&w=majority') db = clien..