Keryx says: "the handle is invalid"

Asked by Mahdi Fattahi

When I try to run keryx from my usb flash memory it gives this error message and won't start:
H:/keryx/win32/keryx.exe The handle is invalid

Question information

Language:
English Edit question
Status:
Solved
For:
Keryx Edit question
Assignee:
No assignee Edit question
Solved by:
Mahdi Fattahi
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Chris Oliver (excid3) said :
#1

What operating system are you experiencing this issue on/

Revision history for this message
Mahdi Fattahi (mfat) said :
#2

Windows XP SP3

On Wed, May 5, 2010 at 2:31 AM, Chris Oliver <
<email address hidden>> wrote:

> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Status: Open => Needs information
>
> Chris Oliver requested for more information:
> What operating system are you experiencing this issue on/
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/keryx/+question/109569
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Mahdi Fattahi (mfat) said :
#3

Windows XP SP3

Revision history for this message
Chris Oliver (excid3) said :
#4

This appears to be a bug with py2exe and/or the subprocess module. Do you have administrative access to install python 2.5 and pygtk on Windows by chance? Running from source like this could help us determine if the issue is py2exe related or not. Thanks!

Chris

Revision history for this message
Mahdi Fattahi (mfat) said :
#5

Yes i have admin rights. I will install them and inform u of the result.

On 5/5/10, Chris Oliver <email address hidden> wrote:
> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Status: Open => Needs information
>
> Chris Oliver requested for more information:
> This appears to be a bug with py2exe and/or the subprocess module. Do
> you have administrative access to install python 2.5 and pygtk on
> Windows by chance? Running from source like this could help us determine
> if the issue is py2exe related or not. Thanks!
>
> Chris
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/keryx/+question/109569
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Mahdi Fattahi (mfat) said :
#6

I installed python 2.5, pygtk 2.16 and latest gtk+ runtime, but keryx still fails to start.

Revision history for this message
Mahdi Fattahi (mfat) said :
#7

I installed python 2.6 too as pygtk said it requires python 2.6. Still no success.

Revision history for this message
Chris Oliver (excid3) said :
#8

Hmmm...Did it give you any different errors? I am surprised of this. Run it from terminal and see if the output there is any different and post the traceback for us to take a look at. Hopefully we can get this figured out for you.

Revision history for this message
Mahdi Fattahi (mfat) said :
#9

Dear Chris

This is what I get when launching keryx:

F:\keryx\keryx\win32>keryx.exe
Loading config: F:\keryx\keryx\win32\keryx.conf
Traceback (most recent call last):
  File "<string>", line 132, in <module>
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 49, in Start
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7978, in __init_
_
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7552, in _Bootst
rapApp
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 27, in OnInit

  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.log", line 46, in info
LookupError: unknown encoding: cp720

Revision history for this message
Chris Oliver (excid3) said :
#10

Thanks for the output. I would try deleting the logs folder and running Keryx again. Hopefully that will help as there is something wrong with the formatting of the file according to that error it seems.

Revision history for this message
Chris Oliver (excid3) said :
#11

Thanks for the output. I would try deleting the logs folder and running Keryx again. Hopefully that will help as there is something wrong with the formatting of the file according to that error it seems.

Revision history for this message
Chris Oliver (excid3) said :
#12

Thanks for the output. I would try deleting the logs folder and running Keryx again. Hopefully that will help as there is something wrong with the formatting of the file according to that error it seems.

Revision history for this message
Chris Oliver (excid3) said :
#13

Need to see if the error is fixed after deleting the logs folder.

Revision history for this message
Mahdi Fattahi (mfat) said :
#14

I cleared the logs folder and tried running keryx again. This is what I got:

F:\keryx\keryx\win32>keryx.exe
Loading config: F:\keryx\keryx\win32\keryx.conf
Traceback (most recent call last):
  File "<string>", line 132, in <module>
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 49, in Start
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7978, in __init_
_
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7552, in _Bootst
rapApp
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 27, in OnInit

  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.log", line 46, in info
LookupError: unknown encoding: cp720

Revision history for this message
Mahdi Fattahi (mfat) said :
#15

I cleared the logs folder and tried running keryx again. This is what I got:

