473,594 Members | 2,682 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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@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.readObj ectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor. py", line 427, in
readObjectInfo
self.privatePro cessorDwarfTree .readProcessorD warfTree(filena me)
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
8 1643
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.readObj ectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor. py", line 427, in
readObjectInfo
self.privatePro cessorDwarfTree .readProcessorD warfTree(filena me)
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
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.readObj ectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor. py", line 427, in
readObjectInfo
self.privatePro cessorDwarfTree .readProcessorD warfTree(filena me)
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ühr er: Thorsten Föcking, Amtsgericht Hamburg HR B62 932

Jul 24 '08 #3
On Jul 24, 2:20 pm, Fredrik Lundh <fred...@python ware.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.readObj ectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor. py", line 427, in
readObjectInfo
self.privatePro cessorDwarfTree .readProcessorD warfTree(filena me)
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
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
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
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
On Jul 24, 7:23 pm, Ulrich Eckhardt <eckha...@sator laser.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.readObj ectInfo(elf)
File "/usr/local/SDK/host/bin/debugprocessor. py", line 427, in
readObjectInfo
self.privatePro cessorDwarfTree .readProcessorD warfTree(filena me)
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
8143
by: Safalra | last post by:
The idea here is relatively simple: a java program (I'm using JDK1.4 if that makes a difference) that loads an HTML file, removes invalid characters (or replaces them in the case of common ones like Microsoft's 'smartquotes'), and outputs the file. The problem is these files will be on disk, so the program won't have the character encoding information from the server. Questions:
37
10136
by: chandy | last post by:
Hi, I have an Html document that declares that it uses the utf-8 character set. As this document is editable via a web interface I need to make sure than high-ascii characters that may be accidentally entered are properly represented when the document is served. My programming language allows me to get the ascii value for any individual character so what I am doing when a change is saved is to look at each character in the content and...
7
96283
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %% should be used. Wouldn't it have been better (from design perspective) if the same escape character had been used in this case too. Forgive me for posting without verfying things with any standard compiler, i don't have the means for now.
8
8210
by: SteveK | last post by:
I'm getting the error: "Cannot implicitly convert type 'MovesDBMigrate.MotionNameElementTypes' to 'int'" for this line of code: m_nameElementTableNames = "Tbl_NameCharacters"; Of course if I cast int to it, then it compiles, but if I have declared the enum's type as int, why do I need to cast int to the value?
15
10996
by: wizardyhnr | last post by:
i want to try ANSI C99's unicode fuctions. so i write a test program. the function is simple, but i cannot compile it with dev c++ 4.9.9.2 under windows xp sp2, since the compiler always think that the initialization of the wchar_t string is illegal. here is my function: #include <stdio.h> #include <stdlib.h> #include <wchar.h> #include <wctype.h> #include <string.h>
5
3182
by: Amit_Basnak | last post by:
Dear Friends I have been getting the following error Error 185: "WorkFlow_dce.cpp", line 58 # Left side of '->' requires a pointer to class; type found was 'struct WF_SEARCH_WU'. lclStruct->wfWuHandle.workunitId =(long) feStruct->wfWuHandle- ^^^^^^^^ Error 185: "WorkFlow_dce.cpp", line 59 # Left side of '->' requires a pointer to class; type found was 'struct WF_SEARCH_WU'.
17
10636
by: =?Utf-8?B?R2Vvcmdl?= | last post by:
Hello everyone, Wide character and multi-byte character are two popular encoding schemes on Windows. And wide character is using unicode encoding scheme. But each time I feel confused when talking with another team -- codepage -- at the same time. I am more confused when I saw sometimes we need codepage parameter for wide character conversion, and sometimes we do not need for conversion. Here are two examples,
3
10189
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class. This is not a regular expression tutorial. Assumes you are already familiar with basic regular expression concepts and terminology. If not, you may want to read some regular expression tutorial. See the end of the article for links to online resources....
10
3966
by: Paul W | last post by:
Hi all, I have an application that reads data in from a text file and stores it in a database. My problem is that there are some characters in the file that aren't being handled properly. For instance, one of the characters has an ASCII code of 150 (it looks like a dash '-'), when I'm debugging this character is displayed as the square box that Windows uses for unsupported characters and when it's copied to the database it's stored as...
0
7954
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8259
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8244
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6669
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5415
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3871
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3905
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2391
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.