Skip to content

Commit

Permalink
fix: fix oracledb ImportError
Browse files Browse the repository at this point in the history
  • Loading branch information
shengchenyang committed Dec 30, 2023
1 parent fe914c9 commit e363937
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ayugespidertools/common/spiderconf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, Generic, Optional, Tuple, TypeVar

from oracledb.exceptions import DatabaseError
from sqlalchemy.exc import OperationalError

from ayugespidertools.common.typevars import (
Expand All @@ -18,6 +17,12 @@
from ayugespidertools.common.utils import ToolsForAyu
from ayugespidertools.config import logger

try:
from oracledb.exceptions import DatabaseError
except ImportError:
# pip install ayugespidertools[database]
pass

__all__ = [
"get_spider_conf",
"MysqlConfCreator",
Expand Down

0 comments on commit e363937

Please sign in to comment.