I'm having a problem almost exactly like this guy
https://github.com/GoogleCloudPlatform/gcsfuse/issues/288
except that when they solved the problem they did not give enough details as to its solution. I have a mounted storage bucket on a gcloud VM instance but I cannot write a file to the storage bucket. It seems that my problem is that I have not given Google my authentication credentials. I tried moving the credentials I used on my Mac over to the Linux computer but that so far has had no affect. Here is the exact syntax:
str1 = "/home/kylefoley/byu_corpus_small/codes/My_Project_999.json"
os.environ['GOOGLE_APPLICATION_CREDENTIALS'] = str1
key = "9999"
I have successfully mounted the storage bucket with gcsfuse and can read files from it but when I try to write files to it I get the following error:
Traceback (most recent call last):
File "build_index.py", line 638, in <module>
determine_fork()
File "build_index.py", line 635, in determine_fork
main_fork(make_changes, len(rem_files), **kwargs)
File "build_index.py", line 590, in main_fork
save_iweb_pickle(dct, 'done_forks')
File "/home/kylefoley/byu_corpus_small/code/byu_globals.py", line 27, in save_iweb_pickle
pi.save_pickle(obj, name, 1)
File "/home/kylefoley/byu_corpus_small/code/pickling.py", line 55, in save_pickle
temp = open(name, "wb")
OSError: [Errno 5] Input/output error: '/mnt/disks/temp_dir/fix_mistakes/done_forks.pkl'
The aforementioned author solved the problem with
My apologies. You're right. I misunderstood how authentication was working. Once I used gcloud auth login everything worked as expected.
But I can't figure out what he means by that. I would think it would have something to do with this module:
from oauth2client.client import GoogleCredentials
But I cannot figure out what to do with that module. By the way my mountpoint is:
/mnt/disks/temp_dir/