Git Product home page Git Product logo

Comments (12)

svinota avatar svinota commented on May 22, 2024

Thanks, investigating.

from mdns.

svinota avatar svinota commented on May 22, 2024

approach: f658137

pls try, should be fixed. One more Python3 issue.

from mdns.

titilambert avatar titilambert commented on May 22, 2024

I made this PR: #13
I still get an error (on python 3.4.1(debian sid) and 3.4.0(sailfishOS)):

 python3 ex.py 
Traceback (most recent call last):
  File "ex.py", line 31, in <module>
    info = ServiceInfo(d, n, inet_aton('127.0.0.1'), 12345, properties=txt)
  File "/home/titilambert/projets_opensource/mdns/mdns/zeroconf.py", line 1367, in __init__
    self.set_properties(self.properties)
  File "/home/titilambert/projets_opensource/mdns/mdns/zeroconf.py", line 1393, in set_properties
    self.sync_properties()
  File "/home/titilambert/projets_opensource/mdns/mdns/zeroconf.py", line 1387, in sync_properties
    self.text = dict_to_text(self.properties)
  File "/home/titilambert/projets_opensource/mdns/mdns/zeroconf.py", line 237, in dict_to_text
    result = ''.join((result, struct.pack('!c', chr(len(item))), item))
struct.error: char format requires a bytes object of length 1

from mdns.

svinota avatar svinota commented on May 22, 2024

If you can give me exact variables — what you provide to DNSServiceRegister() here (https://github.com/titilambert/HeySms/blob/master/heysms/lib/friend.py#L97 ) — I would be able to reproduce and fix.

from mdns.

titilambert avatar titilambert commented on May 22, 2024

Here my test:

import sys
from mdns.zeroconf import *
from socket import *

n = 'bala3._presence._tcp.local.'
d = '_presence._tcp.local.'

txt = {}
txt['1st'] = "self.fullname3"
txt['last'] = ""
txt['status'] = 'avail'
txt['port.p2pj'] = 12345
txt['nick'] = "self.fullnick3"
#txt['node'] = self.node
txt['jid'] = "self.node"
txt['email'] = "self.node"
txt['version'] = 1
txt['txtvers'] = 1
records = [16]
info = ServiceInfo(d, n, inet_aton('127.0.0.1'), 12345, properties=txt)
r.register_service(info)
r.engine.join()

from mdns.

svinota avatar svinota commented on May 22, 2024

Thanks!

from mdns.

svinota avatar svinota commented on May 22, 2024

Passes

from mdns.

titilambert avatar titilambert commented on May 22, 2024

Thanks !
I don't get any error, but I didn't sse any registered service and I don't see any packet sent (with wireshark)
It's still working correctly with python2

from mdns.

svinota avatar svinota commented on May 22, 2024

Continuing :) Excuse me for that mess with the third python.

from mdns.

titilambert avatar titilambert commented on May 22, 2024

Don't worry ! :) Thank to you to help me !

from mdns.

svinota avatar svinota commented on May 22, 2024

Try again :)

from mdns.

titilambert avatar titilambert commented on May 22, 2024

It's working ! Thanks !

from mdns.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.