468,294 Members | 1,812 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,294 developers. It's quick & easy.

Help me to solve this error

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
7 1825
bvdet
2,851 Expert Mod 2GB
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
6,596 Expert 4TB
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
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
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
**************************************************

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
6,596 Expert 4TB
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
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.

Similar topics

2 posts views Thread by QH Hong | last post: by
5 posts views Thread by xuatla | last post: by
3 posts views Thread by Marek | last post: by
7 posts views Thread by yuanlinjiang | last post: by
4 posts views Thread by Saky | last post: by
reply views Thread by Teichintx | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.