반응형
250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- Spring
- PostgreSQL
- JavaScript
- VPN
- kubeflow
- chartjs
- java bigdecimal
- codepipeline
- Flux
- codedeploy
- SQL
- Jenkins
- IntelliJ
- AWS CI/CD 구축하기
- bootstrap
- Python
- Airflow
- Spring Error
- aws cicd
- or some instances in your deployment group are experiencing problems.
- codebuild
- node
- codedeploy error
- docker
- chart.js
- redis
- Kafka
- aws
- 도커
- COALESCE
Archives
- Today
- Total
Small Asteroid Blog
[python error] execute() takes from 2 to 3 positional arguments but 6 were given 본문
백엔드/Python
[python error] execute() takes from 2 to 3 positional arguments but 6 were given
작은소행성☄️ 2020. 9. 28. 17:05728x90
execute() takes from 2 to 3 positional arguments but 6 were given
%s 등의 format으로 변수의 값을 넣을 때, 형식이 맞지 않아 발생하는 Type Error 이다.
아래와 같은 방법은 파이썬에서 사용하지 않는 방법이다.
사용하고자 하는 데이터가 문자열인지 숫자인지 확인한 후
어떠한 포맷 옵션을 사용하면 되는지 확인 후 사용하면 된다.
%s : 문자열
%d : 정수
728x90
반응형
'백엔드 > Python' 카테고리의 다른 글
[python] dataframe db에 저장 (0) | 2020.10.07 |
---|---|
[python error] not enough arguments for format string (0) | 2020.09.28 |
(오류) (pymysql.err.OperationalError) (1054, "Unknown column '컬럼명' in 'field list'") (0) | 2020.09.28 |
[python] not all arguments converted during string formatting (0) | 2020.09.28 |
(오류) (2003, "Can't connect to MySQL server on 'root' ([Errno 11001] getaddrinfo failed)") (0) | 2020.09.28 |