#1245 closed defect (fixed)
[patch] 'cannot marshal None unless allow_none is enabled' while executing 'system.multicast()'
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | highest | Component: | XmlRpcPlugin |
Severity: | normal | Keywords: | |
Cc: | paul.gambrell@…, jgoering@… | Trac Release: | 0.11 |
Description (last modified by )
Accessing my Trac 0.10.3 repository through the Mylar plugin for Eclipse using XmlRpcPlugin 0.1, I got this error message when trying to open a ticket.
'cannot marshal None unless allow_none is enabled' while executing 'ticket.changeLog()'
Tickets created by Mylar through XmlRpcPlugin works fine, but not the ones created through the normal Trac web interface.
I realize this is very similar to #550, but that bug was set to be fixed and this problem still exists, so I'm not sure if this is another bug or if I should have reopened the old one. This error occurs in another method, though.
Attachments (4)
Change History (21)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Do you know if the XML-RPC client Mylar uses supports the none
extension? If so I can just enable serialisation with this option enabled.
comment:3 Changed 18 years ago by
Unfortunately I don't know. :-/ I guess the question could be asked in [Mylar's dev mailing list https://dev.eclipse.org/mailman/listinfo/mylar-dev], though.
comment:4 Changed 17 years ago by
Any progress ? I've the same problem. All Bugs with deleted Milestone's can't submit. Even if the Milestone is changed...
Changed 17 years ago by
Attachment: | xmlrpc-trac-0.11.patch added |
---|
Changed 17 years ago by
Attachment: | xmlrpc_ticket_patch_1245.patch added |
---|
comment:5 Changed 17 years ago by
Arg. Ignore that first patch. Wrong file. The second patch has a fix for this. The problem is that authors are null in the changelog for some milestone deletes. This patch changes them to . Alternately, this could be done in Trac itself in the Ticket model.py. But this seems less disruptive.
comment:6 Changed 17 years ago by
I am experiencing the same problem. I would be really happy about a fix. But I wonder about the patch. For me Mylyn complains about a ticket that does indeed have a "Reported by:" that is not empty. Or is this irrelevant?
comment:7 Changed 16 years ago by
I have created an egg from svn-trunk for Trac 0.11, Updating tickets in Eclipse did'nt work, it fails with an error:
'cannot marshal None unless allow_none is enabled' while executing 'ticket.changeLog()'
I can confirm that the patch xmlrpc_ticket_patch_1245.patch fixes this problem. Please commit it to the trunk.
comment:8 Changed 16 years ago by
Cc: | jgoering@… added; anonymous removed |
---|
I have the same problem with 0.11, and the patch does NOT fix the problem.
It seems to occur on queries that have more than 100 results, and it appears the query returns a batch of 100 results, then the "crash" comes with the second query. Would be VERY nice to have this be fixed.
comment:9 Changed 16 years ago by
Oops, correction: the error message I am getting is instead:
'cannot marshal None unless allow_non is enabled' while executing ' system.multicall() '
any thoughts?
comment:10 Changed 16 years ago by
The Trac web interface shows "Anonymous" as the author of the comment that notes the milestone deletion. Perhaps the patch should be:
yield (to_datetime(date), author or 'Anonymous', field, old, new, permanent)
to make the XML-RPC interface jive with the web interface.
comment:11 Changed 16 years ago by
We're on Trac 0.11dev-r6048 and we're trying to standardize on Mylyn but we can't because this is happening. I have tried to determine which field it is that's causing the issue, but it seems to be very random. The age, content and history of the tickets that have this issue are varied... but I have tried modifying the records to adjust the values in them and this has not fixed the issue either.
The tickets I've been working with all have owners _and_ milestones assigned to them and they are still having this problem. Any input would be great.
I take it the above mentioned patch is built-in to 0.11, so I'm not sure what else to try.
comment:12 Changed 16 years ago by
Summary: | 'cannot marshal None unless allow_none is enabled' while executing 'ticket.changeLog()' → 'cannot marshal None unless allow_none is enabled' while executing 'system.multicast()' |
---|---|
Trac Release: | 0.10 → 0.11 |
I have installed the plugin from the trunk with Python 2.5.4 and Trac 0.11. From within Eclipse (Ganymede) I get the system.multicast() version of the error when using Mylyn. I have the added complication that I am using the Agilo plugin to support Scrum. That plugin has customized tickets. Is this error related to the fields appearing in the tickets? If it is, what fields are allowed? With what default values? Thanks in advance for your help with this.
comment:13 Changed 16 years ago by
Cc: | paul.gambrell@… added |
---|
comment:14 Changed 15 years ago by
Description: | modified (diff) |
---|---|
Owner: | changed from Alec Thomas to osimons |
Priority: | normal → highest |
Summary: | 'cannot marshal None unless allow_none is enabled' while executing 'system.multicast()' → [patch] 'cannot marshal None unless allow_none is enabled' while executing 'system.multicast()' |
Can you consider this patch?
Changed 15 years ago by
Attachment: | t2482-normalize_output-r3074.diff added |
---|
Extensive patch that normalizes output - converting datetime and None values correctly.
comment:15 Changed 15 years ago by
Description: | modified (diff) |
---|
Following [6046], I've put some effort into also normalizing the result with a check and transformation of output before it is passed on. This simplifies many methods in that they do not have to worry about so many things.
One of the effects of this patch is that None
objects will never be passed out, instead converted to empty string. Also, it converts datetime
objects to xmlrpclib.DateTime
objects so that all methods should just use and return regular datetime objects as part of result.
Could anyone with more extensive use-cases than mine test this patch, and see that it actually returns sensible data across various calls?
BTW: The revision in the patch name is wrong - apply on top of r6046 or later.
comment:16 Changed 15 years ago by
Description: | modified (diff) |
---|
Seems to work fine. All 178 tests of the Mylyn Trac test suite passed and dates show correctly. Can you also consider the change on #2482 which is related to normalization?
comment:17 Changed 15 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [6054]) XmlRpcPlugin: Reworked to normalize output, so that any method can just return regular Python types as used in Trac - typically unicode, datetime, None. It simplifies many method implementations by not having to convert timestamps, check for stray None
objects and similar.
Bumped version as these internal changes may require changes to other plugins that provide xmlrpc methods.
Among other things, it closes #1245. Thanks for report and testing.
While looking into it further, it seems that I can open some tickets created from the web interface. It further seems that all tickets which cannot be opened share one thing. They where assigned to a milestone which was then deleted. That is, the actual milestone was deleted while still having tickets assigned to it.