Bug 1265419 - [abrt] chm2pdf: sgmllib.py:103:feed:TypeError: cannot concatenate 'str' and 'NoneType' objects
[abrt] chm2pdf: sgmllib.py:103:feed:TypeError: cannot concatenate 'str' and '...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: chm2pdf (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Pavel Alexeev
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:3b5dd13f37914f047303a840b27...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-22 17:26 EDT by Raphael Groner
Modified: 2015-12-21 08:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-21 08:11:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (724 bytes, text/plain)
2015-09-22 17:26 EDT, Raphael Groner
no flags Details
File: environ (3.98 KB, text/plain)
2015-09-22 17:26 EDT, Raphael Groner
no flags Details
fuzzynet.chm (GPLv2) (87.36 KB, text/plain)
2015-09-22 17:30 EDT, Raphael Groner
no flags Details

  None (edit)
Description Raphael Groner 2015-09-22 17:26:32 EDT
Description of problem:
chm2pdf --book fuzzynet.chm

Version-Release number of selected component:
chm2pdf-0.9.1-17.fc23

Additional info:
reporter:       libreport-2.6.2
cmdline:        /usr/bin/python /usr/bin/chm2pdf --book fuzzynet.chm
dso_list:       python-libs-2.7.10-8.fc23.x86_64
executable:     /usr/bin/chm2pdf
kernel:         4.2.0-300.fc23.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
sgmllib.py:103:feed:TypeError: cannot concatenate 'str' and 'NoneType' objects

Traceback (most recent call last):
  File "/usr/bin/chm2pdf", line 1116, in <module>
    main(sys.argv)
  File "/usr/bin/chm2pdf", line 1110, in main
    convert_to_pdf(cfile, filename, outputfilename, options)
  File "/usr/bin/chm2pdf", line 331, in convert_to_pdf
    html_list=get_html_list(cfile)
  File "/usr/bin/chm2pdf", line 106, in get_html_list
    lister.feed(topicstree)
  File "/usr/lib64/python2.7/sgmllib.py", line 103, in feed
    self.rawdata = self.rawdata + data
TypeError: cannot concatenate 'str' and 'NoneType' objects

Local variables in innermost frame:
self: <__main__.PageLister instance at 0x7fbd1e56eea8>
data: None
Comment 1 Raphael Groner 2015-09-22 17:26:36 EDT
Created attachment 1076044 [details]
File: backtrace
Comment 2 Raphael Groner 2015-09-22 17:26:37 EDT
Created attachment 1076045 [details]
File: environ
Comment 3 Raphael Groner 2015-09-22 17:30 EDT
Created attachment 1076046 [details]
fuzzynet.chm (GPLv2)

downloaded from 
http://sourceforge.net/projects/fuzzynet/files/fuzzynet/fuzzynet%20v1.2.0%20%28be
ta%29/fuzzynet_1_2_0.chm
Comment 4 Pavel Alexeev 2015-12-12 11:52:57 EST
Hm.

It works for me:

$ chm2pdf --book fuzzynet_1_2_0.chm 
PAGES: 394
BYTES: 1239185                                                                 
Written file fuzzynet_1_2_0.pdf
Done.

How it reproducible?
What python version are you use?
Comment 5 Raphael Groner 2015-12-21 08:11:39 EST
First, sorry for the long delay of my answer.

But still with the *original* file content:

> chm2pdf --book fuzzynet.chm 
GetArchiveInfo: #SYSTEM does not exist
Traceback (most recent call last):
  File "/usr/bin/chm2pdf", line 1116, in <module>
    main(sys.argv)
  File "/usr/bin/chm2pdf", line 1110, in main
    convert_to_pdf(cfile, filename, outputfilename, options)
  File "/usr/bin/chm2pdf", line 331, in convert_to_pdf
    html_list=get_html_list(cfile)
  File "/usr/bin/chm2pdf", line 106, in get_html_list
    lister.feed(topicstree)
  File "/usr/lib64/python2.7/sgmllib.py", line 103, in feed
    self.rawdata = self.rawdata + data
