3-07 모델에 글쓴이 추가하기 TypeError: argument of type 'WindowsPath' is not iterable
모델에 글쓴이 추가하기 부분에서 에러가 출력되서 질문드립니다.
[2] makemigrations 명령 실행하고 author 필드 추가 문제 해결하기에서
python manage.py makemigrations을 하고
아래의 부분까지 하면 Add field author to question에 이어서
TypeError: argument of type 'WindowsPath' is not iterable 에러가 뜹니다.
윈도우패스가 이터러블이 아니라는 건데, 어떻게 해결하나요?
>>> 1
Migrations for 'pybo':
pybo\migrations\0002_question_author.py
- Add field author to question
(mysite) c:\projects\mysite>
HJ 님 186
2021년 7월 18일 9:15 오후
실제 어떻게 실행하셨는지 화면 캡처나 실행 이력을 보여주셔야 할듯하네요.
-
박응용님,
2021년 7월 18일 11:58 오후
추천
,
대댓글

@박응용님 str()로 문자열로 변환하니 해결이 됬습니다;
-
HJ님,
2021년 7월 19일 12:03 오후
추천
,
대댓글