Modify

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5816 closed defect (fixed)

Trac Timeline Error: TypeError: expected string without null bytes

Reported by: apokrzywinski Owned by: roadrunner
Priority: normal Component: HudsonTracPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description (last modified by otaku42)

Hi,

I have just installed hudson and trac and make hudson run a project job.

After installing the hudson trac plug in, I get this error on the timeline:

Hudson Builds event provider (HudsonTracPlugin) failed:
TypeError: expected string without null bytes

The feed url is: http://localhost:8085/hudson/rssAll since trac and hudson run on the same machine.

The log:

2009-09-14 08:11:06,591 Trac[web_ui] ERROR: Timeline event provider failed:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/timeline/web_ui.py", line 160, in process_request
    filters):
  File "build/bdist.linux-i686/egg/HudsonTrac/HudsonTracPlugin.py", line 145, in get_timeline_events
    json = eval(line.replace('false', 'False').replace('true','True').replace('null', 'None'))
TypeError: expected string without null bytes

Thanks for your work and help!

Regards

Andreas

Attachments (0)

Change History (6)

comment:1 Changed 5 years ago by otaku42

  • Description modified (diff)

comment:2 in reply to: ↑ description ; follow-up: Changed 5 years ago by roadrunner

Replying to apokrzywinski:

The log:

2009-09-14 08:11:06,591 Trac[web_ui] ERROR: Timeline event provider failed:
Traceback (most recent call last):
  File "/usr/lib/python2.5/site-packages/Trac-0.11.5-py2.5.egg/trac/timeline/web_ui.py", line 160, in process_request
    filters):
  File "build/bdist.linux-i686/egg/HudsonTrac/HudsonTracPlugin.py", line 145, in get_timeline_events
    json = eval(line.replace('false', 'False').replace('true','True').replace('null', 'None'))
TypeError: expected string without null bytes


Ok, this is a problem while retrieving the build info in order to get
the build descriptions. As a short-term fix you can set the
display_build_descriptions option for this plugin to false, which
will prevent the plugin from trying to retrieve the build info.

However, I have no idea why there are null bytes in that info and I
don't have a setup that reproduces this here. So, can I ask you to
help out? Specifically, what I'd need is for you to:

  1. Add this line just before line 145
    self.env.log.info("parsing description from '%s': '%s'" % (url, line))
    
  2. Show me the last of the resulting log entries (i.e. the one that is failing)
  3. Maybe also retrieve that url in the last log entry and store it in a file (e.g. using something like curl -o job.info '...'), and attach that file to this ticket. The reason is that I don't know if the null byte will be visible in the log message, so getting the raw binary output might help.

TIA.

comment:3 in reply to: ↑ 2 ; follow-ups: Changed 5 years ago by apokrzywinski

Hi,

Thanks for the respond.

Your short-term fix worked.

  1. Show me the last of the resulting log entries (i.e. the one that is failing)
2009-09-14 14:59:36,536 Trac[HudsonTracPlugin] INFO: parsing description from 'http://www.mobilesticket.de:8445/hudson/job/core/26//api/json': '^U^C^A^@^B^B

I am not sure about the encoding here. Edited with less and c&p out of putty.

  1. Maybe also retrieve that url in the last log entry and store it in a file (e.g. using something like curl -o job.info '...'), and attach that file to this ticket. The reason is that I don't know if the null byte will be visible in the log message, so getting the raw binary output might help.

See attached file.

comment:4 in reply to: ↑ 3 Changed 5 years ago by anonymous

Hmm, cannot attache file:
500 Internal Server Error (Submission rejected as potential spam (Maximum number of external links per post exceeded))

:-(

comment:5 in reply to: ↑ 3 ; follow-up: Changed 5 years ago by roadrunner

Replying to apokrzywinski:

2009-09-14 14:59:36,536 Trac[HudsonTracPlugin] INFO: parsing description from 'http://www.mobilesticket.de:8445/hudson/job/core/26//api/json': '^U^C^A^@^B^B

I am not sure about the encoding here. Edited with less and c&p out of putty.

Well, that data certainly looks bogus. I don't think it's an encoding
issue, though, as that typically looks different - this looks like
binary.

And indeed, I just accessed that URL and get the same binary gunk.
Something's weird in your setup: I get the same gunk, even trying to
access http://www.mobilesticket.de:8445/ . Is hudson supposed to be
accessible at that location? Otherwise it looks like you may need to
change the URL in hudson (Manage Hudson -> Configure System -> Hudson
URL).

comment:6 in reply to: ↑ 5 Changed 5 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to closed

And indeed, I just accessed that URL and get the same binary gunk.
Something's weird in your setup: I get the same gunk, even trying to
access http://www.mobilesticket.de:8445/ . Is hudson supposed to be
accessible at that location? Otherwise it looks like you may need to
change the URL in hudson (Manage Hudson -> Configure System -> Hudson
URL).

Yeah, that was it. My eye didn't catch up the difference between http and https. After changing the URL in hudson to https, it works.

Thanks for you quick help and keep up the great work.

Bye

Andreas

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.