TypeError: cannot concatenate 'str' and 'NoneType' objects

I downloaded the file back from rhbz attachment, and all is fine now:

> chm2pdf --book fuzzynet-1.2.0.chm 
PAGES: 394
BYTES: 1239185                                                                 
Written file fuzzynet-1.2.0.pdf
Done.


> head -1 /usr/bin/chm2pdf 
#!/usr/bin/python

> /usr/bin/python --version
Python 2.7.10

In the meantime, as a workaround I use chmlib instead of chm2pdf. 

> extract_chmLib fuzzynet-1.2.0.chm html
../../SOURCES/fuzzynet-1.2.0.chm:
--> /#IDXHDR
--> /#ITBITS
--> /#STRINGS
--> /#SYSTEM
--> /#TOCIDX
--> /#TOPICS
--> /#URLSTR
--> /#URLTBL
--> /#WINDOWS
--> /$FIftiMain
--> /$OBJINST
--> /$WWAssociativeLinks/Property
--> /$WWKeywordLinks/BTree
--> /$WWKeywordLinks/Data
--> /$WWKeywordLinks/Map
--> /$WWKeywordLinks/Property
--> /AI.Fuzzy.Library.AggregationMethod.html
--> /AI.Fuzzy.Library.AndMethod.html
--> /AI.Fuzzy.Library.Conditions.ConditionsList.html
--> /AI.Fuzzy.Library.Conditions.html
--> /AI.Fuzzy.Library.Conditions.Not.html
--> /AI.Fuzzy.Library.Conditions.Op.html
--> /AI.Fuzzy.Library.ConditionsConstructor.html
--> /AI.Fuzzy.Library.ConditionsMembers.html
--> /AI.Fuzzy.Library.ConditionsProperties.html
--> /AI.Fuzzy.Library.ConstantMembershipFunction.GetValue.html
--> /AI.Fuzzy.Library.ConstantMembershipFunction.html
--> /AI.Fuzzy.Library.ConstantMembershipFunctionConstructor.html
--> /AI.Fuzzy.Library.ConstantMembershipFunctionMembers.html
--> /AI.Fuzzy.Library.ConstantMembershipFunctionMethods.html
--> /AI.Fuzzy.Library.DefuzzificationMethod.html
--> /AI.Fuzzy.Library.FuzzyCondition.Hedge.html
--> /AI.Fuzzy.Library.FuzzyCondition.html
--> /AI.Fuzzy.Library.FuzzyConditionMembers.html
--> /AI.Fuzzy.Library.FuzzyConditionProperties.html
--> /AI.Fuzzy.Library.FuzzyTerm.html
--> /AI.Fuzzy.Library.FuzzyTerm.MembershipFunction.html
--> /AI.Fuzzy.Library.FuzzyTermConstructor.html
--> /AI.Fuzzy.Library.FuzzyTermMembers.html
--> /AI.Fuzzy.Library.FuzzyTermProperties.html
--> /AI.Fuzzy.Library.FuzzyVariable.GetTermByName.html
--> /AI.Fuzzy.Library.FuzzyVariable.html
--> /AI.Fuzzy.Library.FuzzyVariable.Max.html
--> /AI.Fuzzy.Library.FuzzyVariable.Min.html
--> /AI.Fuzzy.Library.FuzzyVariable.Terms.html
--> /AI.Fuzzy.Library.FuzzyVariable.Values.html
--> /AI.Fuzzy.Library.FuzzyVariableConstructor.html
--> /AI.Fuzzy.Library.FuzzyVariableMembers.html
--> /AI.Fuzzy.Library.FuzzyVariableMethods.html
--> /AI.Fuzzy.Library.FuzzyVariableProperties.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.Condition.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.CreateCondition_overload_1.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.CreateCondition_overload_2.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.CreateCondition_overload_3.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.CreateCondition_overloads.html
--> /AI.Fuzzy.Library.GenericFuzzyRule.html
--> /AI.Fuzzy.Library.GenericFuzzyRuleConstructor.html
--> /AI.Fuzzy.Library.GenericFuzzyRuleMembers.html
--> /AI.Fuzzy.Library.GenericFuzzyRuleMethods.html
--> /AI.Fuzzy.Library.GenericFuzzyRuleProperties.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.AndMethod.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.EvaluateCondition.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.Fuzzify.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.Input.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.InputByName.html
--> /AI.Fuzzy.Library.GenericFuzzySystem.OrMethod.html
--> /AI.Fuzzy.Library.GenericFuzzySystemConstructor.html
--> /AI.Fuzzy.Library.GenericFuzzySystemMembers.html
--> /AI.Fuzzy.Library.GenericFuzzySystemMethods.html
--> /AI.Fuzzy.Library.GenericFuzzySystemProperties.html
--> /AI.Fuzzy.Library.HedgeType.html
--> /AI.Fuzzy.Library.html
--> /AI.Fuzzy.Library.ICondition.html
--> /AI.Fuzzy.Library.IMembershipFunction.GetValue.html
--> /AI.Fuzzy.Library.IMembershipFunction.html
--> /AI.Fuzzy.Library.IMembershipFunctionMembers.html
--> /AI.Fuzzy.Library.IMembershipFunctionMethods.html
--> /AI.Fuzzy.Library.ImplicationMethod.html
--> /AI.Fuzzy.Library.INamedValue.html
--> /AI.Fuzzy.Library.INamedValue.Name.html
--> /AI.Fuzzy.Library.INamedValueMembers.html
--> /AI.Fuzzy.Library.INamedValueProperties.html
--> /AI.Fuzzy.Library.INamedVariable.html
--> /AI.Fuzzy.Library.INamedVariable.Name.html
--> /AI.Fuzzy.Library.INamedVariable.Values.html
--> /AI.Fuzzy.Library.INamedVariableMembers.html
--> /AI.Fuzzy.Library.INamedVariableProperties.html
--> /AI.Fuzzy.Library.ISugenoFunction.Evaluate.html
--> /AI.Fuzzy.Library.ISugenoFunction.html
--> /AI.Fuzzy.Library.ISugenoFunctionMembers.html
--> /AI.Fuzzy.Library.ISugenoFunctionMethods.html
--> /AI.Fuzzy.Library.LinearSugenoFunction.ConstValue.html
--> /AI.Fuzzy.Library.LinearSugenoFunction.Evaluate.html
--> /AI.Fuzzy.Library.LinearSugenoFunction.GetCoefficient.html
--> /AI.Fuzzy.Library.LinearSugenoFunction.html
--> /AI.Fuzzy.Library.LinearSugenoFunction.SetCoefficient.html
--> /AI.Fuzzy.Library.LinearSugenoFunctionMembers.html
--> /AI.Fuzzy.Library.LinearSugenoFunctionMethods.html
--> /AI.Fuzzy.Library.LinearSugenoFunctionProperties.html
--> /AI.Fuzzy.Library.MamdaniFuzzyRule.Conclusion.html
--> /AI.Fuzzy.Library.MamdaniFuzzyRule.html
--> /AI.Fuzzy.Library.MamdaniFuzzyRule.Weight.html
--> /AI.Fuzzy.Library.MamdaniFuzzyRuleMembers.html
--> /AI.Fuzzy.Library.MamdaniFuzzyRuleProperties.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Aggregate.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.AggregationMethod.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Calculate.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.DefuzzificationMethod.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Defuzzify.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.EmptyRule.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.EvaluateConditions.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Implicate.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.ImplicationMethod.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Output.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.OutputByName.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.ParseRule.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystem.Rules.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystemConstructor.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystemMembers.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystemMethods.html
--> /AI.Fuzzy.Library.MamdaniFuzzySystemProperties.html
--> /AI.Fuzzy.Library.MfCompositionType.html
--> /AI.Fuzzy.Library.NamedValueImpl.html
--> /AI.Fuzzy.Library.NamedValueImpl.Name.html
--> /AI.Fuzzy.Library.NamedValueImplConstructor.html
--> /AI.Fuzzy.Library.NamedValueImplMembers.html
--> /AI.Fuzzy.Library.NamedValueImplProperties.html
--> /AI.Fuzzy.Library.NamedVariableImpl.html
--> /AI.Fuzzy.Library.NamedVariableImpl.Name.html
--> /AI.Fuzzy.Library.NamedVariableImpl.Values.html
--> /AI.Fuzzy.Library.NamedVariableImplConstructor.html
--> /AI.Fuzzy.Library.NamedVariableImplMembers.html
--> /AI.Fuzzy.Library.NamedVariableImplProperties.html
--> /AI.Fuzzy.Library.NormalMembershipFunction.B.html
--> /AI.Fuzzy.Library.NormalMembershipFunction.GetValue.html
--> /AI.Fuzzy.Library.NormalMembershipFunction.html
--> /AI.Fuzzy.Library.NormalMembershipFunction.Sigma.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionConstructor.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionConstructor1.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionConstructor2.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionMembers.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionMethods.html
--> /AI.Fuzzy.Library.NormalMembershipFunctionProperties.html
--> /AI.Fuzzy.Library.OperatorType.html
--> /AI.Fuzzy.Library.OrMethod.html
--> /AI.Fuzzy.Library.SingleCondition`2.html
--> /AI.Fuzzy.Library.SingleCondition`2.Not.html
--> /AI.Fuzzy.Library.SingleCondition`2.Term.html
--> /AI.Fuzzy.Library.SingleCondition`2.Var.html
--> /AI.Fuzzy.Library.SingleCondition`2Members.html
--> /AI.Fuzzy.Library.SingleCondition`2Properties.html
--> /AI.Fuzzy.Library.SugenoFuzzyRule.Conclusion.html
--> /AI.Fuzzy.Library.SugenoFuzzyRule.html
--> /AI.Fuzzy.Library.SugenoFuzzyRuleMembers.html
--> /AI.Fuzzy.Library.SugenoFuzzyRuleProperties.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.Calculate.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.CombineResult.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.CreateSugenoFunction_overload_1.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.CreateSugenoFunction_overload_2.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.CreateSugenoFunction_overloads.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.EmptyRule.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.EvaluateConditions.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.EvaluateFunctions.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.Output.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.OutputByName.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.ParseRule.html
--> /AI.Fuzzy.Library.SugenoFuzzySystem.Rules.html
--> /AI.Fuzzy.Library.SugenoFuzzySystemConstructor.html
--> /AI.Fuzzy.Library.SugenoFuzzySystemMembers.html
--> /AI.Fuzzy.Library.SugenoFuzzySystemMethods.html
--> /AI.Fuzzy.Library.SugenoFuzzySystemProperties.html
--> /AI.Fuzzy.Library.SugenoVariable.Functions.html
--> /AI.Fuzzy.Library.SugenoVariable.GetFuncByName.html
--> /AI.Fuzzy.Library.SugenoVariable.html
--> /AI.Fuzzy.Library.SugenoVariable.Values.html
--> /AI.Fuzzy.Library.SugenoVariableConstructor.html
--> /AI.Fuzzy.Library.SugenoVariableMembers.html
--> /AI.Fuzzy.Library.SugenoVariableMethods.html
--> /AI.Fuzzy.Library.SugenoVariableProperties.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.GetValue.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.X1.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.X2.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.X3.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunction.X4.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionConstructor.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionConstructor1.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionConstructor2.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionMembers.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionMethods.html
--> /AI.Fuzzy.Library.TrapezoidMembershipFunctionProperties.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.GetValue.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.ToNormalMF.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.X1.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.X2.html
--> /AI.Fuzzy.Library.TriangularMembershipFunction.X3.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionConstructor.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionConstructor1.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionConstructor2.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionMembers.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionMethods.html
--> /AI.Fuzzy.Library.TriangularMembershipFunctionProperties.html
--> /AI.Fuzzy.LibraryHierarchy.html
--> /Documentation.hhc
--> /Documentation.hhk
--> /MSDN.css
--> /protmethod.gif
--> /pubmethod.gif
--> /pubproperty.gif

Note You need to log in before you can comment on or make changes to this bug.