Skip to content

Commit

Permalink
new version working fine in Py3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
doncamilom committed Nov 9, 2023
1 parent 29d5a72 commit 8d2cc6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions chemcrow/tools/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import re
import paperqa
import langchain
import paperscraper
from langchain import SerpAPIWrapper
from pypdf.errors import PdfReadError
from langchain.tools import BaseTool
Expand All @@ -11,8 +10,9 @@

def paper_search(search, pdir="query"):
try:
import paperscraper
return paperscraper.search_papers(search, pdir=pdir)
except KeyError:
except (KeyError, ModuleNotFoundError):
return {}

def partial(func, *args, **kwargs):
Expand Down Expand Up @@ -88,4 +88,4 @@ class WebSearch(BaseTool):
def _run(self, query: str) -> str:
return web_search(query)
async def _arun(self, query: str) -> str:
raise NotImplementedError("Async not implemented")
raise NotImplementedError("Async not implemented")
2 changes: 1 addition & 1 deletion chemcrow/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.8"
__version__ = "0.3.9"

0 comments on commit 8d2cc6e

Please sign in to comment.