I think there's a bug in python's code, not pymol's
In the file that it describes at the end ( C:\Python27\lib\mimetypes.py ) ,
you should change line 250 from:
except UnicodeEncodeError:

to

except (UnicodeEncodeError,UnicodeDecodeError):

keeping the indentation in the file and so on. Then the code will skip the
entries in the windows registry that are causing issues.

-David



On Mon, Jan 20, 2014 at 8:40 AM, Lapolla, Suzanne M (HSC) <
[email protected]> wrote:

> I am posting this again as I have still not figured out why I am unable to
> fetch or use the pdb plugin loader with pymol 1.7 I have cut/copied/pasted
> the error msg I get below. I have tried uninstalling and reinstalling
> python 2.7.6 as well as python 1.7 (I have windows 64 bit --so I tried the
> 64 bit version 1st, and when that did not work I unindtalled adn then
> re-installed using the windows 32 bit version. (I prev had pymol 1.3 but
> uninstalled that as well).  This forum has been a great source of help for
> my before so hope yoiu guys can help again! Thank you.
>
> PyMOL>fetch 4bd2
>  please wait ...
> Exception in thread Thread-4:
> Traceback (most recent call last):
>   File "C:\Python27\lib\threading.py", line 810, in __bootstrap_inner
>     self.run()
>   File "C:\Python27\lib\threading.py", line 763, in run
>     self.__target(*self.__args, **self.__kwargs)
>   File "C:\Python27\lib\site-packages\pymol\commanding.py", line 561, in
> wrapper
>     func(*args, **kwargs)
>   File "C:\Python27\lib\site-packages\pymol\importing.py", line 1348, in
> _multifetch
>     discrete, multiplex, zoom, type, path, file, quiet, _self)
>   File "C:\Python27\lib\site-packages\pymol\importing.py", line 1292, in
> _fetch
>     contents = internal.file_read(url)
>   File "C:\Python27\lib\site-packages\pymol\internal.py", line 308, in
> file_read
>     handle = urllib.urlopen(finfo)
>   File "C:\Python27\lib\urllib2.py", line 127, in urlopen
>     return _opener.open(url, data, timeout)
>   File "C:\Python27\lib\urllib2.py", line 404, in open
>     response = self._open(req, data)
>   File "C:\Python27\lib\urllib2.py", line 422, in _open
>     '_open', req)
>   File "C:\Python27\lib\urllib2.py", line 382, in _call_chain
>     result = func(*args)
>   File "C:\Python27\lib\urllib2.py", line 1403, in ftp_open
>     mtype = mimetypes.guess_type(req.get_full_url())[0]
>   File "C:\Python27\lib\mimetypes.py", line 297, in guess_type
>     init()
>   File "C:\Python27\lib\mimetypes.py", line 358, in init
>     db.read_windows_registry()
>   File "C:\Python27\lib\mimetypes.py", line 258, in read_windows_registry
>     for subkeyname in enum_types(hkcr):
>   File "C:\Python27\lib\mimetypes.py", line 249, in enum_types
>     ctype = ctype.encode(default_encoding) # omit in 3.x!
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 2:
> ordinal not in range(128)
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
> _______________________________________________
> PyMOL-users mailing list ([email protected])
> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
> Archives: http://www.mail-archive.com/[email protected]
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
PyMOL-users mailing list ([email protected])
Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users
Archives: http://www.mail-archive.com/[email protected]

Reply via email to