Opened 17 years ago

Last modified 2 years ago

#1245 closed defect

[patch] 'cannot marshal None unless allow_none is enabled' while executing 'system.multicast()' — at Version 15

Reported by: henko@… Owned by: osimons
Priority: highest Component: XmlRpcPlugin
Severity: normal Keywords:
Cc: paul.gambrell@…, jgoering@… Trac Release: 0.11

Description (last modified by osimons)

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.

Change History (19)

comment:1 Changed 17 years ago by henko@…

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.

comment:2 Changed 17 years ago by Alec Thomas

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 17 years ago by henko@…

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 karl007@…

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 Dave Gynn

Attachment: xmlrpc-trac-0.11.patch added

Changed 17 years ago by Dave Gynn

comment:5 Changed 17 years ago by Dave Gynn

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 16 years ago by chris@…

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 Wouter Vanden Hove

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 jgoering@…

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 jgoering@…

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 15 years ago by anonymous

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 15 years ago by jrypkahauer@…

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 15 years ago by hawley1@…

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.100.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 15 years ago by anonymous

Cc: paul.gambrell@… added

Changed 15 years ago by Steffen Pingel

Attachment: clipboard.txt added

updated patch

comment:14 Changed 15 years ago by Steffen Pingel

Description: modified (diff)
Owner: changed from Alec Thomas to osimons
Priority: normalhighest
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 osimons

Extensive patch that normalizes output - converting datetime and None values correctly.

comment:15 Changed 15 years ago by osimons

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.

Note: See TracTickets for help on using tickets.