Posts: 17
Joined: Dec 2009
Reputation:
0
2013-01-05, 14:18
(This post was last modified: 2013-01-05, 14:24 by bigcookie.)
Hello jarryd,
thanks for that. I will try your proposal ;-).
regards,
Andre
Unfortunately it didnt help. Here is the debug extract with your patch. But at least the error in SotrageServer.py is gone:
13:21:58 T:2957119488 INFO: -->Python script returned the following error<--
13:21:58 T:2957119488 ERROR: Error Type: <type 'exceptions.IndentationError'>
13:21:58 T:2957119488 ERROR: Error Contents: ('unexpected indent', ('/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/lib/StorageServer.py', 142, 16, ' if self.xbmcvfs.exists(self.socket) and check_stale:\n'))
13:21:58 T:2957119488 ERROR: Traceback (most recent call last):
File "/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 40, in <module>
run()
File "/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/default.py", line 31, in run
import StorageServer
IndentationError: ('unexpected indent', ('/Users/andrkuhn/Library/Application Support/XBMC/addons/script.common.plugin.cache/lib/StorageServer.py', 142, 16, ' if self.xbmcvfs.exists(self.socket) and check_stale:\n'))
13:21:58 T:2957119488 INFO: -->End of Python script error report<--
Posts: 17,859
Joined: Jul 2011
Reputation:
371
Because you didn't change it it like it should
Posts: 17
Joined: Dec 2009
Reputation:
0
Ok, Python wasnt working as expected as I commented out the original line. This seem to be not working. I deleted the commeted line, now it works. What the heck *wondering*. Commenting works on other lines...
Anyway, thanks for the help!
Posts: 300
Joined: Mar 2008
Reputation:
14
Guys,
What's the current status of the addon? I was looking to include it in mine, but not if it broken, or prone to extended periods of being broken.
I see lots of issues, but I'm not sure whether this is a issue with the current version, or some testing version.
Posts: 1,355
Joined: Oct 2008
Reputation:
66
I use this a lot, it's a god send :-), there were some issues the past week or so but I think it's all good now. Only once, I think it was the second revision, I had to make updates to my code.
Posts: 300
Joined: Mar 2008
Reputation:
14
Thanks - I'll put some time aside then to integrating this into my addon.
Posts: 51
Joined: Sep 2012
Reputation:
0
I am running Frodo stable on Linux (Ubuntu), and I was experiencing the "Operation not permitted" error on "sock.bind(self.socket)".
It turns out that I caused this error by locating my ~/.xbmc user directory on a FAT32 partition.
(I had moved my ~/.xbmc folder to a FAT32 drive to save space. Now, I have moved only ~/.xbmc/userdata, keeping the rest of the ~/.xbmc directory on an EXT4 partition and all is working well.)
I'm posting this in case anybody has a similar error.
I believe the check for win32 in StorageServer._sock_init is for this reason. Perhaps this check could be made more robust to avoid this problem.
Posts: 300
Joined: Mar 2008
Reputation:
14
Is there anyway to invalidate the cache, so I can force a refresh. I've started using caching, but would like to have the option of performing a refresh before the cache has expired?
Add-on:PleXBMC (wiki) - Play Plex media through XBMC
PleXBMC Helper - Integrate Official/Unoffical Plex remote control apps into PleXBMC
PleXBMC Repository - install and manage all PleXBMC addons
Quartz3 PleXBMC - Integrate PleXBMC into home menus
Posts: 300
Joined: Mar 2008
Reputation:
14
I'll answer my own questions - depends.
If you use the cache to store individual pieces of information - yes.
But if you use the cacheFunction.- no.
It looks like the issue would be to reconstruct the hash value, as it's based on the arguments passed to the function.
So you can either delete all items for a function, or delete the cache for a specific instance of that function.
I've written a patch for the latter - introducing a new function - but I'm not sure who owns this plugins? Or whether it's still actively in development?
Add-on:PleXBMC (wiki) - Play Plex media through XBMC
PleXBMC Helper - Integrate Official/Unoffical Plex remote control apps into PleXBMC
PleXBMC Repository - install and manage all PleXBMC addons
Quartz3 PleXBMC - Integrate PleXBMC into home menus
Posts: 10
Joined: Nov 2010
Reputation:
0
Domin
Junior Member
Posts: 10
I get the exact same error on raspberry pi
Posts: 1
Joined: Mar 2013
Reputation:
0
2013-03-19, 22:53
(This post was last modified: 2013-03-31, 18:38 by awschmidt.)
I have an issue with this script, when xbmc is started while UMS or PMS is already running, it tries to use the same socketadress:
21:40:07 T:4132 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'socket.error'>
Error Contents: (10048, 'Normalerweise darf jede Socketadresse (Protokoll, Netzwerkadresse oder Anschluss) nur jeweils einmal verwendet werden')
Traceback (most recent call last):
File "C:\Users\a\AppData\Roaming\XBMC\addons\script.common.plugin.cache\default.py", line 40, in <module>
run()
File "C:\Users\a\AppData\Roaming\XBMC\addons\script.common.plugin.cache\default.py", line 35, in run
s.run()
File "C:\Users\a\AppData\Roaming\XBMC\addons\script.common.plugin.cache/lib\StorageServer.py", line 197, in run
sock.bind(self.socket)
File "<string>", line 1, in bind
error: (10048, 'Normalerweise darf jede Socketadresse (Protokoll, Netzwerkadresse oder Anschluss) nur jeweils einmal verwendet werden')
-->End of Python script error report<--
how could this be fixed?
I fixed it for me by modifying StorageServer.py, that before creating a server socket it first checks if the default port is available - if not it increments the port..
I'm sure there are better ways to accomplish this, since i'm not used to python, maybe this could be added in the next version.
Here is solution working for me:
def _sock_init(self, check_stale=False):
self._log("", 2)
if not self.socket or check_stale:
self._log("Checking", 4)
if self.platform == "win32":
self._log("Windows", 4)
port = 59994
#201303 Test, ob Port bereits angelegt ist....
for sp in range(0, 10):
st = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
if st.connect_ex(("127.0.0.1", port)) == 0:
self._log("Port: " + str(port) + "bereits verwendet!", 4)
st.close()
# nächster Port versuchen
port = port + 1
else:
self._log("Port: " + str(port) + "noch frei!", 4)
st.close()
break
#201303 Ende Port-Test entweder erfolgreich, oder nach 10 Versuchen aufgegeben...
self.socket = ("127.0.0.1", port)
else:
self._log("POSIX", 4)
self.socket = os.path.join(self.xbmc.translatePath('special://temp/').decode("utf-8"), 'commoncache.socket')
if self.xbmcvfs.exists(self.socket) and check_stale:
self._log("Deleting stale socket file : " + self.socket)
self.xbmcvfs.delete(self.socket)
self._log("Done: " + repr(self.socket), 2)