Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing self.socket #806

Open
cruigo93 opened this issue Oct 21, 2022 · 4 comments
Open

Missing self.socket #806

cruigo93 opened this issue Oct 21, 2022 · 4 comments
Labels
Milestone

Comments

@cruigo93
Copy link

I am facing issue with package and I am still confusing how it was caused. So I cannot reproduce it. But here a screenshot

2022-10-21 14 51 24

It seems that this issue is kinda copy of #538
pynetdicom==2.0.2

@scaramallion scaramallion closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2023
@hzchet
Copy link

hzchet commented Dec 19, 2023

:c

@scaramallion scaramallion reopened this Dec 19, 2023
@scaramallion
Copy link
Member

Whoops, probably a bit overzealous closing this one

@jeremygray2
Copy link

jeremygray2 commented Jul 16, 2024

I have a reproducible minimal example, pynetdicom 2.1.0, python 3.11.7, on RHEL 9. (I get a different error with 2.0.2 and python 3.8 on Ubunto 20.04 -- not sure what part matters.)

Say I am on {host} and do:
$ python3 -m pynetdicom storescp 11112

From a different host:
$ ssh -p 11112 jgray@{host}

Do that 3 times in a row. The 3rd time is usually the charm. I get:

E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x30'
E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x32'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x30'

E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x30'
E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x32'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x30'

E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x30'
E: Unknown PDU type received '0x53'
E: Unknown PDU type received '0x32'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x75'
E: Unknown PDU type received '0x30'
E: State Machine received an exception attempting to perform the action 'AA-7' while in state 'Sta13'
E: 'NoneType' object has no attribute 'send'
Traceback (most recent call last):
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/fsm.py", line 91, in do_action
    next_state = action[1](self.dul)
                 ^^^^^^^^^^^^^^^^^^^
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/fsm.py", line 978, in AA_7
    dul._send(A_ABORT_RQ(primitive))
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/dul.py", line 456, in _send
    self.socket.send(pdu.encode())
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/transport.py", line 433, in send
    nr_sent = self.socket.send(bytestream[total_sent:])
              ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'send'
Exception in thread Thread-5 (run_reactor):
Traceback (most recent call last):
  File "/usr/lib64/python3.11/threading.py", line 1045, in _bootstrap_inner
    self.run()
  File "/usr/lib64/python3.11/threading.py", line 982, in run
    self._target(*self._args, **self._kwargs)
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/dul.py", line 444, in run_reactor
    self.state_machine.do_action(event)
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/fsm.py", line 91, in do_action
    next_state = action[1](self.dul)
                 ^^^^^^^^^^^^^^^^^^^
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/fsm.py", line 978, in AA_7
    dul._send(A_ABORT_RQ(primitive))
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/dul.py", line 456, in _send
    self.socket.send(pdu.encode())
  File "/home/jgray/.venv/mxpy/lib64/python3.11/site-packages/pynetdicom/transport.py", line 433, in send
    nr_sent = self.socket.send(bytestream[total_sent:])
              ^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'send'

@scaramallion
Copy link
Member

Thanks @jeremygray2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants