Opened 16 years ago
Closed 16 years ago
#3922 closed defect (fixed)
coercing to Unicode: need string or buffer, tuple found
Reported by: | anonymous | Owned by: | Louis Cordier |
---|---|---|---|
Priority: | normal | Component: | FreemindMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
Hi,
I installed the FreeMindMacro, however when I am trying to call a file embedded in a wiki page I get the following:
Error: Macro Freemind(wiki://WikiPageName/filename.mm?) failed
coercing to Unicode: need string or buffer, tuple found
Thanks!
Attachments (0)
Change History (4)
comment:1 Changed 16 years ago by
comment:2 Changed 16 years ago by
As you can see in the diff I only moved the position of kwargs = string_keys(kwargs)
.
In [4520] I have updated that parsing to strict=True, this will only affect you if you had '=' signs in you url. I cannot replicate your error, but I added debug code to the sting_keys(kwargs)
call. If the problem still persist, please paste the error output so that I have more information to go on.
From the ticket description you have
Error: Macro Freemind(wiki://WikiPageName/filename.mm) failed
am I correct in assuming that you have a wiki-page named WikiPageName and you actually attached a file named filename.mm to that page ?
comment:3 Changed 16 years ago by
Thanks for the help so far. I do have the wiki page and the mind map names as above. Here is my debug log output after using your latest version of the macro.
2008-10-20 08:37:35,533 Trac[formatter] DEBUG: Executing Wiki macro Freemind by provider <freemind.macro.FreemindMacro object at 0xb79bd3ac> 2008-10-20 08:37:35,535 Trac[formatter] ERROR: Macro Freemind(wiki://GemsBmcUsage/filename.mm?) failed Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/wiki/formatter.py", line 468, in _macro_formatter
return macro.process(args, in_paragraph=True)
File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/wiki/formatter.py", line 179, in process
text = self.processor(text)
File "/usr/lib/python2.4/site-packages/Trac-0.11-py2.4.egg/trac/wiki/formatter.py", line 166, in _macro_processor
text)
File "build/bdist.linux-i686/egg/freemind/macro.py", line 132, in expand_macro File "build/bdist.linux-i686/egg/freemind/macro.py", line 48, in get_absolute_url
TypeError: coercing to Unicode: need string or buffer, tuple found 2008-10-20 08:37:35,594 Trac[main] DEBUG: 734 unreachable objects found.
comment:4 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ah I see between version 4500 and 4514 in SVN that you introduced the usage of the string_args unicode to string keys. I believe that might be giving me the problem. I don't know if it makes a difference or not but I'm on Python 2.4 on RHEL5.
.svn000.tmp.py
kwargs = string_keys(kwargs)