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

Help me to solve this error

P: 7
ValueError: need more than 1 value to unpack . This is the error I get

when I am using pyRXPU in the one of the scripts to get the strings from an application. Can anybody throw some light on this ..what might be the solution for this.

Error information for the reference :

Traceback (most recent call last):
File "D:\LanguageScripts\Screens.py", line 106, in test_1_01_DoSomething
TitlenSoftkeyfn()
File "D:\LanguageScripts\EventLog_Screens.py", line 66, in TitlenSoftkeyfn
titleBar = root.TitleBar.currentText
File "D:\LanguageScripts\XmlWrapper.py", line 35, in __getattr__
tagName, attrs, children, spare = child
ValueError: need more than 1 value to unpack
May 23 '07 #1
Share this Question
Share on Google+
7 Replies


bvdet
Expert Mod 2.5K+
P: 2,851
ValueError: need more than 1 value to unpack . This is the error I get

when I am using pyRXPU in the one of the scripts to get the strings from an application. Can anybody throw some light on this ..what might be the solution for this.

Error information for the reference :

Traceback (most recent call last):
File "D:\LanguageScripts\Screens.py", line 106, in test_1_01_DoSomething
TitlenSoftkeyfn()
File "D:\LanguageScripts\EventLog_Screens.py", line 66, in TitlenSoftkeyfn
titleBar = root.TitleBar.currentText
File "D:\LanguageScripts\XmlWrapper.py", line 35, in __getattr__
tagName, attrs, children, spare = child
ValueError: need more than 1 value to unpack
Expand|Select|Wrap|Line Numbers
  1. >>> a,b,c,d=[1,]
  2.  
  3. Traceback (most recent call last):
  4.   File "<pyshell#0>", line 1, in -toplevel-
  5.     a,b,c,d=[1,]
  6. ValueError: need more than 1 value to unpack
  7. >>> 
The length of sequence 'child' does not match the number of variables.
May 23 '07 #2

bartonc
Expert 5K+
P: 6,596
ValueError: need more than 1 value to unpack . This is the error I get

when I am using pyRXPU in the one of the scripts to get the strings from an application. Can anybody throw some light on this ..what might be the solution for this.

Error information for the reference :

Traceback (most recent call last):
File "D:\LanguageScripts\Screens.py", line 106, in test_1_01_DoSomething
TitlenSoftkeyfn()
File "D:\LanguageScripts\EventLog_Screens.py", line 66, in TitlenSoftkeyfn
titleBar = root.TitleBar.currentText
File "D:\LanguageScripts\XmlWrapper.py", line 35, in __getattr__
tagName, attrs, children, spare = child
ValueError: need more than 1 value to unpack
Search for "child ?=" (regex); the sourse must be a list, tuple, comprehension or generator; not a single object as it is now.
May 23 '07 #3

P: 7
Expand|Select|Wrap|Line Numbers
  1. >>> a,b,c,d=[1,]
  2.  
  3. Traceback (most recent call last):
  4.   File "<pyshell#0>", line 1, in -toplevel-
  5.     a,b,c,d=[1,]
  6. ValueError: need more than 1 value to unpack
  7. >>> 
The length of sequence 'child' does not match the number of variables.
************************************************** **********

Will check out the code again.Thanx for the reply
May 24 '07 #4

P: 7
Search for "child ?=" (regex); the sourse must be a list, tuple, comprehension or generator; not a single object as it is now.
**************************************************

Tahnks for the reply. But I have a question... What do you mean by Search for "child ?=" (regex); . Anyways I will check out if the source is one of those mentioned above
May 24 '07 #5

P: 7
**************************************************

Tahnks for the reply. But I have a question... What do you mean by Search for "child ?=" (regex); . Anyways I will check out if the source is one of those mentioned above
I have checked the code... The child what Iam getting is of the type 'Unicode'.

I tried to get the strings using pyRXP. When pyRXP is used the type of the child is a tuple. Now I dont have a clue what to do??
May 24 '07 #6

bartonc
Expert 5K+
P: 6,596
I have checked the code... The child what Iam getting is of the type 'Unicode'.

I tried to get the strings using pyRXP. When pyRXP is used the type of the child is a tuple. Now I dont have a clue what to do??
Search for "child ?=" (regex)
Regular Expression search: the '?' means maybe a space, maybe not.
the sourse must be a list, tuple, comprehension or generator; not a single object as it is now.
The tuple is what you are looking for.
May 24 '07 #7

P: 7
How we can change the unicode type to a tuple type.
May 24 '07 #8

Post your reply

Sign in to post your reply or Sign up for a free account.