Oct-08-2019, 06:53 AM
Hi
On Windows 10, the following code in iec_61672_1_2013.py from the acoustics module:
File "C:\Users\bayki\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\acoustics\standards\iec_61672_1_2013.py", line 43, in <module>
File "pkgutil.py", line 637, in get_data
File "C:\Users\bayki\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 475, in get_data
with open(path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\bayki\\AppData\\Local\\Temp\\_MEI48522\\acoustics\\data\\iec_61672_1_2013.csv'
Is there some way of adding this file as a resource?
On Windows 10, the following code in iec_61672_1_2013.py from the acoustics module:
WEIGHTING_DATA = pd.read_csv( io.BytesIO(pkgutil.get_data('acoustics', os.path.join('data', 'iec_61672_1_2013.csv'))), sep=',', index_col=0)causes the single-package executable to fail trying to load some internal data.
File "C:\Users\bayki\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 627, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\acoustics\standards\iec_61672_1_2013.py", line 43, in <module>
File "pkgutil.py", line 637, in get_data
File "C:\Users\bayki\AppData\Local\Programs\Python\Python37-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 475, in get_data
with open(path, 'rb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\bayki\\AppData\\Local\\Temp\\_MEI48522\\acoustics\\data\\iec_61672_1_2013.csv'
Is there some way of adding this file as a resource?