Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Python

Requires a character ... !!

 

 

Python python RSS feed   Index | Next | Previous | View Threaded


karthikbalaguru79 at gmail

Jul 24, 2008, 2:08 AM

Post #1 of 9 (301 views)
Permalink
Requires a character ... !!

Hi,

I am new to python . I am face few problems related with
python and iam trying to resolve it.

The below is the error that i get when i invoke my application by
giving
the necessary input file.

[root [at] localhos hello]# Analyzer hello_input
Loading debug info: hello_input
Traceback (most recent call last):
File "/usr/local/SDK/host/bin/Analyzer", line 694, in ?
app.dbg.readObjectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor.py", line 427, in
readObjectInfo
self.privateProcessorDwarfTree.readProcessorDwarfTree(filename)
File "/usr/local/SDK/bin/debugprocessor.py", line 314, in
readDwarfTree
if "DW_OP_reg" in value:
TypeError: 'in <string>' requires character as left operand

Is this related with the version conflicts ?
Should i need to configure any environment variables or change some
source code.
Any ideas ?

Thx in advans,
Karthik Balaguru
--
http://mail.python.org/mailman/listinfo/python-list


fredrik at pythonware

Jul 24, 2008, 2:20 AM

Post #2 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

karthikbalaguru wrote:

> I am new to python . I am face few problems related with
> python and iam trying to resolve it.
>
> The below is the error that i get when i invoke my application by
> giving
> the necessary input file.
>
> [root [at] localhos hello]# Analyzer hello_input
> Loading debug info: hello_input
> Traceback (most recent call last):
> File "/usr/local/SDK/host/bin/Analyzer", line 694, in ?
> app.dbg.readObjectInfo(elf)
> File "/usr/local/SDK/host/bin/debugprocessor.py", line 427, in
> readObjectInfo
> self.privateProcessorDwarfTree.readProcessorDwarfTree(filename)
> File "/usr/local/SDK/bin/debugprocessor.py", line 314, in
> readDwarfTree
> if "DW_OP_reg" in value:
> TypeError: 'in <string>' requires character as left operand
>
> Is this related with the version conflicts ?
> Should i need to configure any environment variables or change some
> source code.

You should run the code on a Python version that supports the features
your code is using. Support for arbitrary strings on the left side of
the "in" operator was added in Python 2.3, which was released in 2003.

What software is this? If you've written it yourself, make sure to use
only features supported by the Python version you're actually using. If
it's written by someone else, please read the requirements section for
the software you're using, and follow the instructions in there.

