Bug (Attribute Error) in PyEviews?

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

darmanij
Posts: 2
Joined: Mon Dec 19, 2022 6:15 am

Bug (Attribute Error) in PyEviews?

Postby darmanij » Tue Dec 20, 2022 4:46 am

I am getting an error when running the PyEviews code as given in the white paper.

The below code:

Code: Select all

>>> import numpy as np
>>> import pandas as pa
>>> import pyeviews as evp

>>> dtsa = pa.date_range('1998', periods = 3, freq = 'A')
>>> benchmark = pa.Series([4000.,4161.4,np.nan],index=dtsa, name = 'benchmark')
>>> eviewsapp = evp.GetEViewsApp(instance='new', showwindow=True)
>>> evp.PutPythonAsWF(benchmark, app=eviewsapp)


returns

AttributeError: 'DataFrame' object has no attribute 'attrs'


The error appears to be linked to the last line of the code (the PutPythonAsWF function). Would appreciate some guidance. Thanks!

EViews Rebecca
EViews Developer
Posts: 113
Joined: Thu Apr 18, 2013 8:37 am

Re: Bug (Attribute Error) in PyEviews?

Postby EViews Rebecca » Tue Dec 20, 2022 11:53 am

I don't get that error. Which version of pyeviews are you using?

darmanij
Posts: 2
Joined: Mon Dec 19, 2022 6:15 am

Re: Bug (Attribute Error) in PyEviews?

Postby darmanij » Wed Dec 21, 2022 1:53 am

Hi Rebecca,

It was actually pandas that had an old version and required upgrading. Problem solved now, but thanks for the tip!


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 20 guests