Code Monkey home page Code Monkey logo

nbmanips's Introduction

Hi ๐Ÿ‘‹, I'm Dhia Hmila

A passionate Data Scientist and a programming enthusiast

hmiladhia

  • ๐Ÿ”ญ Iโ€™m currently working on a Fraud, Waste, and Abuse detection Tool

  • ๐Ÿ“ I regularly write articles on Medium

  • ๐Ÿ“„ Know about my experiences on my LinkedIn Profile

Latest Medium Articles

Connect with me:

dhiahmila dhia-hmila @dhiahmila

Languages and Tools:

arduino azure bash c cplusplus csharp css3 flask git heroku html5 java javascript linux matlab photoshop python qt scikit_learn selenium sqlite

hmiladhia

nbmanips's People

Contributors

github-actions[bot] avatar hmiladhia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

uweschmitt

nbmanips's Issues

No such file or directory: ''

Thanks for making the package! I'm finding it very useful for LLM-agent based manipulations of Jupyter notebooks.

I ran into a bug with to_md:

{
	"name": "FileNotFoundError",
	"message": "[Errno 2] No such file or directory: ''",
	"stack": "---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
Cell In[33], line 1
----> 1 nb.to_md(\"new_markdown.md\")

File ~/miniforge3/envs/notebook-helper/lib/python3.11/site-packages/nbmanips/notebook/notebook_mixins.py:361, in ExportMixin.to_md(self, path, exclude_code_cell, exclude_markdown, exclude_raw, exclude_unknown, exclude_input, exclude_output, **kwargs)
    338 def to_md(
    339     self,
    340     path,
   (...)
    347     **kwargs,
    348 ):
    349     \"\"\"
    350     Exports to a markdown document (.md)
    351 
   (...)
    359     :param kwargs: exclude_input_prompt, exclude_output_prompt, ...
    360     \"\"\"
--> 361     return self.nbconvert(
    362         \"markdown\",
    363         path,
    364         exclude_code_cell=exclude_code_cell,
    365         exclude_markdown=exclude_markdown,
    366         exclude_raw=exclude_raw,
    367         exclude_unknown=exclude_unknown,
    368         exclude_input=exclude_input,
    369         exclude_output=exclude_output,
    370         **kwargs,
    371     )

File ~/miniforge3/envs/notebook-helper/lib/python3.11/site-packages/nbmanips/notebook/notebook_mixins.py:291, in ExportMixin.nbconvert(self, exporter_name, path, template_name, *args, **kwargs)
    288 if ext:
    289     resources.pop(\"output_extension\")
--> 291 writer.write(body, resources, file_name)

File ~/miniforge3/envs/notebook-helper/lib/python3.11/site-packages/nbconvert/writers/files.py:112, in FilesWriter.write(self, output, resources, notebook_name, **kw)
    107 if items:
    108     self.log.info(
    109         \"Support files will be in %s\",
    110         os.path.join(resources.get(\"output_files_dir\", \"\"), \"\"),
    111     )
--> 112     self._write_items(items, build_directory)
    114 # Write the extracted attachments
    115 # if ExtractAttachmentsOutput specified a separate directory
    116 attachments = resources.get(\"attachments\", {}).items()

File ~/miniforge3/envs/notebook-helper/lib/python3.11/site-packages/nbconvert/writers/files.py:73, in FilesWriter._write_items(self, items, build_dir)
     71 dest = os.path.join(build_dir, filename)
     72 path = os.path.dirname(dest)
---> 73 self._makedir(path)
     75 # Write file
     76 self.log.debug(\"Writing %i bytes to %s\", len(data), dest)

File ~/miniforge3/envs/notebook-helper/lib/python3.11/site-packages/nbconvert/writers/files.py:60, in FilesWriter._makedir(self, path, mode)
     58 self.log.info(\"Making directory %s\", path)
     59 try:
---> 60     os.makedirs(path, mode=mode)
     61 except OSError as e:
     62     if e.errno != errno.EEXIST:

File <frozen os>:225, in makedirs(name, mode, exist_ok)

FileNotFoundError: [Errno 2] No such file or directory: ''"
}

It appears that you are assuming that the directory in the file path (os.path.dirname) is not blank.

I'm using nbmanips 2.1.0.

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.