Here is my code:
d = each_data[0].strip().split("\x0a")
works as expected in Windows, but in Linux it throws error below:
TypeError: a bytes-like object is required, not 'str'
each_data[0] contains two lines
Any clue is appreciated, thank you.
Update: Please refer to the script here: https://raw.githubusercontent.com/mdivk/solr_demo/master/scripts/script_p2.py
Environment requirement: python 2.6.6 (sorry I Know this is a low version, it is the built-in python we have on all the CentOS with Cloudera CDH installed, it would be un-realistic to upgrade python in a short time and I need this be fixed in shortest time)
Keep in mind: the code is working as expected in Windows in python 2.7