Aug-01-2020, 02:13 PM
Hey! I changed the code, it still gives the error with this:
Checking that n_files divided by n_pts is an integer... Done! Summing up mcas in mca_file... DEBUG: is file? False \\...\home\s\myacc\Documents\XAS\mca_CeNO3_I1 Traceback (most recent call last): File "\\...\home\s\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 "\\...\home\s\myacc\Documents\Python Scripts\Functions.py", line 134, in sum_import_data_2 mcadata[:, energy_point] += np.loadtxt(filename) 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: '\\\\...\\home\\s\\myacc\\Documents\\XAS\\mca_CeNO3_I1'What's strange is that previously I ask the function to calculate the files in the mca_file folder, and that works just fine and the number of files is correct, but somehow for that part of the function the repository can't be found.