By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,828 Members | 1,100 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,828 IT Pros & Developers. It's quick & easy.

Requires a character ... !!

P: n/a
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@localhost 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.readProcessorDwarfT ree(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
Jul 24 '08 #1
Share this Question
Share on Google+
8 Replies

P: n/a
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@localhost 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.readProcessorDwarfT ree(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>

Jul 24 '08 #2

P: n/a
karthikbalaguru wrote:
[root@localhost 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.readProcessorDwarfT ree(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

Jul 24 '08 #3

P: n/a
On Jul 24, 2:20 pm, Fredrik Lundh <fred...@pythonware.comwrote:
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@localhost 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.readProcessorDwarfT ree(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
Jul 24 '08 #4

P: n/a
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.
Jul 24 '08 #5

P: n/a
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>

Jul 24 '08 #6

P: n/a
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

Jul 24 '08 #7

P: n/a
On Jul 24, 7:23 pm, Ulrich Eckhardt <eckha...@satorlaser.comwrote:
karthikbalaguru wrote:
[root@localhost 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.readProcessorDwarfT ree(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.
Jul 24 '08 #8

P: n/a
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>

Jul 24 '08 #9

This discussion thread is closed

Replies have been disabled for this discussion.