How to get input from RFID reader in Blender Game Engine?
This may be a problem with the frequent changing of frames (including logic events) in the game engine. Using the subprocess module to start a new process outside of the game engine main loop may solve the problem.

For example, this is what I used to retrieve data from an HTTP server and communicate what I had fetched back to the game engine.

import bge
import subprocess

gD = bge.logic.globalDict

if gD['OS'] == 'Linux':
    saa = subprocess.Popen(gD['ModulePath']+'RetrieveFormData.py', shell=False, stdin=subprocess.PIPE)
    goa = saa.communicate(bytes(gD['ServerIP']+','+gD['InstallationPath'],'utf-8'))
if gD['OS'] == 'Windows':
    saa = subprocess.Popen([sys.executable,gD['ModulePath']+'RetrieveFormData.py'], shell=False, stdin=subprocess.PIPE)
    goa = saa.communicate(bytes(gD['ServerIP']+','+gD['InstallationPath'],'utf-8'))


I hope this provided you with a clue if nothing more.