pysmbc 1.0.12
by Tim Waugh
Hi,
pysmbc 1.0.12 is now available.
Changes since 1.0.11:
- Added support for useKerberos and FallbackAfterKerberos options.
- Filenames are always Bytes objects, not Unicode objects.
http://pypi.python.org/pypi/pysmbc/
Tim.
*/
12 years, 4 months
pysmbc-1.0.11.1 unicode issues
by Moritz Schlarb
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello again! ;)
I want to use pysmbc-1.0.11.1 to getdents() of my share and when I run
the following code:
>>>
c.opendir("smb://Gast:123Dabei@dns320/public/eBooks/EBooks/Medizin").getdents()
I get the following:
[<smbc.Dirent object "." (Dir) at 0xb7485878>, <smbc.Dirent object ".."
(Dir) at 0xb7485998>, Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe4' in
position 27: ordinal not in range(128)
The filename, on which it fails is:
[Birkhäuser] Gaedeke - Biowissenschaftlich recherchieren (2007)
(If the mail gets destroyed encoding, the 7th character is the german
umlaut ä that means ae).
It worked fine until 1.0.9...
I wondered, if there is a argument through which I can set the encoding
to use for the smb-connection or what else can be done to solve this
problem?
Regards,
Moritz
PS:
In 1.0.10, I get the following output:
[<smbc.Dirent object "." (Dir) at 0xb74a5998>, <smbc.Dirent object ".."
(Dir) at 0xb6e4d9f8>, <smbc.Dirent object "(null)" (?) at 0xb6e4da10>,
<smbc.Dirent object "(null)" (?) at 0xb6e4da40>, <smbc.Dirent object
"(null)" (?) at 0xb6e4da58>, <smbc.Dirent object "(null)" (?) at
0xb6e4da70>, <smbc.Dirent object "(null)" (?) at 0xb6e4da88>,
<smbc.Dirent object "(null)" (?) at 0xb6e4daa0>, <smbc.Dirent object
"(null)" (?) at 0xb6e4dab8>, <smbc.Dirent object "(null)" (?) at
0xb6e4dad0>, <smbc.Dirent object "(null)" (?) at 0xb6e4dae8>,
<smbc.Dirent object "(null)" (?) at 0xb6e4db00>, <smbc.Dirent object
"(null)" (?) at 0xb6e4db30>, <smbc.Dirent object "(null)" (?) at
0xb6e4d9e0>, <smbc.Dirent object "(null)" (?) at 0xb6e4db48>,
<smbc.Dirent object "(null)" (?) at 0xb6e4db60>, <smbc.Dirent object
"(null)" (?) at 0xb6e4db78>, <smbc.Dirent object "(null)" (?) at
0xb6e4db90>, <smbc.Dirent object "(null)" (?) at 0xb6e4dba8>
and in 1.0.9, I get:
[<smbc.Dirent object "." (Dir) at 0xb7432998>, <smbc.Dirent object ".."
(Dir) at 0xb6dda9c8>, <smbc.Dirent object "[Birkhäuser] Gaedeke -
Biowissenschaftlich recherchieren (2007).pdf" (File) at 0xb6dda230>,
<smbc.Dirent object "Statistik" (Dir) at 0xb6dda9f8>, <smbc.Dirent
object "Geschichte" (Dir) at 0xb6ddaa10>, <smbc.Dirent object
"Infektiologie" (Dir) at 0xb6ddaa28>, <smbc.Dirent object "Taschenatlas
Genetik - Passarge - Thieme.pdf" (File) at 0xb6ddaa40>, <smbc.Dirent
object "Laborpraxis" (Dir) at 0xb6ddaa58>, <smbc.Dirent object
"Checkliste" (Dir) at 0xb6ddaa70>, <smbc.Dirent object "Immunologie"
(Dir) at 0xb6ddaa88>, <smbc.Dirent object "[Springer] GK2 kompakt" (Dir)
at 0xb6ddaaa0>, <smbc.Dirent object "Wörterbücher" (Dir) at 0xb6ddaab8>,
<smbc.Dirent object "[Springer] GK1 kompakt" (Dir) at 0xb6ddaad0>,
<smbc.Dirent object "EKG" (Dir) at 0xb6ddab00>, <smbc.Dirent object
"Anatomie" (Dir) at 0xb6ddaae8>, <smbc.Dirent object
"Ernaehrungsmedizin" (Dir) at 0xb6ddab18>, <smbc.Dirent object
"Mikrobiologie" (Dir) at 0xb6ddab30>, <smbc.Dirent object "Biologie -
Buselmaier - Springer.pdf" (File) at 0xb6dda9e0>, <smbc.Dirent object
"Fallbuch Gynäkologie und Geburtshilfe - Pedain - Thieme.pdf" (File) at
0xb6ddab48>]
(which is what i expected...)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQEcBAEBAgAGBQJOdh0LAAoJEEXT29373YiInncH/1aGZTjrSzVBSnWRo3qNBNLt
CXMU/0z9GhKLmk5Q3DRZMNU0nIiPAXaLrU2P9swCUMUoCUV6eSoY7Gy43zofaTzY
mIQH8EW4K3YillUewdD36BzguaNF7pVnVwiwS7v6+yhpOYtujgL1vfilXsx6Y+m9
20Gfog8oqbMZ8lu5zGFpidxIu7davov9q/VbBBLnjVzHdl41y+CABynGnCpsmvLU
bFiOdgYh+F98gaZD52XePrVnxDnYLaIAS3tJKqyJTZx+8zj7ul52F1ztRlMFEo/V
X3qMtwWtI3ZF/DR4vNwL5tFh/eT12vlPF0jXls5PjpiRYQ2Ql3aCfbxm7aWuxgk=
=nAJO
-----END PGP SIGNATURE-----
12 years, 4 months