Archived
This forum has been archived. Please start a new discussion on GitHub.
Murmur.ice error on #include <Ice/SliceChecksumDict.ice>
Hullo,
I am new to the forum and to Ice, but I am trying to handle murmur and I was suggested Ice could do the job. So I installed it and tried activating it for murmur by means of the following python scripts stub:
/usr/local/murmur/ice/Murmur.ice:9: error: Can't open include file "Ice/SliceChecksumDict.ice"
#include <Ice/SliceChecksumDict.ice>
1 error in preprocessor.
Traceback (most recent call last):
File "ice.py", line 3, in <module>
Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice")
RuntimeError: Slice preprocessing failed for `/usr/local/murmur/ice/Murmur.ice'
The location of SliceChecksumDict.ice in my system is /usr/share/Ice-3.5.1/slice/Ice/SliceChecksumDict.ice
What should I do on Murmur.ice to have it find the SliceChecksumDict.ice where it is?
I am new to the forum and to Ice, but I am trying to handle murmur and I was suggested Ice could do the job. So I installed it and tried activating it for murmur by means of the following python scripts stub:
#!/usr/bin/python import Ice Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice") #Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "Murmur.ice"]) import Murmur # Init ice comm = Ice.initialize()Yet when I run it I get error:
/usr/local/murmur/ice/Murmur.ice:9: error: Can't open include file "Ice/SliceChecksumDict.ice"
#include <Ice/SliceChecksumDict.ice>
1 error in preprocessor.
Traceback (most recent call last):
File "ice.py", line 3, in <module>
Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice")
RuntimeError: Slice preprocessing failed for `/usr/local/murmur/ice/Murmur.ice'
The location of SliceChecksumDict.ice in my system is /usr/share/Ice-3.5.1/slice/Ice/SliceChecksumDict.ice
What should I do on Murmur.ice to have it find the SliceChecksumDict.ice where it is?
0
Comments
-
Hi,
Try changing the script to disable the first call to Ice.loadSlice() and enable the second call to Ice.loadSlice(). It is adding a -I option to specify the installation directory of the Slice files:#!/usr/bin/python import Ice #Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice") Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "Murmur.ice"]) ...
Regards,
Mark0 -
Hi,
Try changing the script to disable the first call to Ice.loadSlice() and enable the second call to Ice.loadSlice(). It is adding a -I option to specify the installation directory of the Slice files:#!/usr/bin/python import Ice #Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice") Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "Murmur.ice"]) ...
Regards,
Mark
icecpp: error: cannot open `/var/www/html/iPhone/inarrivo/python/Murmur.ice' for reading
Traceback (most recent call last):
File "ice.py", line 4, in <module>
Ice.loadSlice( '', )
RuntimeError: Slice preprocessing failed for `'0 -
That should probably be:
Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "/usr/local/murmur/ice/Murmur.ice"])
Mark0 -
That should probably be:
Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "/usr/local/murmur/ice/Murmur.ice"])
Mark
Thanks, in fact now it executed without errors. Now that I have you attention, could please tell me, now that I have my Ice instance well dressed to go to school... how do I create and delete channels on Murmur with its help?0 -
Matt Conroy solution
I was trying to follow the solution at:
Matt · Conroy - Example ICE Script for Mumble Using Python
Once overcome the first problems thanks to this thread, I got as far a down as:meta = Murmur.MetaPrx.checkedCast(proxy)
where I get:Traceback (most recent call last):
File "ice.py", line 13, in <module>
meta = Murmur.MetaPrx.checkedCast(proxy)
File "/usr/local/murmur/ice/Murmur.ice", line 4175, in checkedCast
Ice.UnknownLocalException: exception ::Ice::UnknownLocalException
{
unknown = ../../include/Ice/BasicStream.h:175: Ice::UnsupportedEncodingException:
protocol error: unsupported encoding version: 1.1
(can only support encodings compatible with version 1.1)
}proxy = comm.stringToProxy("Meta:tcp -p 6502")
extraordinarily for free.0 -
Hi Fabrizio,
This encoding error message is unfortunately not correct - we'll fix it.
If your Murmur server is using Ice 3.4 or earlier, the solution is to change your proxy to:proxy = comm.stringToProxy("Meta -e 1.0:tcp -p 6502")
See https://doc.zeroc.com/display/Doc/New+in+Ice+3.5%3A+Encoding+Version+1.1 for a complete explanation.
All the best,
Bernard0 -
Hi Fabrizio,
This encoding error message is unfortunately not correct - we'll fix it.
If your Murmur server is using Ice 3.4 or earlier, the solution is to change your proxy to:proxy = comm.stringToProxy("Meta -e 1.0:tcp -p 6502")
See https://doc.zeroc.com/display/Doc/New+in+Ice+3.5%3A+Encoding+Version+1.1 for a complete explanation.
All the best,
Bernard
server.addChannel("humpty", 0)
but I had an error; how do I add a channel instead? This is my complete updated script:#!/usr/bin/python import Ice #Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice") Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "/usr/local/murmur/ice/Murmur.ice"]) import Murmur # Init ice comm = Ice.initialize() # Let Ice know where to go to connect to mumble # Let Ice know where to go to connect to mumble proxy = comm.stringToProxy("Meta -e 1.0:tcp -p 6502") # Create a dynamic object that allows us to get a programmable interface for Mumble meta = Murmur.MetaPrx.checkedCast(proxy) # Get the server instance from the set of servers. server = meta.getServer(1) # Get a list of all channels channels = server.getChannels() #server.addChannel("humpty", 0) print channels
For that matter, how would I update Ice to the latest version?
Thank you very much for your insightful answers,
Fabrizio0 -
Found!
I had to comment out:
icesecretwrite=
in /etc/murmur.ini: the new channel is inserted and shown - I excuse it twice:{0L:
{
id = 0
name = Root
parent = -1
links =
{
}
description =
temporary = False
position = 0
}, 1L:
{
id = 1
name = humpty
parent = 0
links =
{
}
description =
temporary = False
position = 0
}, 2L:
{
id = 2
name = humpty
parent = 0
links =
{
}
description =
temporary = False
position = 0
}}0 -
Checking channel existence
I set up this script to check if a channel existed before inserting it enough, but it gives weird results; this seems an issue with python rather than murmur, though; this is the updated script:#!/usr/bin/python import Ice import inspect #Ice.loadSlice("/usr/local/murmur/ice/Murmur.ice") Ice.loadSlice( '', ['-I' + Ice.getSliceDir(), "/usr/local/murmur/ice/Murmur.ice"]) import Murmur # Init ice comm = Ice.initialize() # Let Ice know where to go to connect to mumble # Let Ice know where to go to connect to mumble #proxy = comm.stringToProxy("Meta:tcp -p 6502") proxy = comm.stringToProxy("Meta -e 1.0:tcp -p 6502") # Create a dynamic object that allows us to get a programmable interface for Mumble meta = Murmur.MetaPrx.checkedCast(proxy) # Get the server instance from the set of servers. server = meta.getServer(1) print dir(server) print(inspect.getargspec(server.removeChannel)) newChannelName="humtpy" found=False channels = server.getChannels() for value in channels.itervalues(): print "comparing "+value.name+" with "+newChannelName print len(value.name) print len(newChannelName) idChannel=value.id if value.name == newChannelName: print "found!" print idChannel found=True server.removeChannel(idChannel) break else: print "not found" # Get a list of all channels if found==False: print "added"+newChannelName server.addChannel(newChannelName, 0) channels = server.getChannels() #print channels
And this is the output:....
ArgSpec(args=, varargs=None, keywords=None, defaults=(None,))
comparing Root with humtpy
4
6
not found
comparing humpty with humtpy
6
6
not found
comparing humpty with humtpy
6
6
not found
comparing humtpy with humtpy
6
6
found!
30 -
On the Mumble app
And in fact on the Mumble app the "Humpty" channels vary between 2 and 3 each time I run the script.0 -
Hi Fabrizio,
It's good to see you're making progress!
This forum is really about Ice; for Mumble/Murmur questions, I'd suggest a forum where more Mumble/Murmur developers hang around, such as forums.mumble.info • Index page (and I see you already found it).
The "encoding error" issue you had earlier was because you are using Ice 3.5.x for your Python client while your Murmur server is using an older version of Ice (most likely Ice 3.4.x).
Note that clients and servers built with Ice 3.4 and Ice 3.5 can talk to each other without any problem. You just need a few small adjustment like "-e 1.0" in some bootstrap proxies, as described in the article referenced earlier.
Best regards,
Bernard0 -
Hi Fabrizio,
It's good to see you're making progress!
This forum is really about Ice; for Mumble/Murmur questions, I'd suggest a forum where more Mumble/Murmur developers hang around, such as forums.mumble.info • Index page (and I see you already found it).
The "encoding error" issue you had earlier was because you are using Ice 3.5.x for your Python client while your Murmur server is using an older version of Ice (most likely Ice 3.4.x).
Note that clients and servers built with Ice 3.4 and Ice 3.5 can talk to each other without any problem. You just need a few small adjustment like "-e 1.0" in some bootstrap proxies, as described in the article referenced earlier.
Best regards,
Bernard0