Author Topic: Addin written in python pops up server busy window  (Read 5260 times)

sandeep bhat

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Addin written in python pops up server busy window
« on: January 07, 2014, 05:50:17 pm »
Hi,
i took reference from the C# sample to create an addin and created my own addin in python. But when i wrote it in python, if the operation takes more than 3 seconds i get server busy window. Anyway i can avoid it or somebody has come across the same issue?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #1 on: January 07, 2014, 08:37:34 pm »
I guess you can only avoid it by making the add-in faster (by using C++ or the like ;-).

q.

sandeep bhat

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #2 on: January 07, 2014, 08:39:20 pm »
Well i dont have an option. It has to be done in python itself. But i dont understand why it works smooth with C# but not with python.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #3 on: January 08, 2014, 12:45:43 am »
I'd guess the message would also pop up with Cxx if it runs in a (merely) endless loop.

q.

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #4 on: January 08, 2014, 01:07:02 am »
Hi Sandeep,

Not sure I can help - but interested to know what is raising the server busy issue.

I've only seen "server busy" when connecting from an EA AddIn to an OLE server (e.g. XL, Word...).  In these cases the issue is that the AddIn is making a call to a the serving application and not getting a response within the request timeout period.  So how to adjust timeout?

I'm not familiar with python and how it operates - for example does it produce IL for .Net or is it a separate environment?  

The generic solution is to set the timeout period for requests to a large enough value or completely disable them.  Of course, you may not even be aware that requests are being made with any timeout values set as they are probably hidden e.g. it could be an environment configuration item.

However, if it is not a global configuration item there is probably somewhere in your code or the executing environment there will be a need to adjust the timeout along the lines of the code below:

In windows accessing an MS app

Code: [Select]
App.OLERequestPendingTimeout = 0 ' set the timeout as infinite - i.e. disable

Also

App.OLEServerBusyRaiseError = True ' Specifies whether an error message is displayed when an Automation request is rejected.

Unfortunately in the .NET environment these attributes are not directly accessible (they exist in the COM world but MS failed to pass them through these days).  However, your environment may be different.  guess the approach would be to:

  • Try to identify what the server is
  • Google for information on setting the relevant timeouts.

Of course, with the limited information I may have completely missed the point due to lack of familiarity with your environment.    

Regards


EXploringEA - information, utilities and addins

sandeep bhat

  • EA User
  • **
  • Posts: 36
  • Karma: +0/-0
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #5 on: January 08, 2014, 11:06:37 pm »
Thanks a lot for taking time to understand my problem MrWappy.

In my case the Addin is executing a python script. Not sure if there is any way i can set an timeout for the script that is executing. And ya there is no IL like .Net.

EXploringEA

  • EA User
  • **
  • Posts: 172
  • Karma: +8/-0
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #6 on: January 09, 2014, 02:32:22 am »
Sorry I don't have any experience of python - I wasn't even aware that you could generate an AddIn with a script.  Interested to find out more?

I assume to be an addin it produces a DLL?!

Do you have information you can share - purely interested and may be able to comment further.
EXploringEA - information, utilities and addins

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Addin written in python pops up server busy wi
« Reply #7 on: January 09, 2014, 03:07:39 am »
I once wrote an add-in with Perl using WSH which worked pretty nice. Later then I used ActivePerl's tools to create a DLL. Probably you can also use WSH to bind Python scripts.

q.