openairplay / airplay2-receiver

AirPlay 2 Receiver - Python implementation
2.12k stars 131 forks source link

TypeError: str, bytes or bytearray expected, not NoneType #44

Closed Shaquu closed 2 years ago

Shaquu commented 2 years ago

I did:

  1. docker build -f docker/Dockerfile -t invano/ap2-receiver .
  2. docker run -it --rm --device /dev/snd --net host -v /home/pi/data/airplay/pairings:/pairings invano/ap2-receiver
    
    Enabled features: 0001c300405f4200
    Feat.Ft48TransientPairing|Ft47PeerMgmt|Ft46HKPairing|Ft41_PTPClock|Ft40BufferedAudio|Ft30UnifiedAdvertInf|Ft22AudioUnencrypted|Ft20RcvAudAAC_LC|Ft19RcvAudALAC|Ft18RcvAudPCM|Ft17AudioMetaTxtDAAP|Ft16AudioMetaProgres|Ft14MFiSoftware|Ft09AirPlayAudio
    Interface: wlan0
    IPv4: None
    IPv6: None

mDNS service registered Starting RTSP server, press Ctrl-C to exit... Shutting down mDNS... Unregistering... Traceback (most recent call last): File "ap2-receiver.py", line 1157, in with AP2Server((IPV4, PORT), AP2Handler) as httpd: File "ap2-receiver.py", line 1002, in init super().init(addr_port, handler) File "/usr/lib/python3.7/socketserver.py", line 452, in init self.server_bind() File "/usr/lib/python3.7/socketserver.py", line 466, in server_bind self.socket.bind(self.server_address) TypeError: str, bytes or bytearray expected, not NoneType

systemcrash commented 2 years ago

Not sure whether you figured it out, but your chosen interface wlan0 has no IPv4 or 6, at least nothing available to docker.

systemcrash commented 2 years ago

Please try current master - it should 'fix' this, by preventing startup without an IP. Should also show you what interfaces and which IPs are on them.

systemcrash commented 2 years ago

Could you also try https://github.com/openairplay/airplay2-receiver/issues/43#issuecomment-886277837 please?

systemcrash commented 2 years ago

Should be 'resolved' with c75efa449173c72573b29cd852913b2a03d06292

Shaquu commented 2 years ago

Thanks!