Jump to content
BastiFantasti

Issues running Demo Projects on D10.4.2 / Python 3.9.2

Recommended Posts

Hi @all


first of all thanks for that awesome idea to add Python Support in Delphi.

I really appreciate it!

Here's what I did so far:

- installed Python 3.9.2 x64

- installed Python4Delphi directly from Github (all ok)

Now I tried to run the included demo projects to get comfortable with the options of this module.

All test are done with x64 Windows Compiler

Demo Project 01-06 are executing ok


## Demo07

- First Messagebox showing  up:


    args of foo: ('hello world', 1)

 

 

but then it prints the following:

 

[Window Title]
Demo07

[Content]
Form's caption = Demo of Python

[OK]

 

and then an Exception pops up

---------------------------
GExperts Debugger Exception Notification
---------------------------
Project Demo07.exe raised exception class EPythonError with message 'Python object "(10, 25)" is not a Delphi class'.
---------------------------
[&Filter ...] [Ignore &All this Session] [Break] [Continue]
---------------------------


But if I get the Python code right it should have created a Python Point Object and print out Point + object handle or values

then the demo breaks

 

 

## Demo31

 

compiles and starts up ok, but when pressing the Execute button it throws an error:

---------------------------
GExperts Debugger Exception Notification
---------------------------
Project Demo31.exe raised exception class EPyImportError with message 'ImportError: cannot import name 'rtti_var' from 'spam' (unknown location)'.
---------------------------
[&Filter ...] [Ignore &All this Session] [Break] [Continue]
---------------------------

The UI is not created and not shown

 

 

 

 

This is how far I have tested the embedded demos. 

Any help is greatly appreciated

 

Best regards

Bastian

 

Share this post


Link to post

Please update to the most recent version.

  • Demo7 is fixed.
  • I can run Demo31 without any issues.

Share this post


Link to post

Thanks for your reply I'll try it tomorrow and keep you updated.i just wanted to make sure that I have done the installation right

Best regards

Bastian

 

Share this post


Link to post

Now I was able to test the updated version from github.

Demo7 now runs without issues.

 

But when I run Demo31 I get the following error:

 

Exception of class EPyImportError with Message 'ImportError: cannot import name 'rtti_var' from 'spam' (unknown location)' 
 

Do I have to set any compiler switches or any other defines?

Share this post


Link to post

You need to add:

{$I Definition.inc}
to the Demo 31 Unit1.pas

 

It was accidentally deleted in a recent commit.  This is now fixed.

 

 

Share this post


Link to post

Hi,

 

I've pulled the latest version from github and now the demo successfully runs!

 

Thanks for your support and fast response!

 

Best regards

Bastian

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×