Nov-15-2018, 01:47 PM
(This post was last modified: Nov-15-2018, 01:51 PM by ganeshsai2912.)
Thanks..
Output is coming with the following error.
Also, it will not read all the text file which contains in the folder. it will read only one file.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-26-b254d21fe8a0> in <module>()
16 files = glob.glob(pattern)
17 for file_name in files: # 'file' is a builtin type, 'name' is a less-ambiguous variable name.
---> 18 emp_no, emp_name, emp_sal = process_file(file_name)
19 # here add code to write to DB
ValueError: too many values to unpack (expected 3)
Output is coming with the following error.
Also, it will not read all the text file which contains in the folder. it will read only one file.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-26-b254d21fe8a0> in <module>()
16 files = glob.glob(pattern)
17 for file_name in files: # 'file' is a builtin type, 'name' is a less-ambiguous variable name.
---> 18 emp_no, emp_name, emp_sal = process_file(file_name)
19 # here add code to write to DB
ValueError: too many values to unpack (expected 3)