brineylab / abstar

VDJ assignment and antibody sequence annotation. Scalable from a single sequence to billions of sequences.
MIT License
41 stars 17 forks source link

Mongoimport error while importing a json file #88

Closed prashantbajpai closed 3 years ago

prashantbajpai commented 3 years ago

I am getting TypeError: expected str, bytes or os.PathLike object, not OutStream while trying to import a json file into my local mongodb database. Here is the code: mongoimport.run(input = '~/bulk_ngs_all_time_points/test.json', db = 'mydb') Full Traceback: TypeError Traceback (most recent call last) <ipython-input-21-3fde110bc79f> in <module> ----> 1 mongoimport.run(input = '~/bulk_ngs_all_time_points/test.json', db = 'mydb')

~/anaconda3/lib/python3.7/site-packages/abstar/utils/mongoimport.py in run(**kwargs) 347 ''' 348 args = Args(**kwargs) --> 349 main(args) 350 351

~/anaconda3/lib/python3.7/site-packages/abstar/utils/mongoimport.py in main(args) 365 err += 'You supplied: {}\n'.format(input) 366 raise RuntimeError(err) --> 367 log_handle = open(args.log, 'a') 368 open(args.log, 'w').write('') 369 log_handle.write('\nImporting {} files.\n'.format(len(in_files)))

TypeError: expected str, bytes or os.PathLike object, not OutStream

briney commented 3 years ago

Pushed a fix for this, should be available shortly on PyPI as v0.4.4