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, 5 months
system-config-printer 1.2.9
by Tim Waugh
Hi,
I've just released version 1.2.9 of system-config-printer.
http://cyberelk.net/tim/data/system-config-printer/1.2/
Notable changes since 1.2.7:
* Fixed erroneous space character in translatable string.
* troubleshoot: handle errors saving troubleshoot.txt (Ubuntu #789602).
* Removed forgotten debug code in printer finder.
* Don't handle tooltips during mainloop recursion (bug #664044, bug
#739745).
* IPPAuthConnection: if semantic attribute is referenced after destroy,
don't fail (Ubuntu #828030).
* Fixed DNSSD hostname resolution.
* Adjusted firewall code to match new system-config-firewall API
(modified for CVE-2011-2520).
* URL-quote URIs when using "Find Network Printer" (Ubuntu #808137).
* Robustness in ppdsloader in the face of errors (Ubuntu #766818).
* Convert iters to paths before comparing (bug #717062, Ubuntu #791690,
trac #221).
* Ensure consistency in jobviewer if add_job fails (bug #632551).
* udev-configure-printer: be more defensive when parsing CUPS response
(Ubuntu #760661).
* Allow % character in SMB URI (Ubuntu #747400).
Tim.
*/
12 years, 6 months
Potential Rewording
by Matt Richardson
At the 'Choose Driver' stage, assuming a driver has not been
automatically located, we are currently presented with 3 options.
'Select printer from database' (default), 'Provide PPD file', 'Search
for a printer driver to download'. I propose adding a 4th option which
would become the default: 'Provide driver CD'
This would essentially be the same as 'Provide PPD file' except that it
would search the CD for a suitable PPD automatically. This makes clear
that the user can insert the ordinary driver cd that came with their
printer to find the driver.
Also, perhaps the PPD and printer info could be sent to the people at
CUPS for inclusion?
Just my thoughts, I have no experience of driver work in the past so
please tell me if this is too hard/can't be done.
I would be interested to hear more.
Matt
12 years, 6 months
pycups 1.9.60
by Tim Waugh
Hot on the heels of last week's pycups release, here's another one.
It's needed for some new constants defined in CUPS 1.5.0. Some
additional constants have also been added. Here are the new ones:
IPP_AUTHENTICATION_CANCELED
IPP_PKI_ERROR
HTTP_NOT_IMPLEMENTED
HTTP_BAD_GATEWAY
HTTP_SERVICE_UNAVAILABLE
HTTP_GATEWAY_TIMEOUT
HTTP_NOT_SUPPORTED
HTTP_AUTHORIZATION_CANCELED
HTTP_PKI_ERROR
Get it at PyPI:
http://pypi.python.org/pypi/pycups
or here:
http://cyberelk.net/tim/data/pycups/
Tim.
*/
12 years, 7 months
system-config-printer 1.3.7
by Tim Waugh
I've just released system-config-printer 1.3.7. Here are the main
changes:
* Show private job attributes for "my jobs" (bug #742279).
* Enable Test Page button when application/postscript is supported.
* Some preferreddrivers.xml fixes (Ubuntu #855412).
* Handle errors saving troubleshoot.txt (Ubuntu #789602).
* Removed some stale code.
* Make connections list more easily accessible (Ubuntu #842092).
* Improved handling of remote CUPS queues via DNS-SD, and IPP devices.
* Better display of CUPS servers from "Find Network Printer".
* Fixed SMB method for printer finder.
* Don't handle tooltips during mainloop recursion (bug #664044,
bug #739734).
* Fixed bold print of tab labels on option conflicts.
* Preserve installable options on driver change.
* Update printer properties dialog correctly when PPD changed.
* Fixed typo triggered by private job attributes (Ubuntu #827573).
* Marked some translatable strings that weren't (bug #734313).
Get it from here as usual:
http://cyberelk.net/tim/data/system-config-printer/1.3/
Tim.
*/
12 years, 7 months
pycups 1.9.59
by Tim Waugh
Hi,
I've just released pycups-1.9.59. This fixes password callback handling
for CUPS 1.5, which no longer interprets the empty string as a request
to abort the operation.
For the time being, pycups still aborts the operation if the password
callback returns "", but this may change in the future. The correct way
to do it is to return None.
Get it at PyPI:
http://pypi.python.org/pypi/pycups
or here:
http://cyberelk.net/tim/data/pycups/
Tim.
*/
12 years, 7 months