Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create Path to /neighbors before trying to open file #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions mpl_divideimg_234_water_new.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import h5py
import numpy as np
import os
from pathlib import Path

from mpl_config import MPL_Config
from osgeo import gdal
Expand Down Expand Up @@ -177,6 +178,9 @@ def divide_image(
f2.create_dataset("values", data=values)
import pickle

path_to_neighbors = os.path.join(worker_root, "neighbors")
Path(path_to_neighbors).mkdir(parents=True, exist_ok=True)

db_file_path = os.path.join(worker_root, "neighbors/%s_ij_dict.pkl" % new_file_name)
dbfile = open(db_file_path, "wb")
pickle.dump(dict_ij, dbfile)
Expand Down