Giter Club home page Giter Club logo

Comments (3)

daneah avatar daneah commented on August 24, 2024 2

I ran into this as well—it seems you can get around this by wrapping your supplied vault path in pathlib.Path so that it isn't a raw string.

from obsidiantools.

macdrifter avatar macdrifter commented on August 24, 2024 1

Seeing the same issue when running vault.get_note_metadata with the vault object.

Output exceeds the size limit. Open the full output data in a text editor
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-16-5147b4bd015c> in <module>
      1 vault.connect()
----> 2 print(vault.get_note_metadata())

~/opt/miniconda3/envs/jupyter/lib/python3.9/site-packages/obsidiantools/api.py in get_note_metadata(self)
   1154               .rename(columns={'file_exists': 'note_exists'})
   1155               .rename_axis('note'))
-> 1156         df = (df.pipe(self._create_note_metadata_columns)
   1157               .pipe(self._clean_up_note_metadata_dtypes)
   1158               )

~/opt/miniconda3/envs/jupyter/lib/python3.9/site-packages/pandas/core/generic.py in pipe(self, func, *args, **kwargs)
   5510         ...  )  # doctest: +SKIP
   5511         """
-> 5512         return com.pipe(self, func, *args, **kwargs)
   5513 
   5514     # ----------------------------------------------------------------------

~/opt/miniconda3/envs/jupyter/lib/python3.9/site-packages/pandas/core/common.py in pipe(obj, func, *args, **kwargs)
    495         return func(*args, **kwargs)
    496     else:
--> 497         return func(obj, *args, **kwargs)
    498 
...
-> 1167                                       [self._dirpath / str(f)
   1168                                        for f in df['rel_filepath'].tolist()],
   1169                                       np.NaN)

TypeError: unsupported operand type(s) for /: 'str' and 'str'

I love the idea of getting a data frame back so thank you for thinking about that.

from obsidiantools.

mfarragher avatar mfarragher commented on August 24, 2024

@hursh-desai @macdrifter was this issue from the vault's dirpath not being a pathlib.Path object? (like with @daneah comment)
If that's the case, this wouldn't be a bug as the library is set up to use pathlib paths rather than strings for directory arguments (dirpath (pathlib Path) in the docstring).

Pandas pipe functions are neat but maybe not as straightforward for debugging, so I might explore moving some logic away from those.

from obsidiantools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.