호두파파

vscode로 빌드해보고 싶어요.

파이썬에 익숙하지 않아서 공부하면서 시도해보는 중인데

vscode에서 import오류가 발생하네요.

순환참조 오류 같은데 해결 방법이 있을까요?

 

예외가 발생했습니다. ImportError

  •  

cannot import name 'is_prohibit_email' from partially initialized module 'bbs.member_profile' (most likely due to a circular import) (/workspace/g6/bbs/member_profile.py)

File "/workspace/g6/bbs/register.py", line 7, in <module> from bbs.member_profile import ( File "/workspace/g6/main.py", line 49, in <module> from bbs.register import router as register_router File "/workspace/g6/bbs/member_profile.py", line 21, in <module> from main import app File "/workspace/g6/bbs/social.py", line 9, in <module> from bbs.member_profile import validate_nickname, validate_userid File "/workspace/g6/admin/admin_member.py", line 9, in <module> from bbs.social import SocialAuthService File "/workspace/g6/admin/admin.py", line 14, in <module> from admin.admin_member import router as admin_member_router File "/workspace/g6/main.py", line 45, in <module> from admin.admin import router as admin_router ImportError: cannot import name 'is_prohibit_email' from partially initialized module 'bbs.member_profile' (most likely due to a circular import) (/workspace/g6/bbs/member_profile.py)

 

 

|

댓글 2개

circular import 라고 파이썬에 순환참조 에러네요

해당 함수추가하신곳 코드도 같이올려주세요

임포트까지도요

https://github.com/gnuboard/g6/commit/c6961871eb9b11ab05892d8e39d141b09dd68838

해당 커밋으로 말씀하신 오류가 수정되었을 것으로 보입니다.

댓글을 작성하시려면 로그인이 필요합니다.

그누보드6 파이써니스타

그누보드6, 파이썬에 대한 지식과 경험, 일상 대화를 나누는 교류의 장입니다.

+
제목 글쓴이 날짜 조회
1년 전 조회 1,116
1년 전 조회 874
1년 전 조회 1,052
1년 전 조회 1,102
1년 전 조회 766
1년 전 조회 987
1년 전 조회 1,325
1년 전 조회 1,343
1년 전 조회 1,172
2년 전 조회 1,712
2년 전 조회 1,406
2년 전 조회 1,330
2년 전 조회 1,683
2년 전 조회 2,026
2년 전 조회 1,342
2년 전 조회 1,081
2년 전 조회 1,205
2년 전 조회 1,727
2년 전 조회 920
2년 전 조회 874
2년 전 조회 992
2년 전 조회 1,000
2년 전 조회 814
2년 전 조회 1,086
2년 전 조회 1,227
2년 전 조회 1,508
2년 전 조회 1,500
2년 전 조회 1,796
2년 전 조회 1,305
2년 전 조회 1,631
🐛 버그신고