(hasn't people been telling you this about a hundred times before in
this forum? or was that some other guy who also kept insisting on
running some program on a python version it didn't support?)

</F>

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


eckhardt at satorlaser

Jul 24, 2008, 2:23 AM

Post #3 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

karthikbalaguru wrote:
> [root [at] localhos hello]# Analyzer hello_input
^^^^^^^^^^^^^^
This is often a bad idea. Anyhow, that has nothing to do with Python.

> Loading debug info: hello_input
> Traceback (most recent call last):
> File "/usr/local/SDK/host/bin/Analyzer", line 694, in ?
> app.dbg.readObjectInfo(elf)
> File "/usr/local/SDK/host/bin/debugprocessor.py", line 427, in
> readObjectInfo
> self.privateProcessorDwarfTree.readProcessorDwarfTree(filename)
> File "/usr/local/SDK/bin/debugprocessor.py", line 314, in
> readDwarfTree
> if "DW_OP_reg" in value:
> TypeError: 'in <string>' requires character as left operand
>
> Is this related with the version conflicts ?

Which version conflict? Sorry, but my crystal ball is getting a new polish
today, so I can't see the actual code that causes the error. I suggest that
you reduce your code to the smallest possible piece of code that still
shows the error and post it here, otherwise nobody will be able to help
you.

Uli

--
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

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


karthikbalaguru79 at gmail

Jul 24, 2008, 2:33 AM

Post #4 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

On Jul 24, 2:20 pm, Fredrik Lundh <fred...@pythonware.com> wrote:
> karthikbalaguru wrote:
> > I am new to python . I am face few problems related with
> > python and iam trying to resolve it.
>
> > The below is the error that i get when i invoke my application by
> > giving
> > the necessary input file.
>
> > [root [at] localhos hello]# Analyzer hello_input
> > Loading debug info: hello_input
> > Traceback (most recent call last):
> > File "/usr/local/SDK/host/bin/Analyzer", line 694, in ?
> > app.dbg.readObjectInfo(elf)
> > File "/usr/local/SDK/host/bin/debugprocessor.py", line 427, in
> > readObjectInfo
> > self.privateProcessorDwarfTree.readProcessorDwarfTree(filename)
> > File "/usr/local/SDK/bin/debugprocessor.py", line 314, in
> > readDwarfTree
> > if "DW_OP_reg" in value:
> > TypeError: 'in <string>' requires character as left operand
>
> > Is this related with the version conflicts ?
> > Should i need to configure any environment variables or change some
> > source code.
>
> You should run the code on a Python version that supports the features
> your code is using. Support for arbitrary strings on the left side of
> the "in" operator was added in Python 2.3, which was released in 2003.
>

Thx for that info. I understand.
The requirements state that it needs Python 2.2, But i wonder
how that program has been implemented using Python 2.3 features.
Anyhow, this has to be resolved and i need your help.

Kindly let me know a trick to make to resolve
the 'in' operator related problem by using Python 2.2.

Thx in advans,
Karthik Balaguru
--
http://mail.python.org/mailman/listinfo/python-list


wuwei23 at gmail

Jul 24, 2008, 2:47 AM

Post #5 of 9 (292 views)
Permalink
Re: Requires a character ... !! [In reply to]

On Jul 24, 7:33 pm, karthikbalaguru <karthikbalagur...@gmail.com>
wrote:
> Kindly let me know a trick to make to resolve
> the 'in' operator related problem by using Python 2.2.

You seem to be making life -very- difficult for yourself.

Your distro is running Python 2.4, you've gone out of your way to get
Py2.2 installed. Why are you so convinced that you -need- Python 2.2
over 2.4? Everyone problem you've posted here seems due to that
assumption...

Generally, Python is pretty good about backwards compatibility. Code
written for 2.2 should run fine under 2.4. As you're discovering, the
opposite isn't true. __future__ isn't a cure-all.
--
http://mail.python.org/mailman/listinfo/python-list


deets at nospam

Jul 24, 2008, 2:47 AM

Post #6 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

> Thx for that info. I understand.
> The requirements state that it needs Python 2.2, But i wonder
> how that program has been implemented using Python 2.3 features.
> Anyhow, this has to be resolved and i need your help.
>
> Kindly let me know a trick to make to resolve
> the 'in' operator related problem by using Python 2.2.

You obviously don't understand and it appears that it's time to resort to
somewhat more explicit clue-batting:

YOU ARE UNDER A WRONG IMPRESSION THAT YOUR SOFTWARE REQUIRES PYTHON 2.2. YOU
HAVE BEEN TOLD THAT NUMEROUS TIMES. SO PLEASE - STOP USING PYTHON 2.2 FOR
IT. WHOEVER TOLD YOU THAT IT IS NEEDED WAS ****WROOOOONG******

Now did that get through? Given your record here, I think I have to
repeat...

STOP USING PYTHON 2.2. NOW!

Diez

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


fredrik at pythonware

Jul 24, 2008, 2:47 AM

Post #7 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

karthikbalaguru wrote:

> The requirements state that it needs Python 2.2, But i wonder
> how that program has been implemented using Python 2.3 features.
> Anyhow, this has to be resolved and i need your help.

No, you need the help of the original author. He/she might have
forgotten to update the requirements page, or you may have mis-
read the information. Only the author knows if this program might
have a chance of working on 2.2.

What program is this? Can you point us to the site where you
got it?

> Kindly let me know a trick to make to resolve
> the 'in' operator related problem by using Python 2.2.

Instead of backporting the software, why not just update to Python
2.3 or newer and be done with it? Why insist on using a Python version
that's nearly seven years old, when the program you're trying to run
obviously wasn't written for it?

(Note that you can have multiple versions of Python installed on the
same machine. Maybe you already have -- have you tried running the
program with "python2.3" or "python2.4" or "python2.5" instead of just
"python"?)

</F>

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


sjmachin at lexicon

Jul 24, 2008, 4:12 AM

Post #8 of 9 (287 views)
Permalink
Re: Requires a character ... !! [In reply to]

On Jul 24, 7:23 pm, Ulrich Eckhardt <eckha...@satorlaser.com> wrote:
> karthikbalaguru wrote:
> > [root [at] localhos hello]# Analyzer hello_input
>
> ^^^^^^^^^^^^^^
> This is often a bad idea. Anyhow, that has nothing to do with Python.
>
> > Loading debug info: hello_input
> > Traceback (most recent call last):
> > File "/usr/local/SDK/host/bin/Analyzer", line 694, in ?
> > app.dbg.readObjectInfo(elf)
> > File "/usr/local/SDK/host/bin/debugprocessor.py", line 427, in
> > readObjectInfo
> > self.privateProcessorDwarfTree.readProcessorDwarfTree(filename)
> > File "/usr/local/SDK/bin/debugprocessor.py", line 314, in
> > readDwarfTree
> > if "DW_OP_reg" in value:
> > TypeError: 'in <string>' requires character as left operand
>
> > Is this related with the version conflicts ?
>
> Which version conflict? Sorry, but my crystal ball is getting a new polish
> today, so I can't see the actual code that causes the error. I suggest that
> you reduce your code to the smallest possible piece of code that still
> shows the error and post it here, otherwise nobody will be able to help
> you.

You don't need a crystal ball; you just need to have been reading this
group/list for the last day or so --- the OP is trying to use Python
2.2 on some *.py that are obviously written for a later version,
refuses to contemplate upgrading, and starts a new thread every time
he gets a syntax error.
--
http://mail.python.org/mailman/listinfo/python-list


fredrik at pythonware

Jul 24, 2008, 4:58 AM

Post #9 of 9 (280 views)
Permalink
Re: Requires a character ... !! [In reply to]

John Machin wrote:

> You don't need a crystal ball; you just need to have been reading this
> group/list for the last day or so --- the OP is trying to use Python
> 2.2 on some *.py that are obviously written for a later version,
> refuses to contemplate upgrading, and starts a new thread every time
> he gets a syntax error.

The traceback indicates that this is some software for working with
debug data (http://dwarfstd.org/), but neither Google nor Kodos finds
anything similar to the code you see in the tracebacks, so it's probably
some proprietary stuff. And for some reason, the OP seems to be a bit
unwilling to ask the supplier for help...

</F>

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

Python python RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.