Jul-30-2020, 06:17 PM
Hey, here is the entire traceback. Good to know that writes aren't necessarily required: I simply wish for the function to read files and sum, which I suppose it should be doing now.
Traceback (most recent call last): File "\\...\myacc\Documents\Python Scripts\CeNO3.py", line 45, in <module> I1_data = fn.sum_import_data_2(n_pts, n_chnl, I1_mca_file) File "\\...\myacc\Documents\Python Scripts\Functions.py", line 136, in sum_import_data_2 mcadata[:, energy_point] += np.loadtxt(mca_file.format(mca)) File "C:\LocalData\myacc\Anaconda\lib\site-packages\numpy\lib\npyio.py", line 981, in loadtxt fh = np.lib._datasource.open(fname, 'rt', encoding=encoding) File "C:\LocalData\myacc\Anaconda\lib\site-packages\numpy\lib\_datasource.py", line 269, in open return ds.open(path, mode, encoding=encoding, newline=newline) File "C:\LocalData\myacc\Anaconda\lib\site-packages\numpy\lib\_datasource.py", line 621, in open encoding=encoding, newline=newline) PermissionError: [Errno 13] Permission denied: '(mca file here)'