I have this code
Date = site.xpath('my xpath').extract()[0]
print "DDDDDDDDDDDDDDDDDDDDDD= "+Date
DateString = Date.split()
DayString = DateString[0]
MonthString = DateString[1]
Year = DateString[2]
Day = getDayOfDate(DayString)
Month = getMonthOfDate(MonthString)
print "Type Year = "+type(Year)
print "Month = "+Month+" Year = "+Year
I got this error
exceptions.TypeError: cannot concatenate 'str' and 'NoneType' objects
when I print the Year, I got 2014
It seems that the Month is None
this is the exception
**New Exception *****
exceptions.TypeError: cannot concatenate 'str' and 'int' objects
getMonthOfDate.