AttributeError: 'datetime.datetime' object has no attribute 'astype'

I’m just learning the tutorial and in Imeseries section, when I want to take a quick look at my_timeseries, there is an AttritubeError says datetime.datetime has no attritube astype.
My sunpy version is 5.1.0 Maybe there are something different in the new version?

Hi @xiao,

That is a very curious problem. That seems to be a problem with IPython printing, could you double check by running this in a Python script and seeing if it still errors?

1 Like

Thanks a lot! Interestingly, I can also use Jupyter to run images normally on a Linux system. But whether it’s on Windows or Linux, using Python files to compile directly won’t cause errors but won’t pop up the browser. It’s possible that I haven’t set up how to associate it with the browser properly. (However, in Windows systems, using jupyter can be associated with browsers, but in this case, an error message will be reported.)

In this image, you do not call the quicklook method.

Add a () to the end and see if a plot show up.

I was too careless.It works,thanks a lot!