Python on Windows part 2

5 posts / 0 new
Last post
Offline
Last seen: 6 months 6 days ago
Joined: 05/01/2019
Posts: 3
Python on Windows part 2

So I've stepped back to the basics to try to get the Python bindings working on Windows.

I'm using the simpler writer example:

https://github.com/rticommunity/rticonnextdds-connector-py/blob/master/examples/python/simple/writer.py

When I run this app, and then look at the Admin console, I see that there is a domain participant called Zero::Zero running on my machine. However, I don't see any published topics under Domain 0. 

If the python binding were working, I should see topics under Domain 0 in the DDS Logical View pane, right?

 

Offline
Last seen: 13 hours 32 min ago
Joined: 10/22/2018
Posts: 39

Hi Mark,

Using that example (unmodified) you should see a "Square" topic being published in domain 0. I have just run the example and confirmed this.

If you run the simple reader at the same time as the writer does it receive any data? The reader will print out the samples at it receives them.

If not, which version of Python are you using?

Sam

Offline
Last seen: 13 hours 32 min ago
Joined: 10/22/2018
Posts: 39

I have just seen your other forum post Python on Windows.

Are you still experiencing the same error messages (or any others) when running the writer?

Offline
Last seen: 6 months 6 days ago
Joined: 05/01/2019
Posts: 3

>If you run the simple reader at the same time as the writer does it receive any data?

The simple reader runs without issuing any errors, but it gets 0 samples.

>If not, which version of Python are you using?

I tried this before with 2.7, this time around I'm using 3.7.3

We're stuck on a specific version of RTI on the windows host, running 5.3.1. I know it's not the latest, and the inclination is to try upgrading, but we are using this version for our target system.

RTI admin console does see all the data coming from my targets, which are on Domain 57.

>Are you still experiencing the same error messages (or any others) when running the writer

I've tried creating a reader that can pull in the samples from our target system (which are visible both to admin console and our C++ apps) and I get similar errors creating my connector. It seems like these are fairly informative, someone who knows the library ought to be able to get something from this. (I think the exception error at the bottom is probably incorrect):

REDAFastBufferPool_growEmptyPoolEA: !allocate buffer of 4294934656 bytes
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] REDAFastBufferPool_newWithNotification:!create fast buffer pool buffers
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] PRESTypePluginDefaultEndpointData_createWriterPool:!create writer buffer pool
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] DDS_DynamicData2TypePlugin_on_endpoint_attached:ERROR: Failed to create writer pool
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] PRESPsService_enableLocalEndpointWithCursor:failed to attach endpoint to typePlugin
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] PRESPsService_enableLocalEndpoint:!enable local endpoint
[D0157|Pub(80000008)|T=hardwareInfo.soupVersions.primaryDisplay|CREATE Writer] DDS_Publisher_create_datawriter:ERROR: Failed to auto-enable entity
DDS_FactoryXmlPlugin_createDataWritersWithNamesI:!create DataWriter
DDS_FactoryXmlPlugin_createDataWriters:!create DataWriters from XML DataWriter "::workstation::ws.io.dal::ws.io.dal.publisher::hardwareInfo.soupVersions.primaryDisplayWriter"
DDS_FactoryXmlPlugin_createPublishers:!create DataWriters from XMLPublisher "::workstation::ws.io.dal::ws.io.dal.publisher"
DDS_FactoryXmlPlugin_createParticipant:!create Publishers from XML Participant "::workstation::ws.io.dal"
DDS_DomainParticipantFactory_create_participant_from_config_w_paramsI:!create DomainParticipant from configuration "workstation::ws.io.dal"
DDS_DomainParticipantFactory_create_participant_from_config:!create participant with default parameters
RTIDDSConnector_newI:!new participant
RTIDDSConnector_EntitiesLookupList_delete:RTIDDSConnector
Traceback (most recent call last):
File "X:\temp\test.py", line 7, in <module>
connector = rti.Connector("workstation::ws.io.dal", "Domain.xml")
File "C:\Program Files (x86)\Python37-32\lib\site-packages\rticonnextdds_connector\rticonnextdds_connector.py", line 326, in __init__
raise ValueError("Invalid participant profile, xml path or xml profile")
ValueError: Invalid participant profile, xml path or xml profile

 

Offline
Last seen: 13 hours 32 min ago
Joined: 10/22/2018
Posts: 39

I have just run a test using the current HEAD of the simple example on github with Windows 10 and Python 3.7.3 and everything went smoothly.

Are you running both the writer.py and reader.py on the same machine?

Can non-connector Connext DDS applications (e.g., one of the shipped hello_world examples) communicate?

The error you are showing there is the same from this forum post. The issue stems from having unbounded sequences or strings in your type (and using a Connector based on Connext DDS 6.0.0 where unbounded really means unbounded). The solution in that case was to add the desired bounds to the XML file (or modify the memory usage of the application if it truly is unbounded).

Looking at the ShapeExample.xml file, the only string/sequence is the member "color" which has a bound of 128 - so it should not be causing this error. Is this error occurring when using the simple example or when using one of your own types?

I would guess that the reason your Connector reader and target applications cannot communciate is due to the fact that your type contains either unbounded strings or sequences. Connector internally uses Connext DDS 6.0.0, whilst, if I have understood correctly, your target system is using Connext DDS 5.3.1. To fix this you could add stringMaxLength properties to the XML type used by Connector to allow for matching to complete. I suggest reading this topic in the migration guide.

Sam