TypeError: delete_namespaced_secret() takes 3 positional arguments but 4 were given

Create issue
Issue #1193 resolved
Steve Marshall created an issue

Hi

I’m trying to run a simple snakemake script using GCP + Kubernetes https://gitlab.com/schmeierlab/reproduce-tutorial/blob/master/examples/Snakefile_v5

I’m using Python 3.7.3, conda 4.6.4 snakemake 5.4.5 and kubernetes 9.0.0. I’ve attached my conda env’t.

My job ran successful but got this error.. looks like it is trying to remove the generated secret?

Traceback (most recent call last):

File "/anaconda3/envs/snakemake/lib/python3.7/site-packages/snakemake/__init__.py", line 544, in snakemake

export_cwl=export_cwl)

File "/anaconda3/envs/snakemake/lib/python3.7/site-packages/snakemake/workflow.py", line 674, in execute

success = scheduler.schedule()

File "/anaconda3/envs/snakemake/lib/python3.7/site-packages/snakemake/scheduler.py", line 250, in schedule

self._executor.shutdown()

File "/anaconda3/envs/snakemake/lib/python3.7/site-packages/snakemake/executors.py", line 1147, in shutdown

self.unregister_secret()

File "/anaconda3/envs/snakemake/lib/python3.7/site-packages/snakemake/executors.py", line 1144, in unregister_secret

kubernetes.client.V1DeleteOptions())

TypeError: delete_namespaced_secret() takes 3 positional arguments but 4 were given

Comments (3)

  1. Adam Labadorf

    I encountered this too in python=3.6.3, snakemake=5.5.4, and kubernetes=10.0.0. The fix was to set the body kwarg at the offending line:

        def unregister_secret(self):
            import kubernetes.client
            self.kubeapi.delete_namespaced_secret(self.run_namespace,
                                                  self.namespace,
                                                  body=kubernetes.client.V1DeleteOptions())
    

    I didn’t track down when kubernetes implemented this change. There are a couple other places in executors.py where the kwarg might need to be added as well.

  2. Log in to comment