Unable to open SMB file for reading (Xbox)
#1
Question 
Hi,

I'm a bit puzzled, googled and search the forums for a while but I can't find an answer.

I have a SMB URL returned by the xbmcgui.Dialog().browse() and I want to open the file using open("...", "rb"). This works fine on Windows (XBMC 9.04.1), but it doesn't seem to work on Xbox (T3CH 2009-05-21), it complains with a "Errno 2] No such file or directory". The file is accessible just fine, not only that I can browse for it, but I can also play it.

Any suggestions? Do I need to do anything with the SMB filename returned by the browse()? Do I need to use something else than the open() function?

Thanks in advance,
Dan
Reply
#2
Full debug log on pastebin.
Reply
#3
@althekiller
Just in the middle of the investigation, from what it seems, Dialog.browse() on Windows returns the SMB url including the username / password, while on Xbox it might be missing those, coming back with a full log...

PS: If you have some spare time to try a full blown test, try the Sublight video plugin on Xbox (http://forum.xbmc.org/showthread.php?tid=51256)
Reply
#4
Here's the log as well - http://pastebin.ca/1440483

I've accessed the SMB video source (although it seemed to remember the user/password, I had to type in again the computername\username and the password to be able to access the share), played the file ok then ran the plugin, which failed.

I don't know, it might be cause it's not passing the computername in the SMB url, no idea, maybe you can figure out something from the log...

Thanks,
Dan
Reply
#5
Question 
Any thoughts?

Some users found probably a related issue with os.listdir() on SMB shares.

Code:
21:25:20 M: 26873856 NOTICE: files = os.listdir( movie_dir )
21:25:20 M: 26873856 NOTICE: WindowsError
21:25:20 M: 26873856 NOTICE: :
21:25:20 M: 26873856 NOTICE: [Errno 87] Windows Error 0x57: 'smb://NAS/Volume_1/Media/Video/Movies/A Clock Work Orange/*.*'
Reply
#6
xbox python is not wrapped
Reply
#7
Thanks spiff. Any workarounds / suggestions?
Reply
#8
fetch it through the http api

http://xbox/xbmcCmds/xbmcHttp?command=Ge...ic\;.mp3;1)

oh my bad, you want to grab the actual file. you need to use the download / upload functions from http api.
Reply
#9
Thanks Spiff, quite powerfull the HTTP API thing, good to know.

Too bad there's going to be some file.write() as well - any plans to complete the os / file "wrappings" on Xbox to work over SMB? I guess Xbox is not a priority anymore, but there seems to be a lot of people still using it this way.
Reply
#10
no plans. i don't really see it happening as the dll loader implementing what's needed has been rewritten to use the native linker on windows.
Reply
#11
Right, thanks Spiff!
Reply

Logout Mark Read Team Forum Stats Members Help
Unable to open SMB file for reading (Xbox)0