init() missing 2 required positional arguments: ‘doc’ and ‘pos’

Published by onesixx on

__init__() missing 2 required positional arguments: 'doc' and 'pos'

init() missing 2 required positional arguments: ‘doc’ and ‘pos’

읽어들일 Json파일이 잘못되었을때

import os
import json

os.chdir('/home/oschung_skcc/my/git/mmdetection/')
fileNm = os.getcwd() + '/'+'data/cowboy/new_anno1/new_train.json'

with open(fileNm, 'r') as line:
     contents = json.loads(line.read())

# with open(fileNm, 'r') as line:
#      data = line.read()
# contents = json.loads(data)
JSONDecodeError: Expecting value: line 214 column 5 (char 5155)
        
JSONDecodeError: Expecting ',' delimiter: line 342 column 9 (char 8379)
Categories: vision

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x