jgscm icon indicating copy to clipboard operation
jgscm copied to clipboard

Unable to create folders in jupyter

Open Idofriedman opened this issue 7 years ago • 2 comments

image

I was able to fix by adding image

But it looks there are other issues related to working with folders

10x

Idofriedman avatar May 29 '18 14:05 Idofriedman

@Idofriedman It is not clear what you've changed, can you please attach a diff instead.

Also, can you test it with Python 3 as it may be smth specific to 2.

Besides, since I cannot reproduce it, I need the exact versions of your jgscm, Jupyter and all the google packages.

vmarkovtsev avatar Jun 05 '18 14:06 vmarkovtsev

I'm getting this with Python 3 too

Traceback (most recent call last): File
"/opt/conda/lib/python3.6/site-packages/jgscm/__init__.py", line 467, in
_get_bucket return cache[name] KeyError: 'untitled-folder' During handling of
the above exception, another exception occurred: Traceback (most recent call
last): File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1592,
in _execute result = yield result File
"/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result() File
"/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1141, in run
yielded = self.gen.throw(*exc_info) File
"/opt/conda/lib/python3.6/site-packages/notebook/services/contents/handlers.py",
line 200, in post yield self._new_untitled(path, type=type, ext=ext) File
"/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 1133, in run
value = future.result() File
"/opt/conda/lib/python3.6/site-packages/tornado/gen.py", line 326, in wrapper
yielded = next(result) File
"/opt/conda/lib/python3.6/site-packages/notebook/services/contents/handlers.py",
line 154, in _new_untitled model = yield
gen.maybe_future(self.contents_manager.new_untitled(path=path, type=type,
ext=ext)) File
"/opt/conda/lib/python3.6/site-packages/notebook/services/contents/manager.py",
line 392, in new_untitled name = self.increment_filename(untitled + ext, path,
insert=insert) File
"/opt/conda/lib/python3.6/site-packages/notebook/services/contents/manager.py",
line 344, in increment_filename if not self.exists(u'{}/{}'.format(path,
name)): File
"/opt/conda/lib/python3.6/site-packages/notebook/services/contents/manager.py",
line 247, in exists return self.file_exists(path) or self.dir_exists(path) File
"/opt/conda/lib/python3.6/site-packages/jgscm/__init__.py", line 211, in
wrapped_fn result = fn(self, *args, **kwargs) File
"/opt/conda/lib/python3.6/site-packages/jgscm/__init__.py", line 245, in
file_exists bucket = self._get_bucket(bucket_name) File
"/opt/conda/lib/python3.6/site-packages/jgscm/__init__.py", line 470, in
_get_bucket bucket = self.client.get_bucket(name) File
"/opt/conda/lib/python3.6/site-packages/gcloud/storage/client.py", line 167, in
get_bucket bucket.reload(client=self) File
"/opt/conda/lib/python3.6/site-packages/gcloud/storage/_helpers.py", line 77,
in reload _target_object=self) File
"/opt/conda/lib/python3.6/site-packages/gcloud/connection.py", line 347, in
api_request error_info=method + ' ' + url) gcloud.exceptions.Forbidden: 403
[email protected] does not have
storage.buckets.get access to untitled-folder. (GET
https://www.googleapis.com/storage/v1/b/untitled-folder?projection=noAcl)

I'm using Google Dataproc with the Jupyter initialization.

I notice that the error message mentions something about incrementing filenames -- I also see an issue where if I create two new notebooks, they're both named "untitled" and the second overwrites the first.

andrew222651 avatar Jan 29 '19 23:01 andrew222651