Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Missing library path (WIndows)

Reply
Thread Tools

Missing library path (WIndows)

 
 
FPEFPE
Guest
Posts: n/a
 
      09-29-2012
Hello -- I am running python from an application, starting it with a call to the python31.dll

I think I am missing something in my path -- any help would be appreciated -- thanks

Here is the script and the output ---

# this is a test

import sys

print('hello from python')

print('Number of arguments:', len(sys.argv), 'arguments.')

print('Argument List:', str(sys.argv))

#--------------------------------------------------#
# o u t p u t #
#--------------------------------------------------#

Argument List: hello from python

Number of arguments: 5 arguments.

Traceback (most recent call last):

File "", line 1, in

File "C:/DOCUME~1/Frank/LOCALS~1/Temp/foo.py", line 10, in

print('Argument List:', str(sys.argv))

File "C:\Python32\Lib\encodings\cp437.py", line 19, in encode

return codecs.charmap_encode(input,self.errors,encoding_m ap)[0]

UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-18: character maps to
 
Reply With Quote
 
 
 
 
Kwpolska
Guest
Posts: n/a
 
      09-29-2012
On Sat, Sep 29, 2012 at 4:39 AM, FPEFPE <(E-Mail Removed)> wrote:
> Hello -- I am running python from an application, starting it with a callto the python31.dll
>
> I think I am missing something in my path -- any help would be appreciated -- thanks


Nope, you are not.

> File "C:\Python32\Lib\encodings\cp437.py", line 19, in encode
>
> return codecs.charmap_encode(input,self.errors,encoding_m ap)[0]
>
> UnicodeEncodeError: 'charmap' codec can't encode characters in position 2-18: character maps to
> --
> http://mail.python.org/mailman/listinfo/python-list


Python has problems with encoding the arguments to look properly with
the crappy Windows cmd.exe encodings. They cannot be encoded for some
reason. You may need magic, but I’m not quite sure what in Py3k
(bytestrings?)

--
Kwpolska <http://kwpolska.tk>
stop html mail | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
 
Reply With Quote
 
 
 
 
FPEFPE
Guest
Posts: n/a
 
      09-29-2012
On Saturday, September 29, 2012 4:02:13 AM UTC-4, Kwpolska wrote:
> On Sat, Sep 29, 2012 at 4:39 AM, FPEFPE wrote:
>
> > Hello -- I am running python from an application, starting it with a call to the python31.dll

>
> >

>
> > I think I am missing something in my path -- any help would be appreciated -- thanks

>
>
>
> Nope, you are not.
>
>
>
> > File "C:\Python32\Lib\encodings\cp437.py", line 19, in encode

>
> >

>
> > return codecs.charmap_encode(input,self.errors,encoding_m ap)[0]

>
> >

>
> > UnicodeEncodeError: 'charmap' codec can't encode characters in position2-18: character maps to

>
> > --

>
> > http://mail.python.org/mailman/listinfo/python-list

>
>
>
> Python has problems with encoding the arguments to look properly with
>
> the crappy Windows cmd.exe encodings. They cannot be encoded for some
>
> reason. You may need magic, but Im not quite sure what in Py3k
>
> (bytestrings?)
>
>
>
> --
>
> Kwpolska <http://kwpolska.tk>
>
> stop html mail | always bottom-post
>
> www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
>
> GPG KEY: 5EAAEA16


Hello -- thanks for the reply ... is "magic" a debugging tool?
 
Reply With Quote
 
FPEFPE
Guest
Posts: n/a
 
      09-29-2012
On Saturday, September 29, 2012 4:02:13 AM UTC-4, Kwpolska wrote:
> On Sat, Sep 29, 2012 at 4:39 AM, FPEFPE wrote:
>
> > Hello -- I am running python from an application, starting it with a call to the python31.dll

>
> >

>
> > I think I am missing something in my path -- any help would be appreciated -- thanks

>
>
>
> Nope, you are not.
>
>
>
> > File "C:\Python32\Lib\encodings\cp437.py", line 19, in encode

>
> >

>
> > return codecs.charmap_encode(input,self.errors,encoding_m ap)[0]

>
> >

>
> > UnicodeEncodeError: 'charmap' codec can't encode characters in position2-18: character maps to

>
> > --

>
> > http://mail.python.org/mailman/listinfo/python-list

>
>
>
> Python has problems with encoding the arguments to look properly with
>
> the crappy Windows cmd.exe encodings. They cannot be encoded for some
>
> reason. You may need magic, but Im not quite sure what in Py3k
>
> (bytestrings?)
>
>
>
> --
>
> Kwpolska <http://kwpolska.tk>
>
> stop html mail | always bottom-post
>
> www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
>
> GPG KEY: 5EAAEA16


Hello -- thanks for the reply ... is "magic" a debugging tool?
 
Reply With Quote
 
Kwpolska
Guest
Posts: n/a
 
      09-30-2012
On Sat, Sep 29, 2012 at 10:32 PM, FPEFPE <(E-Mail Removed)> wrote:
> On Saturday, September 29, 2012 4:02:13 AM UTC-4, Kwpolska wrote:
>>
>> Python has problems with encoding the arguments to look properly with
>>
>> the crappy Windows cmd.exe encodings. They cannot be encoded for some
>>
>> reason. You may need magic, but I’m not quite sure what in Py3k
>>
>> (bytestrings?)
>>
>>
>>
>> --
>>
>> Kwpolska <http://kwpolska.tk>
>>
>> stop html mail | always bottom-post
>>
>> www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
>>
>> GPG KEY: 5EAAEA16

>
> Hello -- thanks for the reply ... is "magic" a debugging tool?
> --
> http://mail.python.org/mailman/listinfo/python-list


No, no, no! I meant “do some magic with the string”. In Py2k, it
would be str.decode(), but I don’t know what to do in Py3k.

--
Kwpolska <http://kwpolska.tk>
stop html mail | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Crystal Reports - Visual Basic UFL that implements this function is missing (or U2lcom.dll is missing) Les Caudle ASP .Net 3 09-03-2007 02:27 AM
library.path VS class.path Terracotta Java 0 07-16-2007 03:57 PM
library.path VS class.path Terracotta Java 1 07-16-2007 03:52 PM
Re: missing feature classes and missing fields Gary Herron Python 2 07-04-2006 10:29 PM
Path as a dictionary tree key? (was Re: PEP on path module forstandard library) Ron Adam Python 3 08-02-2005 04:27 AM



Advertisments