pydata / xarray

N-D labeled arrays and datasets in Python
https://xarray.dev
Apache License 2.0
3.49k stars 1.04k forks source link

Getting an error while building the documentation #9167

Closed Anu-Ra-g closed 1 week ago

Anu-Ra-g commented 1 week ago

What is your issue?

I was trying to build the documentation locally, but I got this error,

updating environment: [config changed ('autodoc_type_aliases')] 1370 added, 0 changed, 0 removed
WARNING: ources... [ 99%] user-guide/io                                                                                                                                           
>>>-------------------------------------------------------------------------
Exception in /home/anurag/Code/GSoC/xarray/doc/user-guide/io.rst at block ending on line 1213
Specify :okexcept: as an option in the ipython:: block to suppress this message
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[65], line 1
----> 1 pkl = pickle.dumps(ds, protocol=-1)

TypeError: cannot pickle '_json.Scanner' object

<<<-------------------------------------------------------------------------

Exception occurred:
  File "/home/anurag/anaconda3/envs/xarray-docs/lib/python3.10/site-packages/IPython/sphinxext/ipython_directive.py", line 584, in process_input
    raise RuntimeError(
RuntimeError: Unexpected exception in `/home/anurag/Code/GSoC/xarray/doc/user-guide/io.rst` line 1213
The full traceback has been saved in /tmp/sphinx-err-cjtp2udz.log, if you want to report the issue to the developers.
Please also report this if it was a user error, so that a better error message can be provided next time.
A bug report can be filed in the tracker
keewis commented 1 week ago

I've never seen that error... I'm guessing this is something that comes up because you're working on kerchunk references, which are JSON files? If so, I'd probably try to resolve this in your PR.

Anu-Ra-g commented 1 week ago

There was issue with my pull request. I used a variable named ds in my pull request.