Problem building ObjectHandler

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem building ObjectHandler

Erik Schlogl

Hi,

 

I’ve followed the instructions for installing ObjectHandler 0.9.7 under Windows, and got to the point where I’ve loaded the Visual C++ Solution into Visual C++ 2008 Express Edition. A build of the solution then fails with the following error:

 

1>------ Build started: Project: ohgensrc, Configuration: All Win32 ------

1>Performing Makefile project actions

1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

1>Copyright (C) Microsoft Corporation.  All rights reserved.

1> ..\..\gensrc\gensrc.py -xdlv --oh_dir=..

1>  File "c:\build_ql_0_9_7\gensrc\gensrc.py", line 51

1>    print USAGE_ERROR % { 'scriptName' : sys.argv[0] }

1>                    ^

1>SyntaxError: invalid syntax

1>NMAKE : fatal error U1077: '..\..\gensrc\gensrc.py' : return code '0x1'

1>Stop.

1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

1>Build log was saved at "file://c:\build_ql_0_9_7\ObjectHandler\gensrc\build\vc\BuildLog.htm"

1>ohgensrc - 2 error(s), 0 warning(s)

 

This looks like Python doesn’t understand the gensrc.py script. I have

 

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32

 

If I try to execute gensrc.py from the IDLE Python GUI directly, I get a similar error.

 

I’m no expert on Python, so I don’t have a clue where this problem might be coming from.

 

Can anyone help?

 

Thanks,

Erik

 

UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.

------------------------------------------------------------------------------


_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem building ObjectHandler

Don Stewart-3
Hi Erik,
I'm build QuantLibXL using Python 2.5.4. I recently had  what looks to be a similar issue to the one you are experiencing.
 
To find out more information about the error you could try:-
At a command prompt, change directory to ObjectHandler\gensrc then run
 
..\..\gensrc\gensrc.py -xdlv --oh_dir=..
 
The resolution I found for my issue was:-
 It turned out that windows association of Python interpreter to .py file association was incorrect. See http://bugs.python.org/issue7936. To determine Python interpreter file association, at the DOS Prompt key in:-

    assoc .py

this displays a string like ".py=py_auto_file". Now type

    ftype py_auto_file

(actually replace py_auto_file with the output from the first command)

This should display something like

    py_auto_file="C:\Program Files\Python25\python.exe" "%1" %*

If %* is missing, then arguments are not passed to the python interpreter.

 
Regards Don Stewart

From: Erik Schlogl [mailto:[hidden email]]
Sent: 14 May 2010 05:55
To: [hidden email]
Subject: [Quantlib-users] Problem building ObjectHandler

Hi,

 

I’ve followed the instructions for installing ObjectHandler 0.9.7 under Windows, and got to the point where I’ve loaded the Visual C++ Solution into Visual C++ 2008 Express Edition. A build of the solution then fails with the following error:

 

1>------ Build started: Project: ohgensrc, Configuration: All Win32 ------

1>Performing Makefile project actions

1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

1>Copyright (C) Microsoft Corporation.  All rights reserved.

1> ..\..\gensrc\gensrc.py -xdlv --oh_dir=..

1>  File "c:\build_ql_0_9_7\gensrc\gensrc.py", line 51

1>    print USAGE_ERROR % { 'scriptName' : sys.argv[0] }

1>                    ^

1>SyntaxError: invalid syntax

1>NMAKE : fatal error U1077: '..\..\gensrc\gensrc.py' : return code '0x1'

1>Stop.

1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

1>Build log was saved at "file://c:\build_ql_0_9_7\ObjectHandler\gensrc\build\vc\BuildLog.htm"

1>ohgensrc - 2 error(s), 0 warning(s)

 

This looks like Python doesn’t understand the gensrc.py script. I have

 

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32

 

If I try to execute gensrc.py from the IDLE Python GUI directly, I get a similar error.

 

I’m no expert on Python, so I don’t have a clue where this problem might be coming from.

 

Can anyone help?

 

Thanks,

Erik

 

UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.

 

 

This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)

25 The North Colonnade,

