Hi.
I have already updated to the latest version of python and pyeviews in Anaconda. I am using the standard version of Eviews12.
To create series in Python and take them to Eviews I use the following code (found in WHITEPAPER AS OF 7/22/2016 "pyeviews: Python + Eviews"
import numpy as np
import pandas as pa
dtsa = pa.date_range ('1998', periods = 3, freq = 'A')
benchmark = pa.Series ([4000., 4161.4, np.nan], index = dtsa, name = 'benchmark')
import pyeviews as evp
eviewsapp = evp.GetEViewsApp (instance = 'new', showwindow = True)
evp.PutPythonAsWF (benchmark, app = eviewsapp)
However, in the eviews workfile the benchmark series is created but the values are not being copied and they are blank in eviews workfile. Could you tell me what is the problem?
Thanks.
Problem with pyeviews
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
-
- EViews Developer
- Posts: 788
- Joined: Tue Sep 16, 2008 3:00 pm
- Location: Irvine, CA
Re: Problem with pyeviews
Thanks for the bug report. We've been able to confirm the issue and it seems to be a problem with the comtypes library that we depend on to make the call to our COM Application object. It seems that comtypes is not converting a Python list object into a proper COM Variant type when running on Python 3.8 or above.
I've reported this issue with the comtypes developers. I'll post again if we figure out any workaround to this issue. If you'd like to follow the pyeviews examples in a working environment, please use Python 3.6 or 3.7 for now.
I've reported this issue with the comtypes developers. I'll post again if we figure out any workaround to this issue. If you'd like to follow the pyeviews examples in a working environment, please use Python 3.6 or 3.7 for now.
-
- EViews Developer
- Posts: 113
- Joined: Thu Apr 18, 2013 8:37 am
Re: Problem with pyeviews
We've fixed this problem by changing pyeviews to use a different package for COM objects. Please update to pyeviews 1.0.3 using "pip install --upgrade pyeviews" if you're in a regular Python environment, or "conda update -c bexer pyeviews" if you're in a Conda environment.
Who is online
Users browsing this forum: No registered users and 28 guests