Opened 5 years ago

Closed 5 years ago

Last modified 3 years ago

#12778 closed defect (fixed)

AttributeError: 'NoneType' object has no attribute 'read'

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Component: IncludeMacro
Severity: normal Keywords:
Cc: Trac Release:


[[Include(source:)]] leads to an error:

2016-05-16 16:57:47,817 Trac[formatter] ERROR: Macro Include(source:) failed:
Traceback (most recent call last):
  File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/", line 793, in _macro_formatter
    return macro.ensure_inline(macro.process(args))
  File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/", line 362, in process
    text = self.processor(text)
  File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/trac/wiki/", line 349, in _macro_processor
  File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/includemacro/", line 121, in expand_macro
  File "/usr/local/virtualenv/1.0-stable/lib/python2.7/site-packages/includemacro/", line 196, in _get_source
    out = node.get_content().read()
AttributeError: 'NoneType' object has no attribute 'read'

Attachments (0)

Change History (2)

comment:1 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

In 15552:

3.0.0dev: Avoid AttributeError when resource not specified

Fixes #12778.

comment:2 Changed 3 years ago by Ryan J Ollos

In 17157:

TracIncludeMacro 3.2.0dev: Fix regression in r15552

The regression prevented specifying the mimetype
when rendering a file from the repository.

Closes #4004, Refs #12778.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

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

Note: See TracTickets for help on using tickets.