Canary Wharf,

London

E14 5HS

United Kingdom

Registered as a Limited Company in England and Wales No.1920623.

Registered Office as above

Switchboard: 020 7066 1000

Web Site: http://www.fsa.gov.uk

*****************************************************************

 


------------------------------------------------------------------------------


_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem building ObjectHandler

Erik Schlogl

Hi Don,

 

Thanks for your reply. Unfortunately my problem seems to be different from yours. Following your steps, I get

 

C:\build_ql_0_9_7\gensrc>gensrc.py -xdlv --oh_dir=..

  File "C:\build_ql_0_9_7\gensrc\gensrc.py", line 51

    print USAGE_ERROR % { 'scriptName' : sys.argv[0] }

                    ^

SyntaxError: invalid syntax

 

C:\build_ql_0_9_7\gensrc>assoc .py

.py=Python.File

 

C:\build_ql_0_9_7\gensrc>ftype Python.File

Python.File="C:\Python31\python.exe" "%1" %*

 

So in particular the %* is there, not missing…

 

Best regards,

Erik

 

From: Don Stewart [mailto:[hidden email]]
Sent: Friday, 14 May 2010 4:30 PM
To: Erik Schlogl; [hidden email]
Subject: RE: [Quantlib-users] Problem building ObjectHandler

 

Hi Erik,

I'm build QuantLibXL using Python 2.5.4. I recently had  what looks to be a similar issue to the one you are experiencing.

 

To find out more information about the error you could try:-

At a command prompt, change directory to ObjectHandler\gensrc then run

 

..\..\gensrc\gensrc.py -xdlv --oh_dir=..

 

The resolution I found for my issue was:-

 It turned out that windows association of Python interpreter to .py file association was incorrect. See http://bugs.python.org/issue7936. To determine Python interpreter file association, at the DOS Prompt key in:-

    assoc .py

this displays a string like ".py=py_auto_file". Now type

    ftype py_auto_file

(actually replace py_auto_file with the output from the first command)

This should display something like

    py_auto_file="C:\Program Files\Python25\python.exe" "%1" %*

If %* is missing, then arguments are not passed to the python interpreter.

 

Regards Don Stewart

[hidden email]


From: Erik Schlogl [mailto:[hidden email]]
Sent: 14 May 2010 05:55
To: [hidden email]
Subject: [Quantlib-users] Problem building ObjectHandler

Hi,

 

I’ve followed the instructions for installing ObjectHandler 0.9.7 under Windows, and got to the point where I’ve loaded the Visual C++ Solution into Visual C++ 2008 Express Edition. A build of the solution then fails with the following error:

 

1>------ Build started: Project: ohgensrc, Configuration: All Win32 ------

1>Performing Makefile project actions

1>Microsoft (R) Program Maintenance Utility Version 9.00.21022.08

1>Copyright (C) Microsoft Corporation.  All rights reserved.

1> ..\..\gensrc\gensrc.py -xdlv --oh_dir=..

1>  File "c:\build_ql_0_9_7\gensrc\gensrc.py", line 51

1>    print USAGE_ERROR % { 'scriptName' : sys.argv[0] }

1>                    ^

1>SyntaxError: invalid syntax

1>NMAKE : fatal error U1077: '..\..\gensrc\gensrc.py' : return code '0x1'

1>Stop.

1>Project : error PRJ0019: A tool returned an error code from "Performing Makefile project actions"

1>Build log was saved at "file://c:\build_ql_0_9_7\ObjectHandler\gensrc\build\vc\BuildLog.htm"

1>ohgensrc - 2 error(s), 0 warning(s)

 

This looks like Python doesn’t understand the gensrc.py script. I have

 

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32

 

If I try to execute gensrc.py from the IDLE Python GUI directly, I get a similar error.

 

I’m no expert on Python, so I don’t have a clue where this problem might be coming from.

 

Can anyone help?

 

Thanks,

Erik

 

UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.

 

 

