#11434 closed defect (fixed)
TypeError: get_tagged_resources() takes exactly 3 arguments (2 given) 0.7dev_r13434
| Reported by: | Owned by: | Steffen Hoffmann | |
|---|---|---|---|
| Priority: | normal | Component: | TagsPlugin |
| Severity: | minor | Keywords: | |
| Cc: | Trac Release: | 1.0 |
Description
for TracTag trunk 0.7dev_r13434-
We expirienced an error in trac installation Trac 1.0.1 wheezy packports.
fixed in Fallback for older provider section in function get_all_tags
root@example /usr/local/lib/python2.7/dist-packages/TracTags-0.7dev_r13434-py2.7.egg/tractags $ diff -u api.py.dist api.py | colordiff
--- api.py.dist 2013-12-08 15:30:30.000000000 +0100
+++ api.py 2013-12-08 15:40:46.000000000 +0100
@@ -378,7 +378,7 @@
all_tags += provider.get_all_tags(req)
except AttributeError:
# Fallback for older providers.
- for resource, tags in provider.get_tagged_resources(req):
+ for resource, tags in provider.get_tagged_resources(req, None):
all_tags.update(tags)
return all_tags
Attachments (0)
Change History (7)
comment:1 Changed 12 years ago by
comment:3 Changed 12 years ago by
The changes in r13461 will fix the issue for ScreenshotsPlugin too, because its tag provider inherits the get_tagged_resources from tractags.api.DefaultTagProvider. I filed ticket #11435 against FullBlogPlugin to fix it for the only other plugin I'm aware of (searching only t-h.o, YMMV).
comment:4 Changed 12 years ago by
Funny enough, we did the same amends you did with [13461] first, but to no avail. But now it's perfectly clear: In fact we have FullBlogPlugin installed but failed in reasoning this was the culprit in this case.
We will check with current trunk and fix for FullBlogPlugin from patch of #11435 tomorrow.
Thanks a bunch!
comment:5 follow-up: 7 Changed 12 years ago by
Replying to hasienda:
In 13461: TagsPlugin: Make tag providers conform to interface definition, refs #11434.
Why leave out the filter=Noneargument for the ticket implementation? If filter is part of API, then surely all implementations should also be able to handle it as input?
BTW, #11435 is now fixed so just refresh to latest FullBlogPlugin source.
comment:6 Changed 12 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
Hey, i tested it as well. It is working. Thanks a lot. That was fast. Thanks
comment:7 Changed 12 years ago by
Replying to osimons:
Replying to hasienda:
In 13461: TagsPlugin: Make tag providers conform to interface definition, refs #11434.
Why leave out the
filter=Noneargument for the ticket implementation? Iffilteris part of API, then surely all implementations should also be able to handle it as input?
Agreed. This has been fixed in [13799].



Thanks for reporting your observation. What
ITagProviderthrows that exception?You patch is a work-around for a provider, that does not strictly conform to the tag provider interface definition (see the
ITagProviderclass definition in tractags/api.py). I'd see that fixed rather than the call insideTagSystem. Huch, I just see, that evenDefaultTagProviderhas such a bad method signature - will change that right now.