I am not able to insert uni coded string to couchbase server

I am using Python 2.7.9 with coucbhase 3

This is my code to insert to couchbase using Python SDK

from couchbase import Couchbase 
        connection = Couchbase.connect(bucket='default') #create connection to the couchbase database
        connection.set(fileName, dict(item)) #write the item to the couchbase database

Where fileName is a unique ID and item is an instance of class like this:
flexibleItem = FlexibleItem()
flexibleItem['location'] = "UAE \u202a>\u202a Dubai \u202a>\u202a The Palm Jumeirah ; 3.4 km from Dubai Media City \u00a0"

I got this exception:

couchbase.exceptions.ValueFormatError: <Couldn't encode value, inner_cause='ascii' codec can't decode byte 0xe2 in position 5: ordinal not in range(128),

though i already change the value to utf8 using this code:

value = value.encode(‘utf-8’, ‘ignore’)

The default format for .set() is JSON, which means it is passed to the default JSON encoder; which expects either a Python unicode object, or a Python str convertible to unicode. Rather than doing value.encode(utf-8), you should be doing value.decode(utf-8).

Note that your example works as-is (The \uXXXX form doesn’t really seem to work unless the string itself is declared as u"\u202a"

@mnunberg - Any help how can I resolve my problem ? I am on CB 6.0 . I am getting this while loading data from Oracle to CB . And I am using Python and cb.insert .

couchbase.exceptions.ValueFormatError: <Couldn’t encode value, inner_cause=Object of type Decimal is not JSON serializable, C Source=(src/convert.c,146),

Couchbase is pointing errors somewhere like : EXCHANGE_RATE_TO_EUR’: Decimal(‘0.887079’),

thanks