Skip to content

open_gpibethernet()/GPIBCommunicator attribute error #347

@pstrk

Description

@pstrk

I have been experimenting with the Prologix GPIB-Ethernet adapter and have been facing some issues to get it working.

The open_gpibethernet() method in the instrument module calls the GPIBCommunicator() class with a socket object as the filelike argument:

conn = socket.socket()
conn.connect((host, port))
return cls(GPIBCommunicator(conn, gpib_address, model))

where conn is a socket object.

GPIBCommunciator then raises an AttributeError as the attribute 'terminator' is not defined for the socket object. I think the correct way is to provide a SocketCommunicator as the filelike argument instead. The following corrections seem to fix the issue for the Prologix adapter:

conn = socket.socket()
conn.connect((host, port))
comm = SocketCommunicator(conn)
return cls(GPIBCommunicator(comm, gpib_address, model))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions