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)350351
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