Jump to content
The simFlight Network Forums
Jason Fayre

problem when retrieving strings using the pyuipc python module

Recommended Posts


I'm writing an application using Python that uses the pyuipc module.

One of the functions is to retrieve any messages that are sent out via SimConnect and read them via text-to-speech.

This works most of the time. However, I'm running into a few situations where pyuipc can't process the string. It is possibly related to a strange character in the return string. 

An example of where this happens is when reading the menus from GSX (ground services x). I can read the menus, up to the point where you choose the jetway options. Pyuipc then throws an error. I can't do any processing on the string, since pyuipc isn't returning anything, just throwing an error.

Can anyone suggest a way around this? I know I can read the menus with lua, but the question then is how to output the results using TTS, or transfer the result to my application so I can read it?


I tried emailing this question to the developer of the pyuipc module, but never heard back. The module is open source, but I'm not a C developer.

Any help would be apreciated!

My app can b found at:




Share this post

Link to post
Share on other sites


23 hours ago, Jason Fayre said:

It is possibly related to a strange character in the return string. 

I think the first step would be to log what the strings are to see if this sheds any light on the problem. Could you try adding the following to the [General] section of your .ini file:

(This is the TextMenu logging flag).

You could also log offsets (from the FSUIPC UI) B010 (as U32) and B014 (as AsciiZ), sending the results to the log file. The logging of offset B014 will probably not be that useful, as it will stop after the first zero terminated string, but would be useful to see anyway.

If you could post your log file exhibiting your problem with the above logging activated, I'll take a further look.



P.S. I've not looked into the python module yet so this may take some time!

Share this post

Link to post
Share on other sites


I got a response back from the developer of the python module. He made a change for me that returns the string from fSUIPC as a python byte string so I can do my own decoding.

The module was trying to decode the string as utf-8 before returning, but for some reason that wasn't working in my case.

I think I've got that sorted out now.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.