강의

멘토링

커뮤니티

Inflearn Community Q&A

ok85628960424's profile image
ok85628960424

asked

Introduction to Python and Creating Various Automated Applications Using Web Crawling

Python & Database Integration - TinyDB

파일,메모리 DB생성에서 default_table이 작동하지 않습니다.

Written on

·

374

1

파일,메모리 DB생성에서 default_table이 작동하지 않습니다.

파일에서는 생성해도 영상처럼 테이블이 생성되지 않고 아무것도 표시되지 않고 메모리생성에서는 오류가 발생합니다.

또한 예제파일그대로 실행시켰지만 오류가 발생합니다.

웹-크롤링python

Answer 4

2

TinyDB 공식 레퍼런스 변경사항입니다.

v4.0.0 (2020-05-02)

Attributes removed from TinyDB in favor of customizing TinyDB’s behavior by subclassing it and overloading __init__(...) and table(...):

DEFAULT_TABLE

DEFAULT_TABLE_KWARGS

DEFAULT_STORAGE

Arguments removed from TinyDB(...):

default_table: replace with TinyDB.default_table_name = 'name'

table_class: replace with TinyDB.table_class = Class

해당 API에서 default_table이라는 속성을 제거했다고 나오네요.

0

테이블 만드신 다음에 그냥 키, 밸류 넣어주시면 보입니다!

0

저도 윗분과 동일한 에러가 나네요, tinydb인자에 default_table 을 더이상 안받는것 같습니다. 확인 가능하실까요~?

0

niceman님의 프로필 이미지
niceman
Instructor

안녕하세요.

항상 오류에는 원인이 존재합니다.

기본적인 테이블 생성은 버전이 바뀌어도 변한게 없는데 TinyDB 공식 홈페이지에 가셔서

레퍼런스를 한 번 읽어보시는 것을 추천드립니다.

지금까지 잘 오셨으니 쉽게 해결하실 수 있을 것 같습니다.

ok85628960424's profile image
ok85628960424

asked

Ask a question