인프런 영문 브랜드 로고
인프런 영문 브랜드 로고

Inflearn Community Q&A

blackcoding911's profile image
blackcoding911

asked

Introduction to Python and Creating Various Automated Applications Using Web Crawling

Python & Database Integration - TinyDB

파일 DB 생성 오류

Written on

·

256

0

import simplejson as json

from tinydb import TinyDB

#파일 DB 생성

db = TinyDB('C:\python\\section5\\databases\\database.db')

#db.default_table_name = 'users'

Traceback (most recent call last):
  File "C:\python\section5\5-2-1.py", line 2, in <module>
    from tinydb import TinyDB
  File "C:\Users\HSM\anaconda3\envs\section5\lib\site-packages\tinydb\__init__.py", line 29, in <module>
    from .database import TinyDB
  File "C:\Users\HSM\anaconda3\envs\section5\lib\site-packages\tinydb\database.py", line 13
    TableBase: Type[Table] = with_typehint(Table)
             ^
SyntaxError: invalid syntax

도저히 왜 안되는지 모르겠습니다. 모듈 설치도 다 잘되어있는데 구글링 해도 나오지도 않네요

python웹-크롤링

Answer 1

0

niceman님의 프로필 이미지
niceman
Instructor

특별히 잘못되 보이는 부분은 없어보입니다.

업데이트 버전에 따라 다를 수 있으니 아래 레퍼런스를 한 번 보시고

현재 설치된 버전과 아래 내용대로 코딩 한 번해보세요

https://tinydb.readthedocs.io/en/latest/getting-started.html

blackcoding911's profile image
blackcoding911

asked

Ask a question