Help me to solve this error | Newbie | | Join Date: May 2007
Posts: 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
|  | Moderator | | Join Date: Oct 2006 Location: Nashville, TN
Posts: 1,563
| | | re: Help me to solve this error Quote:
Originally Posted by pythonuser 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 - >>> a,b,c,d=[1,]
-
-
Traceback (most recent call last):
-
File "<pyshell#0>", line 1, in -toplevel-
-
a,b,c,d=[1,]
-
ValueError: need more than 1 value to unpack
-
>>>
The length of sequence 'child' does not match the number of variables.
|  | Moderator | | Join Date: Sep 2006 Location: Minden, Nevada, USA
Posts: 6,400
| | | re: Help me to solve this error Quote:
Originally Posted by pythonuser 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.
| | Newbie | | Join Date: May 2007
Posts: 7
| | | re: Help me to solve this error Quote:
Originally Posted by bvdet - >>> a,b,c,d=[1,]
-
-
Traceback (most recent call last):
-
File "<pyshell#0>", line 1, in -toplevel-
-
a,b,c,d=[1,]
-
ValueError: need more than 1 value to unpack
-
>>>
The length of sequence 'child' does not match the number of variables. ************************************************** **********
Will check out the code again.Thanx for the reply
| | Newbie | | Join Date: May 2007
Posts: 7
| | | re: Help me to solve this error Quote:
Originally Posted by bartonc 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
| | Newbie | | Join Date: May 2007
Posts: 7
| | | re: Help me to solve this error Quote:
Originally Posted by pythonuser **************************************************
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??
|  | Moderator | | Join Date: Sep 2006 Location: Minden, Nevada, USA
Posts: 6,400
| | | re: Help me to solve this error Quote:
Originally Posted by pythonuser 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?? Quote:
Originally Posted by Barton Search for "child ?=" (regex) Regular Expression search: the '?' means maybe a space, maybe not. Quote:
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.
| | Newbie | | Join Date: May 2007
Posts: 7
| | | re: Help me to solve this error
How we can change the unicode type to a tuple type.
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 226,439 network members.
|