Google AppEngine - Pull Queue - Impossible to delete task: "project name is invalid"
<p>I have create a pull queue in the GAE that works fine, I'm able to add elements from the app &amp; retrieve them from my instance with the code below:</p>

<pre><code>from apiclient.discovery import build
from oauth2client.client import GoogleCredentials

credentials = GoogleCredentials.get_application_default()
PROJECT_NAME = "my-project"
QUEUE_NAME = 'my-queue'

q = build('taskqueue', 'v1beta2', credentials=credentials)
l = q.tasks().lease(project=PROJECT_NAME, taskqueue=QUEUE_NAME, leaseSecs=600, numTasks=1)
result = l.execute()
task = result['items'][0]
task_id = task['id']
</code></pre>

<p>The problem comes when I try to delete the task after processing it, this code that should work </p>

<pre><code>d = q.tasks().delete(project=PROJECT_NAME, taskqueue=QUEUE_NAME, task=task_id)
d.execute()
</code></pre>

<p>return</p>

<pre><code>File "/usr/local/lib/python2.7/dist-packages/oauth2client/util.py", line 137, in positional_wrapper
return wrapped(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/googleapiclient/http.py", line 838, in execute
raise HttpError(resp, content, uri=self.uri)
googleapiclient.errors.HttpError: &lt;HttpError 400 when requesting
https://www.googleapis.com/taskqueue/v1beta2/projects/my-project/taskqueues/my-queue/tasks/46101672956060486431?
returned "project name is invalid"&gt;
</code></pre>

<p>I don't understand what's wrong because I'm able to get a task from the queue, but when I want to delete it, this error is raised.</p>

<p>Does anyone got an insight ?</p>

<p>Should be <code>"s~my-project"</code> if your app is in North America, or <code>"e~my-project"</code> if in Europe.</p>

python google-app-engine pull-queue