Error Running example1.mod


I’m new to Dynare and I downloaded it following the directions here on my Ubuntu 16.04 machine. When I try to run the example1.mod file, Matlab finishes preprocessing and I get the following error message.

The class ‘dates’ is used in its own class definition as a base class, property value, or attribute
value. This is not allowed.

Error in global_initialization (line 408)
options_.dataset.firstobs = dates();

Error in example1 (line 24)

Error in dynare (line 267)
evalin(‘base’,fname) ;

I’ve searched online but cannot find anyone else with a similar error message. Is there something obvious that I am missing or does anyone know how to fix this? Thank you in advance.

Which version of Dynare did you in compile and install ? The stable version ?


Originally, I had the stable version, I believe. I just uninstalled Dynare and then reinstalled it using the unstable version and it works fine. Thank you for your comment!

Continuing the discussion from Error Running example1.mod:

Good morning,

I have just installed Dynare 4.6.2. and I get the same error krdoty mentioned 3 years ago. I also have version 4.5.2. in Dynare folder, but I deleted all paths of this older version from Matlab. I would like to keep the older version, because some of my codes do not work with the newest. The code I’m working with now produces the crash with a message about hessian_eq_zero not existing if I use the older version. A bug indicated in the FixedBugs for 4.6.2. I use Windows10.

    Using 64-bit preprocessor
Starting Dynare (version 4.6.2).
Calling Dynare with arguments: none
Starting preprocessing of the model file ...
Found 85 equation(s).
Evaluating expressions...done
Computing static model derivatives (order 1).
Computing dynamic model derivatives (order 1).
Processing outputs ...
Preprocessing completed.

The class 'dates' is used in its own class definition as a base class, property
value, or attribute value.  This is not allowed.

Error in default_option_values (line 351)
options_.dataset.firstobs = dates();

Error in global_initialization (line 135)
    options_ = default_option_values(M_);

Error in dyn_main.driver (line 24)

Error in dynare (line 293)
evalin('base',[fname '.driver']) ;

Can I solve this? Thank you so much!

What is the output if you type into Matlab after the crash

which dates


which dates
C:\dynare\4.6.2\matlab\modules\dseries\src@dates\dates.m % dates constructor

Did you try


Are you asking me whether I removed all 4.5.2 path entries in Matlab paths? Yes, I did. But I kept the older version in my computer. If I change directory or uninstall previous Dynare version, the ‘dates’ error disappears…

What do you mean with


If I move folder 4.5.2. from c:\Dynare to another folder in my computer (a part from removing the path to it in Matlab), then the problem is gone. Only 4.6.2. is now inside c:\Dynare.

But that means that for some reason, you did not properly remove the path in Matlab. Only be moving the folder does Matlab not detect it.