docphp icon indicating copy to clipboard operation
docphp copied to clipboard

TypeError: can only concatenate tuple (not "str") to tuple

Open ovidiugabriel opened this issue 6 years ago • 7 comments

After a fresh installation. I typed strpos($haystack, $needle); in a php script then right click, DocPHP: Show Definition. In the console I can see the following backtrace.

Traceback (most recent call last):
  File "/opt/sublime_text/sublime_plugin.py", line 1082, in run_
    return self.run(edit, **args)
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 331, in run
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 344, in show_popup
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 412, in formatPopup
  File "./python3.3/html/parser.py", line 145, in feed
  File "./python3.3/html/parser.py", line 189, in goahead
  File "./python3.3/html/parser.py", line 372, in parse_starttag
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 528, in handle_startendtag
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 557, in get_tag_text
  File "/home/ovidiu/.config/sublime-text-3/Installed Packages/DocPHPManualer.sublime-package/docphp.py", line 557, in <lambda>
TypeError: can only concatenate tuple (not "str") to tuple

ovidiugabriel avatar Jun 06 '19 12:06 ovidiugabriel

Same happens to me.

paveljanda avatar Jun 12 '19 14:06 paveljanda

Same here

Gandhard avatar Feb 11 '20 15:02 Gandhard

+1

gregorip02 avatar Mar 18 '20 00:03 gregorip02

Same!

manticorp avatar Dec 08 '20 09:12 manticorp

Same

freemansdev avatar Mar 08 '21 11:03 freemansdev

same

StephaneAxmaPresse avatar Feb 01 '23 16:02 StephaneAxmaPresse

The solution to this problem was found for ST 4. It is necessary in DocPHPManualer.sublime-package archive to change the file docphp.py starting from line 557 correct the function as follows: def get_tag_text(self, tag, attrs, is_startend=False): t='' if type(attrs) == dict: for key in attrs: t=t+ key + '="' + attrs[key] + '"' return '<'+ tag + ' ' + t + (' />' if is_startend else '>')

giratek avatar Mar 26 '23 07:03 giratek