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 ... 39
1
Help and Support / Re: Runtime Error R6034 C++
« on: July 19, 2017, 04:21:08 PM »
Hi,

this used to be a problem with some Python extensions that embedded a manifest. If any of the Python extensions you are using have a manifest embedded then you will get this error.

To fix it you will either need to install a newer build of Python that doesn't have any extensions with this problem, or identify the modules that have an embedded manifest and remove the manifest from them (with something like CFFExplorer - http://www.ntcore.com/exsuite.php).

The Python bug is documented here: https://bugs.python.org/issue4120 (it affected Python versions prior to 3.1, despite the version on the bug report).

Best regards,
Tony

2
Help and Support / Re: Assign Shortcut to PageUp Key
« on: July 04, 2017, 09:21:26 AM »
Quick update - this will be included in the next release of PyXLL.

Best regards,
Tony

3
Hi Steve,

yes, that's exactly the problem. You can't mix 64 and 32 bit versions of Python and Excel as the Excel process can't load dlls compiled for a different bitness.

You will need to either install the 32 bit version of Canopy/Python and PyXLL, or the 64 bit version of Excel.

Best regards,
Tony

4
Help and Support / Re: Error while loading script with pandas
« on: June 15, 2017, 03:35:09 PM »
Hi,

thanks, I got that.

It seems that the problem occurs with the latest version of the 'py' package, 1.4.34.

If you download to a previous version (I was using 1.4.31) then it should work.

I'll look into why this latest version isn't working, but in the meantime please try downgrading that package.

Best regards,
Tony

5
Help and Support / Re: Error while loading script with pandas
« on: June 15, 2017, 02:17:19 PM »
Can you set your log level to debug (verbosity=debug in LOG section of the config) and send me your complete log file please?

thanks,
Tony

6
Help and Support / Re: Error while loading script with pandas
« on: June 15, 2017, 01:16:13 PM »
Hi,

I'm having trouble reproducing this issue I'm afraid. Please can you try with only the pandastypes module added to your config?

I want to eliminate the possibility of something else that's being imported messing things up.

thanks,
Tony

7
Help and Support / Re: Error while loading script with pandas
« on: June 15, 2017, 10:32:46 AM »
Hi,

hmm yeah it could be that the first error is causing pandas to not import fully... Maybe try re-installing pytest too?

Also, does it make any difference if you disable deep reloading by setting deep_reload=0 in the pyxll config?

Best regards,
Tony

8
Help and Support / Re: Error while loading script with pandas
« on: June 14, 2017, 05:41:42 PM »
Also, please try re-installing pandas by doing the following:

conda uninstall -f pandas
conda install pandas

regards,
Tony

9
Help and Support / Re: Error while loading script with pandas
« on: June 14, 2017, 05:30:45 PM »
Can you send the output of

import pandas
pandas.show_versions()

please?

Best regards,
Tony

10
Help and Support / Re: Error while loading script with pandas
« on: June 13, 2017, 02:31:20 PM »
Hi,

what versions of pandas and matplotlib are you using?

If you start a normal python prompt and try and import "pandas.plotting" does it work?

I have just verified that the pyxll matplotlib example on github works with pandas 0.20.2 and matplotlib 2.0.2 (Python 3.5 x64), so perhaps you are using older versions or there is something wrong with your python environment?

Best regards,
Tony

11
Help and Support / Re: Script to add pyxll into Excel
« on: May 24, 2017, 02:15:28 PM »
That'd be great! You can either send me anything directly, or as a pull request to the pyxll-examples repo on github.

Best regards,
Tony

12
Help and Support / Re: Script to add pyxll into Excel
« on: May 23, 2017, 06:48:29 PM »
Hi Alfredo,

unfortunately I don't have anything to give you that does that... but I think what you want should be possible and not too tricky.

To register the addin, you have to add it to a couple of registry keys (where * is the version of Excel you are using):
 - HKCU/Software/Microsoft/Office/*/Excel/Options
 - HKCU/Software/Microsoft/Office/*/Excel/Add-in Manager

In the "Options" key you need to look values named "OPENx", and if there isn't one pointing to a pyxll.xll file add a new one and set it to '/R "{your pyxll.xll file location}"'.
In the "Add-in Manager" key you need to add a string value with the name equal to the path of the pyxll.xll file.

There's an example file that shows how to find these keys to delete them (to uninstall pyxll), which might be helpful to figure out how to create the keys :)
https://github.com/pyxll/pyxll-examples/blob/master/scripts/uninstall.py

You can look at your own registry using regedit to see what these keys look like, and use the uninstall script so you can compare before and after installing. Be careful that you are editing the right area of the registry as there are different areas for 32 bit and 64 bit applications (the uninstall.py example shows how to open both - and in regedit the 32 bit keys are under the "Wow6432Node", assuming you are using 64 bit windows).

Before you install an addin you need to make sure all running Excel processes are closed, otherwise they'll just over-write your changes when they exit.

Sorry I don't have anything that just does what you need, but I hope this helps.

Best regards,
Tony

13
Help and Support / Re: Assign Shortcut to PageUp Key
« on: May 22, 2017, 10:08:34 AM »
Hi,

this is not currently supported. None of the special keys (Page Up/Down, Home, Insert, cursor keys, numlock, scroll lock, tab etc) can be mapped to shortcuts at present. Function keys can be mapped.

This is something we will look at adding in a future version, but for now you will have to use another key.

Best regards,
Tony

14
Help and Support / Re: return assert message in excel
« on: May 04, 2017, 07:18:16 PM »
Hi,

oh yes, I didn't spot that in your code. You can only use default keyword arguments when not specifying a signature.

If you change your code to:

Code: [Select]
@xl_func
@format exceptions
def my_func(a, b=default_b):
    return b

then it should work. Otherwise, you are quite correct that the function is registered with Excel to have exactly two arguments and Excel calls it with its own default if one is missing.

Best regards,
Tony

15
Help and Support / Re: return assert message in excel
« on: May 04, 2017, 04:52:57 PM »
Hi,

I think all you need is to add kwargs to the function wrapper.

Code: [Select]
def format_exceptions(func):
    @wraps(func)
    def func_wrapper(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except Exception as e:
            return "#ERROR: " + str(e)
    return func_wrapper

"wraps" is part of the standard library and you can find more information about it here: https://docs.python.org/2/library/functools.html

Best regards,
Tony

Pages: [1] 2 3 ... 39