While Initializing the AOSP (Android Open Source Project) repository source code master branch it says perms denied - repo

Heres the error
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/main.py", line 705, in <module>
_Main(sys.argv[1:])
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/main.py", line 681, in _Main
result = repo._Run(name, gopts, argv) or 0
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/main.py", line 228, in _Run
result = run()
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/main.py", line 219, in <lambda>
run = lambda: self._RunLong(name, gopts, argv) or 0
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/main.py", line 314, in _RunLong
result = cmd.Execute(copts, cargs)
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/subcmds/init.py", line 325, in Execute
self._SyncManifest(opt)
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/subcmds/init.py", line 116, in _SyncManifest
if not self.manifest.manifestProject.Sync(
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/project.py", line 3708, in Sync
self._InitGitDir(mirror_git=mirrored_manifest_git)
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/project.py", line 2545, in _InitGitDir
self._UpdateHooks(quiet=quiet)
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/project.py", line 2622, in _UpdateHooks
self._InitHooks(quiet=quiet)
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/project.py", line 2661, in _InitHooks
platform_utils.symlink(
File "/mnt/chromeos/removable/Hi/asop/.repo/repo/platform_utils.py", line 46, in symlink
return os.symlink(source, link_name)
PermissionError: [Errno 13] Permission denied: '../../repo/hooks/commit-msg' -> '/mnt/chromeos/removable/Hi/asop/.repo/manifests.git/hooks/commit-msg'
is this only happening to me?
is this perm?
i tried using sudo but it said that repo did not exist

Related

Access denied when trying to run django-admin startproject

I am new to django and I tried to create a project with django-admin startproject command. The tutorial I was referring to had no errors while going through this command but I get the following error. The tutorial and I are not doing it in any virtual environment. Though this error comes, the files and folder are created in the directory I am working in, how should I solve this error?
Traceback (most recent call last):
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py", line 197, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\Scripts\\django-admin.exe_main_.py", line 7, in \<module\>
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\__init_.py", line 446, in execute_from_command_line
utility.execute()
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\__init_.py", line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\\base.py", line 402, in run_from_argv
self.execute(\*args, \*\*cmd_options)
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\\base.py", line 448, in execute
output = self.handle(\*args, \*\*options)
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\\commands\\startproject.py", line 21, in handle super().handle("project", project_name, target, \*\*options)
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\\templates.py", line 225, in handle
run_formatters(\[top_dir\])
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\site-packages\\django\\core\\management\\utils.py", line 165, in run_formatters
subprocess.run(
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\subprocess.py", line 501, in run
with Popen(\*popenargs, \*\*kwargs) as process:
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\subprocess.py", line 947, in __init__
self.\_execute_child(args, executable, preexec_fn, close_fds,
File "C:\\Users\\username\\AppData\\Local\\Programs\\Python\\Python39\\lib\\subprocess.py", line 1416, in \_execute_child
hp, ht, pid, tid = \_winapi.CreateProcess(executable, args,
PermissionError: \[WinError 5\] Access is denied

How to specify local shell for Fabric2/Paramiko/Invoke?

When trying to create a fabric2.Connection, Paramiko tries to invoke a local /bin/bash command:
$ fab2 db-shell
Traceback (most recent call last):
File "/nix/store/m2iyj18cifr4a1rvpfgphg7kfgsf2pj2-python3.9-fabric2-2.7.1/bin/.fab2-wrapped", line 9, in <module>
sys.exit(program.run())
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/program.py", line 384, in run
self.execute()
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/program.py", line 566, in execute
executor.execute(*self.tasks)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/executor.py", line 129, in execute
result = call.task(*args, **call.kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/tasks.py", line 127, in __call__
result = self.body(*args, **kwargs)
File "/home/username/project/fabfile.py", line 645, in db_shell
bastion_connection().run(
File "/home/username/project/fabfile_utils.py", line 141, in bastion_connection
conn = Connection(
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/fabric2/connection.py", line 403, in __init__
self.ssh_config = self.config.base_ssh_config.lookup(host)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 223, in lookup
options = self._lookup(hostname=hostname)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 250, in _lookup
or self._does_match(
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/paramiko/config.py", line 389, in _does_match
passed = invoke.run(exec_cmd, hide="stdout", warn=True).ok
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/__init__.py", line 48, in run
return Context().run(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/context.py", line 95, in run
return self._run(runner, command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/context.py", line 102, in _run
return runner.run(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 380, in run
return self._run_body(command, **kwargs)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 431, in _run_body
self.start(command, self.opts["shell"], self.env)
File "/nix/store/20k85mfdkbrj5w1pq0d7dzagygfip70h-python3-3.9.13-env/lib/python3.9/site-packages/invoke/runners.py", line 1291, in start
self.process = Popen(
File "/nix/store/0zzvjh5gnz0ny7ckilzyn9hmg5lypszf-python3-3.9.13/lib/python3.9/subprocess.py", line 951, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/0zzvjh5gnz0ny7ckilzyn9hmg5lypszf-python3-3.9.13/lib/python3.9/subprocess.py", line 1821, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/bin/bash'
I've not been able to find anything in the docs about this yet.
I'm running fabric2==2.7.1, invoke==1.6.0, and paramiko==2.8.0 on NixOS stable 22.11.
Invoke currently defaults to /bin/bash, which is a known issue, since operating systems like Alpine and NixOS don't have that path. Fortunately we can specify a command in $PATH rather than manually looking it up, so adding the following to the Connection call does the trick: config=invoke.Config(overrides={"shell": "bash"}).

PyInstaller --onefile is throwing file not found error

I am trying to make an executable of a python 3.10 file using PyInstaller in the command prompt:
python -m PyInstaller --onefile 1.0.py
with "1.0" being my file name. I have done this many times before on the same PC and with the same python version, but for this file it is throwing a "file specified not found" error:
while run_next_command(read_fh, write_fh):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 188, in <module>
run()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 178, in run
run_build(pyi_config, spec_file, **vars(args))
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\__main__.py", line 59, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 934, in main
build(specfile, distpath, workpath, clean_build)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 856, in build
exec(code, spec_namespace)
File "E:\Python Scripts\High Spen\Combined\1.0.spec", line 7, in <module>
a = Analysis(
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 381, in __init__
self.__postinit__()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\datastruct.py", line 173, in __postinit__
self.assemble()
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 660, in assemble
isolated.call(find_binary_dependencies, list(self.binaries), self.binding_redirects, collected_packages)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_parent.py", line 238, in call
return isolated.call(function, *args, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_parent.py", line 176, in call
raise RuntimeError(f"Child process call to {function.__name__}() failed with:\n" + output)
RuntimeError: Child process call to find_binary_dependencies() failed with:
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_dll.py", line 23, in _LoadLibraryEx
result = check_null(
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\isolated\_child.py", line 63, in run_next_command
output = function(*args, **kwargs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\building\build_main.py", line 162, in find_binary_dependencies
return bindepend.Dependencies(binaries, redirects=binding_redirects, xtrapath=extra_libdirs)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 205, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 372, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py", line 326, in getAssemblies
res = winmanifest.GetManifestResources(pth)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winmanifest.py", line 979, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\utils\win32\winresource.py", line 155, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\win32api.py", line 42, in LoadLibraryEx
with _pywin32error():
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\contextlib.py", line 153, in __exit__
self.gen.throw(typ, value, traceback)
File "C:\Users\jackp\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryEx', 'The system cannot find the file specified')
Please could someone let me know how I would solve this or otherwise another method of turning this into an .exe. Thanks
Update:
I have tried uninstalling my python 3.10 and downloading 3.7 instead, as I saw somewhere that PyInstaller is incompatible with 3.8 and above, but this still didn't work for another reason. So I reinstalled 3.10 (effectively at this point I have uninstalled and reinstalled my python and IDE) and I am still getting the same error.

FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/django_redis_cache-3.0.0-py3.6.egg'

While docker image was being created, I've got the below exception:
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/django_redis_cache-3.0.0-py3.6.egg'
Dockerfile:
FROM python:3.6
# ...
Packages:
django==2.0.6
redis==3.5.3
django-redis-cache==2.0.0
django-redis-sessions
Here is a full trace of the exception:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/main.py", line 75, in main
return command.main(cmd_args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 121, in main
return self._main(args)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 265, in _main
self.handle_pip_version_check(options)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 152, in handle_pip_version_check
timeout=min(5, options.timeout)
File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 97, in _build_session
index_urls=self._get_index_urls(options),
File "/usr/local/lib/python3.6/site-packages/pip/_internal/network/session.py", line 249, in __init__
self.headers["User-Agent"] = user_agent()
File "/usr/local/lib/python3.6/site-packages/pip/_internal/network/session.py", line 159, in user_agent
setuptools_version = get_installed_version("setuptools")
File "/usr/local/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 665, in get_installed_version
working_set = pkg_resources.WorkingSet()
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
self.add_entry(entry)
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
for dist in find_distributions(entry, True):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1983, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1414, in has_metadata
return self._has(path)
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1854, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1731, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "/usr/local/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1688, in load
mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/site-packages/django_redis_cache-3.0.0-py3.6.egg'
Question:
How can I overcome this issue? Any help would be appreciated!

Unable to save model weights

Has anyone ever seen this error message:
OSError: Unable to create file (unable to open file: name = './snapshots/resnet50_csv_01.h5', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 242)
I am unsure what I am doing wrong.
Full:
Epoch 00001: saving model to ./snapshots/resnet50_csv_01.h5
Traceback (most recent call last):
File "../keras-retinanet-0.1/keras_retinanet/bin/train.py", line 264, in <module>
main()
File "../keras-retinanet-0.1/keras_retinanet/bin/train.py", line 260, in main
callbacks=callbacks,
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/legacy/interfaces.py", line 91, in wrapper
return func(*args, **kwargs)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/engine/training.py", line 1415, in fit_generator
initial_epoch=initial_epoch)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/engine/training_generator.py", line 247, in fit_generator
callbacks.on_epoch_end(epoch, epoch_logs)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/callbacks.py", line 77, in on_epoch_end
callback.on_epoch_end(epoch, logs)
File "../keras-retinanet-0.1/keras_retinanet/bin/../../keras_retinanet/callbacks/common.py", line 30, in on_epoch_end
self.callback.on_epoch_end(epoch, logs=logs)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/callbacks.py", line 455, in on_epoch_end
self.model.save(filepath, overwrite=True)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/engine/network.py", line 1085, in save
save_model(self, filepath, overwrite, include_optimizer)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/keras/engine/saving.py", line 105, in save_model
f = h5py.File(filepath, mode='w')
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/h5py/_hl/files.py", line 312, in __init__
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr)
File "/gpfs0/users/lindgren/pstrain/virtual_enviroments/final_placenta_virtual_enviroment/lib/python3.6/site-packages/h5py/_hl/files.py", line 148, in make_fid
fid = h5f.create(name, h5f.ACC_TRUNC, fapl=fapl, fcpl=fcpl)
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper
File "h5py/h5f.pyx", line 98, in h5py.h5f.create
OSError: Unable to create file (unable to open file: name = './snapshots/resnet50_csv_01.h5', errno = 2, error message = 'No such file or directory', flags = 13, o_flags = 242)
I think it's as simple as that the directory that you're trying to save to doesn't exist. You need to create the directory first.

Resources