Hi folks,
Anaconda wouldn't open today after I restarted for Windows Update, so I reinstalled it. I then ran Pyinstaller on a .py file I created using nbconvert, and received a confusing traceback call when it was loading module hook 'hook-crptography.py'. I'll post the whole traceback below - any even vague pointers on how to solve this would be hugely appreciated - I am at my wits end having tried everything I can think of! Thank you so much in advance for any help provided!
41193 INFO: Loading module hook 'hook-cryptography.py' from 'C:\\Users\\czfhq\\anaconda3\\envs\\tf-venv\\lib\\site-packages\\_pyinstaller_hooks_contrib\\hooks\\stdhooks'...
Traceback (most recent call last):
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\__main__.py", line 178, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\__main__.py", line 59, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\building\build_main.py", line 842, in main
build(specfile, distpath, workpath, clean_build)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\building\build_main.py", line 764, in build
exec(code, spec_namespace)
File "C:\Users\czfhq\AnacondaProjects\00 New Master Data\03 Non Bz1 Betfair Code and Data\20210929_Daily_Run_COPIED_FROM_METRICS_2_1_THAT_IS_MASTER_THIS_IS_DOWNSTREAM.spec", line 20, in <module>
noarchive=False,
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\building\build_main.py", line 319, in __init__
self.__postinit__()
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
self.assemble()
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\building\build_main.py", line 487, in assemble
self.graph.process_post_graph_hooks(self)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\depend\analysis.py", line 326, in process_post_graph_hooks
module_hook.post_graph(analysis)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\depend\imphook.py", line 398, in post_graph
self._load_hook_module()
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\depend\imphook.py", line 361, in _load_hook_module
self._hook_module = importlib_load_source(self.hook_module_name, self.hook_filename)
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\PyInstaller\compat.py", line 620, in importlib_load_source
return mod_loader.load_module()
File "<frozen importlib._bootstrap_external>", line 407, in _check_name_wrapper
File "<frozen importlib._bootstrap_external>", line 907, in load_module
File "<frozen importlib._bootstrap_external>", line 732, in load_module
File "<frozen importlib._bootstrap>", line 265, in _load_module_shim
File "<frozen importlib._bootstrap>", line 696, in _load
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\site-packages\_pyinstaller_hooks_contrib\hooks\stdhooks\hook-cryptography.py", line 40, in <module>
cryptography_dir = os.path.dirname(get_module_file_attribute('cryptography'))
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\ntpath.py", line 221, in dirname
return split(p)[0]
File "C:\Users\czfhq\anaconda3\envs\tf-venv\lib\ntpath.py", line 183, in split
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
(tf-venv) C:\Users\czfhq\AnacondaProjects\00 New Master Data\03 Non Bz1 Betfair Code and Data>