F:\keryx\keryx\win32>keryx.exe
Loading config: F:\keryx\keryx\win32\keryx.conf
Traceback (most recent call last):
  File "<string>", line 132, in <module>
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 49, in
Start
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7978, in
__init_
_
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7552, in
_Bootst
rapApp
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 27, in
OnInit

  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.log", line 46, in info
LookupError: unknown encoding: cp720

On Thu, May 13, 2010 at 3:18 PM, Chris Oliver <
<email address hidden>> wrote:

> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Status: Answered => Needs information
>
> Chris Oliver changed the question status:
> Need to see if the error is fixed after deleting the logs folder.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Mahdi Fattahi (mfat) said :
#16

Sorry for the duplicate messages

Revision history for this message
Mahdi Fattahi (mfat) said :
#17

By the way I don't know if this has anything to do with the error but I am behind an ISA server firewall.

Revision history for this message
Chris Oliver (excid3) said :
#18

What is your default language on that computer? It appears that it's a problem with using a string to open the filename since it is in a different locale.

Revision history for this message
Mahdi Fattahi (mfat) said :
#19

English. I'm not sure what you mean by "string to open the filename"?

Revision history for this message
Chris Oliver (excid3) said :
#20

Alright hmm...Which version of python do you have installed?

Revision history for this message
Chris Oliver (excid3) said :
#21

And just to double check you are now running it from Keryx.py correct?

Revision history for this message
Mahdi Fattahi (mfat) said :
#22

No I executed keryx.exe from the win32 folder. How can I run it from Keryx.py?

On 5/13/10, Chris Oliver <email address hidden> wrote:
> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Chris Oliver requested for more information:
> And just to double check you are now running it from Keryx.py correct?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/keryx/+question/109569
>
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Chris Oliver (excid3) said :
#23

Ah okay. That is probably why you aren't getting different outputs. Since you have Python and GTK installed, now you can open up the linux directory and double click on Keryx.py and run that instead. This will run it straight from the source code instead.

We have a little write up here about it: http://keryxproject.org/wiki/index.php?title=Running_Keryx_from_source

Hopefully that helps and will give you different output.

Revision history for this message
Mahdi Fattahi (mfat) said :
#24

OK. Keryx is on my office PC (where I have broadband). On Saturday
I'll test this and report the output.

On 5/13/10, Chris Oliver <email address hidden> wrote:
> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Chris Oliver posted a new comment:
> Ah okay. That is probably why you aren't getting different outputs.
> Since you have Python and GTK installed, now you can open up the linux
> directory and double click on Keryx.py and run that instead. This will
> run it straight from the source code instead.
>
> We have a little write up here about it:
> http://keryxproject.org/wiki/index.php?title=Running_Keryx_from_source
>
> Hopefully that helps and will give you different output.
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Mahdi Fattahi (mfat) said :
#25

OK here's the output:
F:\keryx\keryx\linux>F:\Python25\python.exe keryx
  File "keryx", line 1
SyntaxError: Non-ASCII character '\xc0' in file keryx on line 2, but
 declared; see http://www.python.org/peps/pep-0263.html for details

Revision history for this message
Chris Oliver (excid3) said :
#26

Actually try it against keryx.py in the source directory and see what happens then. The keryx file in the linux directory is actually an executable and wouldn't work being run with the python interpreter.

Revision history for this message
Chris Oliver (excid3) said :
#27

Sorry for all the trouble. Hopefully we can get this figured out for you soon!

Revision history for this message
Mahdi Fattahi (mfat) said :
#28

No problem. I'd be glad if I could help you make the app better.

Here's the output of running keryx.py from source directory:

F:\keryx\keryx\source>"f:\Python25\python.exe" keryx.py
Loading config: F:\keryx\keryx\source\keryx.conf
Traceback (most recent call last):
  File "keryx.py", line 115, in <module>
    import wxversion
ImportError: No module named wxversion

F:\keryx\keryx\source>

On Sat, May 15, 2010 at 8:48 AM, Chris Oliver <
<email address hidden>> wrote:

> Your question #109569 on Keryx changed:
> https://answers.launchpad.net/keryx/+question/109569
>
> Chris Oliver posted a new comment:
> Sorry for all the trouble. Hopefully we can get this figured out for you
> soon!
>
> --
> You received this question notification because you are a direct
> subscriber of the question.
>

