-
Notifications
You must be signed in to change notification settings - Fork 141
Package upload fails with "AttributeError: can't set attribute" when using pypicloud[gcs] 1.3.9 or later at GAE #317
Comments
hmmm interesting. BLUF: believe the issue is that pypicloud is trying to set properties that do not have setters for gcs using transport_method.
and after reviewing the following:
Appears to be straight forward:
Reviewing the docs for GCS at https://cloud.google.com/python/docs/reference/storage/latest/google.cloud.storage.blob.Blob#google_cloud_storage_blob_Blob_storage_class
I'm just a passer-by whose attention was caught, and don't have bandwidth or use-case (I don't use the gcs backend at this time) to implement the changes. From my very brief perusal of the SDK docs though, it seems that the needed updates would be relatively minor (and in fact I suspect the correct usage is what's in v1.3.8 pre-smart_open, but haven't checked) |
ok, I was interested to see what 1.3.8 had, and yep it's 90% of the way there.
so recommended changes:
P.S. did some more looking at the acl, and appears like using argname "predefined_acl" instead of "acl" might be all that's needed? |
Thanks for the cc, and sorry that this slipped through. I think this needs upstream PRs.
|
Thanks @ddelange for jumping on this so quickly! |
Hi 👋 Quick update: we're looking at a major version bump from smart_open from a PR opened 2 days after mine: piskvorky/smart_open#729 As it changes internals significantly, my original PR at gcs became unnecessary for this issue. Also, instead of updating our mocks to account for new smart_open internals, I switched to fake-gcs-server analogous to switching to azurite in #304. And that is working like a charm (as we can now actually assert ACL being returned on an uploaded blob, instead of mocking which caused this issue in the first place): I've tested the fix here using unreleased So now we wait for smart_open to release 7.0.0! 🎉 Heineken.-.Now.we.wait.mp4 |
Hi,
I'm running
pypicloud
within Google App Engine, usinguWSGI
and with GCS as the storage backend. Onpypicloud
1.3.8 and earlier, this works fine. However, after upgrading topypicloud
1.3.9 or later, I can no longer upload packages (either viapoetry publish --repository <my_repo_name>
, or via the web UI). I observed the errors below in/var/log/pypicloud.log
.Given that this behavior manifested in 1.3.9, and that the errors are coming up from
smart_open
, PR #304 seems possibly relevant. In meantime, workaround was just to roll back to 1.3.8.Thanks, and let me know if you need any further debugging info -
C.J.
The text was updated successfully, but these errors were encountered: