question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

gsutil signurl — Failure: __init__() takes exactly 4 arguments (2 given)

See original GitHub issue

Hi! When I run this command:

gsutil signurl -d 10m -p notasecret service_account_key.p12 gs://[REDACTED]/rawdata/**

It crashes with the following error message:

Failure: __init__() takes exactly 4 arguments (2 given).

The glob ending in ** expands to 10 files in total. Before crashing, the command outputs correctly formed and working links for some of those files, but the number of them is not consistent. Just before posting this, I ran the command three times (one after another), and it crashed after printing 6; 3; and 4 links.

I’m having no issues with internet connection or permissions for that directory in storage, and other gsutil commands work just fine for me. I’m using gsutil version: 4.22, the latest available at the moment.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
thobrlacommented, Jan 10, 2017

You are correct in your analysis - I didn’t notice when I read through the code the first time that we were using a fixed value. Thanks for pointing that out.

Checking final_url isn’t feasible because we only want to probe with HEAD (we shouldn’t, for example, PUT data for a PUT signed URL, or start a resumable upload). So I like your first suggestion of increasing the timeout to 60, which will increase resilience. It will still be problematic if the user’s system clock substantially diverges, but this should cover most cases.

0reactions
houglumcommented, Feb 6, 2017

The commit thobrla made should address this; we’re planning on testing and hopefully releasing v4.23 of gsutil in a couple of weeks. That version should contain a fix for the issue you’re seeing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

TypeError: function takes exactly 4 arguments (2 given) in ...
In my case large negative values (-2147483646, -2147483657) for pt1 and pt2 (2nd and 3rd inputs) caused the same error message. Not very...
Read more >
signurl - Create a signed URL | Cloud Storage
The signurl command uses the private key for a service account (the '<private-key-file>' argument) to generate the cryptographic signature for the generated URL ......
Read more >
DATAFLOW for Google Cloud Professional Data Exam
When running in streaming mode, a bundle including a failing item will be retried indefinitely, which may cause your pipeline to permanently stall....
Read more >
Installing a cluster into a shared VPC on GCP using ...
To install OpenShift Container Platform on Google Cloud Platform (GCP) using user-provisioned infrastructure, you must install and configure the CLI tools for ......
Read more >
Chapter 1. Installing on GCP OpenShift Container Platform ...
2. Network configuration parameters. You can customize your installation configuration based on the requirements of your existing network infrastructure. For ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found