This communication and any attachments contains information which is confidential and may be subject to legal privilege. It is for intended recipients only. If you are not the intended recipient you must not copy, distribute, publish, rely on or otherwise use it without our consent. Some of our communications may contain confidential information which it could be a criminal offence for you to disclose or use without authority. If you have received this email in error please notify [hidden email] immediately and delete the email from your computer.

The FSA reserves the right to monitor all email communications for compliance with legal, regulatory and professional standards.

This email is not intended to nor should it be taken to create any legal relations or contractual relationships. This email has originated from

The Financial Services Authority (FSA)

25 The North Colonnade,

Canary Wharf,

London

E14 5HS

United Kingdom

Registered as a Limited Company in England and Wales No.1920623.

Registered Office as above

Switchboard: 020 7066 1000

Web Site: http://www.fsa.gov.uk

*****************************************************************

 

UTS CRICOS Provider Code: 00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information. If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments. If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.

------------------------------------------------------------------------------


_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem building ObjectHandler

Luigi Ballabio
In reply to this post by Erik Schlogl
On Fri, 2010-05-14 at 14:54 +1000, Erik Schlogl wrote:
> This looks like Python doesn’t understand the gensrc.py script. I
> have
> Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
> (Intel)] on win32

I suggest you use a Python from the 2.x series (the current 2.6 should
work.)  The Python 3 series is still kind of experimental.

Luigi


--

Just remember what ol' Jack Burton does when the earth quakes, the
poison arrows fall from the sky, and the pillars of Heaven shake. Yeah,
Jack Burton just looks that big old storm right in the eye and says,
"Give me your best shot. I can take it."
-- Jack Burton, "Big trouble in Little China"



------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem building ObjectHandler

Bojan Nikolic

Luigi Ballabio <[hidden email]> writes:

> On Fri, 2010-05-14 at 14:54 +1000, Erik Schlogl wrote:
>> This looks like Python doesn’t understand the gensrc.py script. I
>> have
>> Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
>> (Intel)] on win32
>
> I suggest you use a Python from the 2.x series (the current 2.6 should
> work.)  The Python 3 series is still kind of experimental.

Not just experimental, but also it intentionally breaks compatibility
with the 2.x series:

http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition

In the particular case shown by Erik, I think it is the change in
meaning of "print" from a statement to a function that is breaking
things.

Best,
Bojan





--
Bojan Nikolic          ||          http://www.bnikolic.co.uk

------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem building ObjectHandler

Erik Schlogl
Thanks Bojan, Luigi - switching to Python 2.6 did the trick.

Best regards,
Erik



-----Original Message-----
From: Bojan Nikolic [mailto:[hidden email]]
Sent: Friday, 14 May 2010 11:45 PM
To: [hidden email]
Cc: Erik Schlogl; [hidden email]
Subject: Re: [Quantlib-users] Problem building ObjectHandler


Luigi Ballabio <[hidden email]> writes:

> On Fri, 2010-05-14 at 14:54 +1000, Erik Schlogl wrote:
>> This looks like Python doesn’t understand the gensrc.py script. I
>> have
>> Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
>> (Intel)] on win32
>
> I suggest you use a Python from the 2.x series (the current 2.6 should
> work.)  The Python 3 series is still kind of experimental.

Not just experimental, but also it intentionally breaks compatibility
with the 2.x series:

http://www.python.org/dev/peps/pep-3000/#compatibility-and-transition

In the particular case shown by Erik, I think it is the change in
meaning of "print" from a statement to a function that is breaking
things.

Best,
Bojan





--
Bojan Nikolic          ||          http://www.bnikolic.co.uk

UTS CRICOS Provider Code:  00099F
DISCLAIMER: This email message and any accompanying attachments may contain confidential information.  If you are not the intended recipient, do not
read, use, disseminate, distribute or copy this message or attachments.  If
you have received this message in error, please notify the sender immediately
and delete this message. Any views expressed in this message are those of the individual sender, except where the sender expressly, and with authority,
states them to be the views of the University of Technology Sydney. Before
opening any attachments, please check them for viruses and defects.

Think. Green. Do.

Please consider the environment before printing this email.
------------------------------------------------------------------------------

_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users