Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Tony

Pages: 1 2 [3] 4 5 ... 38
31
Help and Support / Re: auto resize function called multiple times
« on: February 14, 2017, 11:16:46 AM »
Hi Yufei,

great, thanks for confirming. Yes, the Ctrl+Shift+R macro example just updates the sheet and so if you have automatic calculation turned on that will cause Excel to recalculate - the built-in auto_resize feature was designed not to do that, and so I'm glad it's working for you now :)

The 3.2 release should be ready in the next few weeks, and will include this fix.

Best regards,
Tony

32
Help and Support / Re: auto resize function called multiple times
« on: February 14, 2017, 10:44:11 AM »
Apologies, I hadn't realised you were using Canopy.

Have you copied pyxll.xll in the same place the original pyxll.xll was installed? If so, there should be a file named 'pyxll-startup.py' in the same folder, and that's what should be setting up the python path when pyxll starts (it's specific to Canopy). That gets added as part of the Canopy packaging, it's not included in the standalone pyxll download.

Alternatively, another way to get it to work is to start a new canopy python prompt and do:

Code: [Select]
import sys
for x in sys.path:
    print(x)

and copy that list of paths to your config (and indent them), ie.:

Code: [Select]
[PYTHON]
pythonpath =
    all paths from sys.path, printed above
    usual python path stuff

I know that's not ideal, but it might get it working again... I'll check the pyxll-startup.py Canopy file from 3.1 should work with 3.2, but that will also be checked as part of the Canopy packaging before the proper 3.2 release (which we don't do for beta releases).

Best regards,
Tony


33
Help and Support / Re: auto resize function called multiple times
« on: February 14, 2017, 09:16:49 AM »
Hi,

can you try setting pythonhome or executable in the pyxll config please? e.g.

[PYTHON]
executable = c:\pythonXX\python.exe

I'm not sure why it would have worked in 3.1 without this, and fails with 3.2... but that config change should hopefully work.

Best regards,
Tony

34
Help and Support / Re: auto resize function called multiple times
« on: February 13, 2017, 10:39:32 PM »
Hi,

I think I've found the cause of the problem. Please could you try the latest beta build to confirm that it's working for you? You can download it from:

http://beta.pyxll.com/download.html#standalone
username: pyxll
password: pyxll

Thanks for your help finding this problem! Please let me know if this resolves it for you or not.

Best regards,
Tony

35
Help and Support / Re: auto resize function called multiple times
« on: February 13, 2017, 11:27:13 AM »
Hi,

thanks, I'll try and reproduce the problem and get back to you.

Best regards,
Tony

36
Help and Support / Re: auto resize function called multiple times
« on: February 13, 2017, 10:38:43 AM »
Hi,

when the resized contents are written to Excel it's done after Excel has finished calculating, and so will trigger a recalculation of anything that depends on the affected cells. As long as the inputs to your function don't depend on the outputs this shouldn't matter and your function shouldn't get called again...

There is a very simple auto_resize example included with pyxll. Do you see the same behaviour if you add a print statement to that?

Best regards,
Tony

37
Hi,

great, thanks for letting me know!

Ah, the problem with the pandas example is that it doesn't explicitly import pandastypes, and so when reloaded pandas_examples is reloaded before the pandastypes module and so the types haven't yet been declared. I'll fix that :)

Best regards,
Tony

38
Hi,

I think that may be the same problem with deep reloading that was reported recently. It sounds as if it could be caused by the module that CookieJar is declared in being reloaded after the module that uses it.

If it is the same problem, it should be fixed in the next release. You can try the beta version that already has this fix, which can be downloaded from:
http://beta.pyxll.com/download.html#standalone (username: pyxll  password: pyxll)

Please can you let me know if that solves your problem or not?

Best regards,
Tony

39
Help and Support / Re: Reloading causes failure of catching exceptions
« on: January 06, 2017, 12:08:23 PM »
Great, thanks for the help identifying and fixing this problem!

Best regards,
Tony

40
Help and Support / Re: Reloading causes failure of catching exceptions
« on: January 05, 2017, 05:20:52 PM »
Hi,

I've just uploaded a new beta release that addresses that warnings you were getting with sqlalchemy.

Sqlalchemy has several circular dependencies between its modules and packages, so including it in the list of deep-reloadable packages (either by adding it to deep_reload_include, or by removing that list and not adding it to deep_reload_exclude) will cause a number of warnings to be written to the log (warnings about circular dependencies, not the KeyError you saw). If it's not being reloaded (as in your case) there now won't be any warnings or errors.

You can download the new build from the place as before:
https://beta.pyxll.com/download.html#standalone (username: pyxll, password: pyxll)

Please let me know if you have any more problems!

Best regards,
Tony

41
Help and Support / Re: List type annotation in Python3 generates error
« on: January 04, 2017, 09:27:56 AM »
Hi,

currently you have to use the old style string signatures for array types. See https://www.pyxll.com/docs/userguide/udfs.html#using-arrays or the examples for details.

Alternatively, you can simply omit the type information and it will default to 'var', which can accept an array.

Note that List[int] would be technically the wrong type even if it did work for arrays, since the actual type is a list of lists of ints rather than a simple list of ints (as it's a 2d range of data).

I will look at the best way to provide array type information using type hints for a future release, but for now please try providing a signature string or removing the type hint. If you provide a signature string, then any type hints will be ignored, so you can use both if you require the type hint for any other reason.

Best regards,
Tony

42
Help and Support / Re: Download latest version
« on: January 04, 2017, 09:22:57 AM »
Hi,

you can download it from here:
https://www.pyxll.com/download.html#standalone

There's a link to this page on the main pyxll.com home page (see 'downloads' at the top).

Best regards,
Tony

43
Help and Support / Re: Reloading causes failure of catching exceptions
« on: January 03, 2017, 11:43:59 AM »
Hi,

ah, I had forgotten that you already had a,b and in deep_reload_include - so in that case adding sqlalchemy to deep_reload_exclude would not have any effect.

You can now actually specify both, but it won't help you in this case. No matter how you set them, you will get those warnings in the log, but as you have found it shouldn't actually stop anything from working as sqlalchemy is already being excluded from the set of modules that are reloaded.

For now you will just have to ignore the warnings, but I will continue to look into this.

Best regards,
Tony

44
Help and Support / Re: Reloading causes failure of catching exceptions
« on: January 03, 2017, 10:26:15 AM »
Hi,

thanks for that, I'll look into it.

The reason it happens before reloading is because that's when it builds the dependency map, when the modules are first imported. That's what it uses later when doing the deep reload.

For now, you can add sqlalchemy to the "deep_reload_exclude" list, but I will look into it and figure out what's going wrong.

Best regards,
Tony

45
Help and Support / Re: Reloading causes failure of catching exceptions
« on: December 30, 2016, 11:35:12 AM »
Hi,

sorry this has taken so long to resolve. There were a couple of issues to do with relative imports and how the dependency map is updated when reloading.

These problems have now been fixed, and in my testing your test case works (hopefully your real-life case will too).

Please could you try the new beta release 3.1.2.beta, which you can download from:
https://beta.pyxll.com/download.html#standalone (username: pyxll, password: pyxll)

Nothing else has changed except for the deep reloading behaviour.

Once you've had a chance to try this out, if you could confirm this fixes your problem I will include these changes in the next main release (or I can do a patch release with just these changes).

I also added a new option "deep_reload_print_graph". If enabled (set to 1) then when reloading it will log the dependency graph used to determine the order in which the modules are reloaded.

Best regards,
Tony

Pages: 1 2 [3] 4 5 ... 38