Python Error: UnicodeEncodeError: ‘charmap’ codec can’t encode character

Question: I’ve discovered an error on your example ( ) as follows… AccountID: f1f489fb-9267-429e-a1dc-bc63a7c3f71e Traceback (most recent call last): File “M:\EXPORTIT\PY\”, line 50, in print(“Name: ” + xml.GetChildContent(“Accounts|Account[i]|Name”)) File “m:\Python\Python35-32\lib\encodings\”, line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: ‘charmap’ codec can’t encode character ‘\u2013′ in position 20: character maps to It’s failing on the this line from the “”, Wages […]

Using Chilkat Python in AWS Lambda

Question: Do you know of an easy way to package up the python chilkat so that AWS Lambda supports it? Answer (Generously provided by Chilkat’s customer) “It ended up being easier than expected. Just untar the chilkat python download you provide, cd into the dir and zip the contents. With that zip file you can provide that to AWS Lambda […]

CkPython vs. Chilkat2-Python

Question: Should I use CKPython or Chilkat2-Python for a new development (environment = Windows and Python 3.6) What’s the difference between these? Answer: The CkPython API is the original Chilkat for Python API that uses something called SWIG ( to produce the Python wrappers around the C/C++ implementation.  The result is that CkPython API has a style with more a […]

Using chilkat.SYSTEMTIME in Python

Demonstrates how to create and populate a chilkat. SYSTEMTIME object in Python. import sys import chilkat email = chilkat.CkEmail() sysTime = chilkat.SYSTEMTIME(); # The SYSTEMTIME structure has the following members: # wYear (such as 2011) # wMonth (1 = January, 12 = December) # wDayOfWeek (0 to 6, where 0 = Sunday 1 = Monday, … 6 = Sunday) # […]

(Python) Using strings returned from sqlite3

In  the Python programming language, the strings returned from sqlite3 are unicode, not 8-bit strings. Chilkat API methods with string arguments expect either ANSI or utf-8 8-bit strings.  See these Python examples: A unicode string returned from sqlite3 must be converted to an 8-bit string by using “str”, as shown below: … email.put_Subject(str(unicodeStr)) …

Chilkat v9.1.0 for Linux – Python 2.5, 2.6 ready for Beta testing

Download 64-bit Python 2.5: chilkat-9.1.0-Python-2.5-x86_64-linux.tar.gz 64-bit Python 2.6: chilkat-9.1.0-Python-2.6-x86_64-linux.tar.gz 32-bit Python 2.5: chilkat-9.1.0-Python-2.5-i686-linux.tar.gz 32-bit Python 2.6: chilkat-9.1.0-Python-2.6-i686-linux.tar.gz Install Instructions Login as root and decompress and unpackfrom the root (“/”) directory. su cd / gzip -dc chilkat-9.1.0-python-2.5-linux-x86_64.tar.gz | tar -xof – That’s all.  However, please read the information below to find out where the files are unpacked. If your Python install […]