Einhugur Python3Script Plugin; Bug or my fault?

Hi,

I’m new to Python and new to Einhugur plugins and I try to test Python3Script Demo version.
I’m stuck. Bug or my fault?

I placed the two files
Python3Script.xojo_plugin and
#CoreClasses.xojo_plugin
in C:\Program Files\Xojo\Xojo 2019r3.1\Plugins

and run the demo program
Python Simple Test.xojo_binary_project
in the IDE.

Rather quickly I get Runtime Error:
Common\plugin.cpp:990
Failure Condition:pluginEntryTable.GetEntry( entrypointName,out)
can’t find plugin method Python3EntityBase.__init

Python 3.8.3 is installed om my W10/64 machine. The plugins are just downloaded.
(Other Xojo demo programs that were included give the same error)

Thanks.
Lennart

Hi Lennart,

I tried myself in Xojo 2019R3.1 and it does seem that the plugin fails to load BUT if you try the python example in 2019R1.1 it will work fine.

Thanks Brian,

I reported it to Einhugur
Ticket #5473 Plugin Python3Script fails with Xojo 2019r3.1

Regards
Lennart

Ok so…

I tested on Xojo 2019r1.1 - 2019r3 and 2019r3.1 and was able to run on all of them.

Could you guys try running it with minimum amount of plugins installed in case if it is the dreadful Max DLL issue on Xojo for Windows that your hitting. (P is fairly late in the alphabet so if you have a lot of plugins then anything late could get cut off if you hit the Max DLL issue)

If it is not the Max DLL dreadful issue then other things could be…

My Python instance was 32 bit version (which might be relevant to track this.

Other info:

In the Examples I had to adjust the following to get it to load the modules (this is not related to your crash though note that)

#if TargetMacOS
f = App.ExecutableFile.Parent.Parent.Parent.Parent.Child(“PythonModules”)
#elseif TargetWin32 or TargetLinux
f = App.ExecutableFile.Parent.Child(“PythonModules”)

// Added the following lines:
if not f.Exists then
f = App.ExecutableFile.Parent.Parent.Child(“PythonModules”)
end if
#endif

Bjorn,

I have the Python x32 and x64 installed on my work PC but I will test out the MAX DLL first thing in the morning and report back

Thanks for the quick response.
I have only a few plugins (6+2), but I renamed the folder Olugins
and created a new Plugins with only the two plugins from Einhugur.
It made no difference.
My Python is:
C:\Users\Lennart>python
Python 3.8.3 (tags/v3.8.3:6f8c832, May 13 2020, 22:20:19) [MSC v.1925 32 bit (Intel)] on win32

However, I installed and tried with Xojo 2019r1.1 and
this still gives the same fault for me, as opposed to what Brian reported.

Have you set your Xojo application to compile 32 bit ? (if Python is 32 bit then your Xojo app must be 32 bit as well) though it does not explain the plugin not loading since it should load in Xojo even if you have no Python at all.

I am running it in the IDE (have no current license yet).

I don’t want to complicate things, but FWIW I also tested building for RPi4 (ARM 32)
and it compiles and installs OK, but clicking the button ‘Run Python function’ gives ‘Could not load module’.

The problem has been located in 32 bit Demo build declaration. We will have update late tonight to fix this.

On the could not load module you have on the PI then thats just project hirachi that has changed you just need to adjust how your project finds the modules directory (and make sure you copy the modules folder to the ARM machine of course):

#if TargetMacOS
f = App.ExecutableFile.Parent.Parent.Parent.Parent.Child(“PythonModules”)
#elseif TargetWin32 or TargetLinux
f = App.ExecutableFile.Parent.Child(“PythonModules”)

// Added the following lines (for Windows this was needed):
if not f.Exists then
f = App.ExecutableFile.Parent.Parent.Child(“PythonModules”)
end if
#endif

OK my findings

I only had 8 plugins in the Xojo Plugins folder so I removed them all but #CoreClasses.xojo_plugin and Python3Script.xojo_plugin

Made sure to set a copy files for the Python Modules and everything worked fine

Edit: I tried with Xojo 2019R3.1 x32 and x64 Architecture and both worked fine

Thanks Brian !

There is chance its not Max DLL that was preventing it if you had just 8, but could have been error in one of them that came before the Python plugin, which would stop the loading of all that come after it.

[quote=495603:@Björn Eiríksson]Thanks Brian !

There is chance its not Max DLL that was preventing it if you had just 8, but could have been error in one of them that came before the Python plugin, which would stop the loading of all that come after it.[/quote]
That is what I was thinking. Today when I get more time I will try adding 1 by 1 back in and see if I can find which plugin was causing the issue

Thank you.
All is well with the new build.
Regards
Lennart