Revision history for this message
Chris Oliver (excid3) said :
#29

If you can, install the package python-wxversion on there and run keryx.py again. It's an important package for Keryx so you'll need that to run it. Forgot to mention it. Hopefully that will work for you.

Revision history for this message
Mahdi Fattahi (mfat) said :
#30

Where can I get it for Windows?

Revision history for this message
Mahdi Fattahi (mfat) said :
#31

OK I installed wxpython and this is the output:

F:\keryx\keryx\win32>keryx.exe
Loading config: F:\keryx\keryx\win32\keryx.conf
Traceback (most recent call last):
  File "<string>", line 132, in <module>
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 49, in Start
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7978, in __init_
_
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/wx._core", line 7552, in _Bootst
rapApp
  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.wxkeryx", line 27, in OnInit

  File "keryx\build\pyi.win32\keryx\outPYZ1.pyz/lib.log", line 46, in info
LookupError: unknown encoding: cp720

F:\keryx\keryx\win32>

Revision history for this message
mac9416 (mac9416) said :
#32
Revision history for this message
mac9416 (mac9416) said :
#33

OK, could you run keryx.py in the 'source' directory?

Revision history for this message
Mahdi Fattahi (mfat) said :
#34

F:\keryx\keryx\source>keryx.py
Loading config: F:\keryx\keryx\source\keryx.conf
Traceback (most recent call last):
  File "F:\keryx\keryx\source\keryx.py", line 132, in <module>
    lib.wxkeryx.Start()
  File "F:\keryx\keryx\source\lib\wxkeryx\__init__.py", line 49, in Start
    keryx = wxKeryx(0)
  File "F:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7978
, in __init__
    self._BootstrapApp()
  File "F:\Python26\lib\site-packages\wx-2.8-msw-unicode\wx\_core.py", line 7552
, in _BootstrapApp
    return _core_.PyApp__BootstrapApp(*args, **kwargs)
  File "F:\keryx\keryx\source\lib\wxkeryx\__init__.py", line 27, in OnInit
    log.info(_('wxWidgets interface loaded'))
  File "F:\keryx\keryx\source\lib\log.py", line 46, in info
    print status
LookupError: unknown encoding: cp720

F:\keryx\keryx\source>

Revision history for this message
Chris Oliver (excid3) said :
#35

A temporary fix should be either deleting line 46 of source/lib/log.py or commenting out the line. It may or may not work because I'm unsure what Keryx will do with this weird character. You can try that and let us know if solves the problem or not and we can go from there.

I will be gone for a week so hopefully mac9416 can help you while I'm gone.

Revision history for this message
Mahdi Fattahi (mfat) said :
#36

Yes it worked! Thank you!

Revision history for this message
Mahdi Fattahi (mfat) said :
#37

Yes it worked! Thank you!

Revision history for this message
Chris Oliver (excid3) said :
#38

Awesome! Good to hear!

Revision history for this message
Mahdi Fattahi (mfat) said :
#39

But I'm now affected by this bug:
https://bugs.launchpad.net/keryx/+bug/405631

:(

Revision history for this message
Chris Oliver (excid3) said :
#40

Doh. What is your output of running Python (by itself) and doing the following commands:

import platform
platform.dist()

You should get something like this:

chris@apoch:~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.dist()
('Ubuntu', '10.04', 'lucid')

Revision history for this message
Chris Oliver (excid3) said :
#41

Also, which version of Ubuntu are you trying to create the project on?

Revision history for this message
Mahdi Fattahi (mfat) said :
#42

I'm on Windows XP now. My target system is 10.04 (lucid)

Revision history for this message
Mahdi Fattahi (mfat) said :
#43

Oops! I didn't know this: "you’ll have to create your project on the Debian machine. "

Revision history for this message
Chris Oliver (excid3) said :
#44

Ah yep common problem. i haven't had time to make a pre-made Lucid project that you could download but should have it done shortly after I get back next week. Hope everything works for you from here on out!

Revision history for this message
Mahdi Fattahi (mfat) said :
#45

Thank you.