ERPNext Conference 2019* Blog

V12 TypeError: can't compare to unicode


Any opinions here guys ? :slight_smile:

An ongoing issue which I don’t know if it’s something I can fix or perhaps a bug.


hi @Iulian_Olaru ,
Can you show…how do you set the date to these two variables start_date and today_date ?
Becoz you are comparing both date and time…!


Hey Arokia,
Here’s a screenshot of how the auto repeat settings look.


@Iulian_Olaru Check whether it is a date field or date and time field and then if it is date field try to get these two dates in a variable and use in the if condition…it will work.


Well that sounds out of the ordinary - these fields are supposed to have the correct settings as they’re native directly from the system.

I will check but I don’t understand what to do regarding getting the dates in a variable etc…

LATE EDIT: In doctype the date fields of the auto repeat appear to be date fields, not date and time


What have you mentioned as today_date?


Obviously the date of today haha

Should it be something else ? perhaps the day of the task start date ?

LATE EDIT: I tried this also - error is the same


@Iulian_Olaru yes its your todays date but want i mean is in what format are you getting the todays date?
today_date = now_datetime().strftime(DATE_FORMAT)
from frappe.utils import flt, DATE_FORMAT,TIME_FORMAT,nowdate
Use this and try…!


Sorry because I’m not as advanced to understand what to do with the code you wrote…

Please tell me where to put it haha… your assistance is very much appreciated !


from frappe.utils import flt, DATE_FORMAT,TIME_FORMAT,nowdate
copy and paste the above code in top import function.
today_date = now_datetime().strftime(DATE_FORMAT)
if start_date <= today_date:
Use like this…!!hope you understand.


No unfortunately I’ve never done such a setting… I don’t know where frappe.utils is … I am so sorry :-))

I will keep looking to try to discover it.


@Iulian_Olaru let me help you.can you share your screen


what did you write in code for today_date? the format matters a lot


Yes I can. Let me know what you need to share. Teamviewer etc.

Thank you again :slight_smile:


yes. send me the teamviewer id?


Yeah so after @arokia has been working on some things inside apps/frappe/frappe/automation/doctype/auto_repeat/ – we can say that there’s something significantly wrong with the auto repeat.

For me as a consumer basically who rely on the software to work out of the box, I must say I am a bit surprised that Erpnext / frappe has released something which basically doesn’t work.

Further more, also as a consumer I am surprised of the lack of action on behalf of erpnext / frappe officials to actually establish contact and address this bug even with a simple reply “we will check”

Of course, I understand the busy times behind the screens but still … customer service is customer service or perhaps I am understanding something in the wrong way.

Anyway, ERPNext has proved to be the best solution for our companies and we are now using the systems for our daily operations.



You seem genuinely not surprised you get all this for nothing?

Do recognize and accept that no one is obligated to support nor use this product.


I’ve seen this reply from you on many other posts and in some degree I agree.

However, nobody said me personally I am expecting this software to be free, I am perfectly willing to pay and even to sponsor some developments… unfortunately until now I was only hit by unprofessionalism in regards to companies who could develop anything inside erpnext… Indian companies focused on the money not even listening to the ideas I have for what I need.

Moving forward and not to deviate from the subject, related to your comment, be that as it may Clark but why release anything if it doesn’t work anyway ? Do you get the point ? this is about it’s usefulness … is it useful or useless ? hours of work for nothing because nobody can use it.

Even so, information could have helped to know it doesn’t work because the only reason I upgraded from v11 to v12 was the auto repeat function.


So let’s not leave this bug alive forever, can we at least identify a solution to it ? or perhaps someone acknowledge it ?


fixed in:
It will be deployed soon

Cannot create auto repeat