/* Generated by Cython 3.0.11 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "name": "tbstock.dataAcquisition.saveDataToMysql",
        "sources": [
            "./tbstock/dataAcquisition/saveDataToMysql.py"
        ]
    },
    "module_name": "tbstock.dataAcquisition.saveDataToMysql"
}
END: Cython Metadata */

#ifndef PY_SSIZE_T_CLEAN
#define PY_SSIZE_T_CLEAN
#endif /* PY_SSIZE_T_CLEAN */
#if defined(CYTHON_LIMITED_API) && 0
  #ifndef Py_LIMITED_API
    #if CYTHON_LIMITED_API+0 > 0x03030000
      #define Py_LIMITED_API CYTHON_LIMITED_API
    #else
      #define Py_LIMITED_API 0x03030000
    #endif
  #endif
#endif

#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
    #error Cython requires Python 2.7+ or Python 3.3+.
#else
#if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
#define __PYX_EXTRA_ABI_MODULE_NAME "limited"
#else
#define __PYX_EXTRA_ABI_MODULE_NAME ""
#endif
#define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
#define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
#define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
#define CYTHON_HEX_VERSION 0x03000BF0
#define CYTHON_FUTURE_DIVISION 1
#include <stddef.h>
#ifndef offsetof
  #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif
#if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif
#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif
#define __PYX_COMMA ,
#ifndef HAVE_LONG_LONG
  #define HAVE_LONG_LONG
#endif
#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
#if defined(GRAALVM_PYTHON)
  /* For very preliminary testing purposes. Most variables are set the same as PyPy.
     The existence of this section does not imply that anything works or is even tested */
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 1
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 0
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE 0
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(PYPY_VERSION)
  #define CYTHON_COMPILING_IN_PYPY 1
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #undef CYTHON_AVOID_BORROWED_REFS
  #define CYTHON_AVOID_BORROWED_REFS 1
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
  #endif
  #if PY_VERSION_HEX < 0x03090000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 0
  #undef CYTHON_USE_TP_FINALIZE
  #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(CYTHON_LIMITED_API)
  #ifdef Py_LIMITED_API
    #undef __PYX_LIMITED_VERSION_HEX
    #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
  #endif
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 1
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #undef CYTHON_CLINE_IN_TRACEBACK
  #define CYTHON_CLINE_IN_TRACEBACK 0
  #undef CYTHON_USE_TYPE_SLOTS
  #define CYTHON_USE_TYPE_SLOTS 0
  #undef CYTHON_USE_TYPE_SPECS
  #define CYTHON_USE_TYPE_SPECS 1
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #undef CYTHON_USE_ASYNC_SLOTS
  #define CYTHON_USE_ASYNC_SLOTS 0
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #undef CYTHON_USE_UNICODE_INTERNALS
  #define CYTHON_USE_UNICODE_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #endif
  #undef CYTHON_USE_PYLONG_INTERNALS
  #define CYTHON_USE_PYLONG_INTERNALS 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #undef CYTHON_ASSUME_SAFE_MACROS
  #define CYTHON_ASSUME_SAFE_MACROS 0
  #undef CYTHON_UNPACK_METHODS
  #define CYTHON_UNPACK_METHODS 0
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #undef CYTHON_METH_FASTCALL
  #define CYTHON_METH_FASTCALL 0
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #undef CYTHON_PEP489_MULTI_PHASE_INIT
  #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #undef CYTHON_USE_MODULE_STATE
  #define CYTHON_USE_MODULE_STATE 1
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
  #endif
  #undef CYTHON_USE_FREELISTS
  #define CYTHON_USE_FREELISTS 0
#elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 0
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 1
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #undef CYTHON_USE_PYTYPE_LOOKUP
  #define CYTHON_USE_PYTYPE_LOOKUP 0
  #ifndef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 0
  #endif
  #undef CYTHON_USE_PYLIST_INTERNALS
  #define CYTHON_USE_PYLIST_INTERNALS 0
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #undef CYTHON_USE_UNICODE_WRITER
  #define CYTHON_USE_UNICODE_WRITER 0
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #undef CYTHON_FAST_THREAD_STATE
  #define CYTHON_FAST_THREAD_STATE 0
  #undef CYTHON_FAST_GIL
  #define CYTHON_FAST_GIL 0
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL 1
  #endif
  #undef CYTHON_FAST_PYCALL
  #define CYTHON_FAST_PYCALL 0
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #ifndef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #undef CYTHON_USE_DICT_VERSIONS
  #define CYTHON_USE_DICT_VERSIONS 0
  #undef CYTHON_USE_EXC_INFO_STACK
  #define CYTHON_USE_EXC_INFO_STACK 0
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 0
  #endif
#else
  #define CYTHON_COMPILING_IN_PYPY 0
  #define CYTHON_COMPILING_IN_CPYTHON 1
  #define CYTHON_COMPILING_IN_LIMITED_API 0
  #define CYTHON_COMPILING_IN_GRAAL 0
  #define CYTHON_COMPILING_IN_NOGIL 0
  #ifndef CYTHON_USE_TYPE_SLOTS
    #define CYTHON_USE_TYPE_SLOTS 1
  #endif
  #ifndef CYTHON_USE_TYPE_SPECS
    #define CYTHON_USE_TYPE_SPECS 0
  #endif
  #ifndef CYTHON_USE_PYTYPE_LOOKUP
    #define CYTHON_USE_PYTYPE_LOOKUP 1
  #endif
  #if PY_MAJOR_VERSION < 3
    #undef CYTHON_USE_ASYNC_SLOTS
    #define CYTHON_USE_ASYNC_SLOTS 0
  #elif !defined(CYTHON_USE_ASYNC_SLOTS)
    #define CYTHON_USE_ASYNC_SLOTS 1
  #endif
  #ifndef CYTHON_USE_PYLONG_INTERNALS
    #define CYTHON_USE_PYLONG_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_PYLIST_INTERNALS
    #define CYTHON_USE_PYLIST_INTERNALS 1
  #endif
  #ifndef CYTHON_USE_UNICODE_INTERNALS
    #define CYTHON_USE_UNICODE_INTERNALS 1
  #endif
  #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
    #undef CYTHON_USE_UNICODE_WRITER
    #define CYTHON_USE_UNICODE_WRITER 0
  #elif !defined(CYTHON_USE_UNICODE_WRITER)
    #define CYTHON_USE_UNICODE_WRITER 1
  #endif
  #ifndef CYTHON_AVOID_BORROWED_REFS
    #define CYTHON_AVOID_BORROWED_REFS 0
  #endif
  #ifndef CYTHON_ASSUME_SAFE_MACROS
    #define CYTHON_ASSUME_SAFE_MACROS 1
  #endif
  #ifndef CYTHON_UNPACK_METHODS
    #define CYTHON_UNPACK_METHODS 1
  #endif
  #ifndef CYTHON_FAST_THREAD_STATE
    #define CYTHON_FAST_THREAD_STATE 1
  #endif
  #ifndef CYTHON_FAST_GIL
    #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
  #endif
  #ifndef CYTHON_METH_FASTCALL
    #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
  #endif
  #ifndef CYTHON_FAST_PYCALL
    #define CYTHON_FAST_PYCALL 1
  #endif
  #ifndef CYTHON_PEP487_INIT_SUBCLASS
    #define CYTHON_PEP487_INIT_SUBCLASS 1
  #endif
  #if PY_VERSION_HEX < 0x03050000
    #undef CYTHON_PEP489_MULTI_PHASE_INIT
    #define CYTHON_PEP489_MULTI_PHASE_INIT 0
  #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
    #define CYTHON_PEP489_MULTI_PHASE_INIT 1
  #endif
  #ifndef CYTHON_USE_MODULE_STATE
    #define CYTHON_USE_MODULE_STATE 0
  #endif
  #if PY_VERSION_HEX < 0x030400a1
    #undef CYTHON_USE_TP_FINALIZE
    #define CYTHON_USE_TP_FINALIZE 0
  #elif !defined(CYTHON_USE_TP_FINALIZE)
    #define CYTHON_USE_TP_FINALIZE 1
  #endif
  #if PY_VERSION_HEX < 0x030600B1
    #undef CYTHON_USE_DICT_VERSIONS
    #define CYTHON_USE_DICT_VERSIONS 0
  #elif !defined(CYTHON_USE_DICT_VERSIONS)
    #define CYTHON_USE_DICT_VERSIONS  (PY_VERSION_HEX < 0x030C00A5)
  #endif
  #if PY_VERSION_HEX < 0x030700A3
    #undef CYTHON_USE_EXC_INFO_STACK
    #define CYTHON_USE_EXC_INFO_STACK 0
  #elif !defined(CYTHON_USE_EXC_INFO_STACK)
    #define CYTHON_USE_EXC_INFO_STACK 1
  #endif
  #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
    #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
  #endif
  #ifndef CYTHON_USE_FREELISTS
    #define CYTHON_USE_FREELISTS 1
  #endif
#endif
#if !defined(CYTHON_FAST_PYCCALL)
#define CYTHON_FAST_PYCCALL  (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
#endif
#if !defined(CYTHON_VECTORCALL)
#define CYTHON_VECTORCALL  (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
#endif
#define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_MAJOR_VERSION < 3
    #include "longintrepr.h"
  #endif
  #undef SHIFT
  #undef BASE
  #undef MASK
  #ifdef SIZEOF_VOID_P
    enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
  #endif
#endif
#ifndef __has_attribute
  #define __has_attribute(x) 0
#endif
#ifndef __has_cpp_attribute
  #define __has_cpp_attribute(x) 0
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#ifndef CYTHON_UNUSED
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(maybe_unused)
        #define CYTHON_UNUSED [[maybe_unused]]
      #endif
    #endif
  #endif
#endif
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_UNUSED_VAR
#  if defined(__cplusplus)
     template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
#  else
#    define CYTHON_UNUSED_VAR(x) (void)(x)
#  endif
#endif
#ifndef CYTHON_MAYBE_UNUSED_VAR
  #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_USE_CPP_STD_MOVE
  #if defined(__cplusplus) && (\
    __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
    #define CYTHON_USE_CPP_STD_MOVE 1
  #else
    #define CYTHON_USE_CPP_STD_MOVE 0
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
#ifdef _MSC_VER
    #ifndef _MSC_STDINT_H_
        #if _MSC_VER < 1300
            typedef unsigned char     uint8_t;
            typedef unsigned short    uint16_t;
            typedef unsigned int      uint32_t;
        #else
            typedef unsigned __int8   uint8_t;
            typedef unsigned __int16  uint16_t;
            typedef unsigned __int32  uint32_t;
        #endif
    #endif
    #if _MSC_VER < 1300
        #ifdef _WIN64
            typedef unsigned long long  __pyx_uintptr_t;
        #else
            typedef unsigned int        __pyx_uintptr_t;
        #endif
    #else
        #ifdef _WIN64
            typedef unsigned __int64    __pyx_uintptr_t;
        #else
            typedef unsigned __int32    __pyx_uintptr_t;
        #endif
    #endif
#else
    #include <stdint.h>
    typedef uintptr_t  __pyx_uintptr_t;
#endif
#ifndef CYTHON_FALLTHROUGH
  #if defined(__cplusplus)
    /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
     * but leads to warnings with -pedantic, since it is a C++17 feature */
    #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
      #if __has_cpp_attribute(fallthrough)
        #define CYTHON_FALLTHROUGH [[fallthrough]]
      #endif
    #endif
    #ifndef CYTHON_FALLTHROUGH
      #if __has_cpp_attribute(clang::fallthrough)
        #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
      #elif __has_cpp_attribute(gnu::fallthrough)
        #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
      #endif
    #endif
  #endif
  #ifndef CYTHON_FALLTHROUGH
    #if __has_attribute(fallthrough)
      #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
    #else
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
  #if defined(__clang__) && defined(__apple_build_version__)
    #if __apple_build_version__ < 7000000
      #undef  CYTHON_FALLTHROUGH
      #define CYTHON_FALLTHROUGH
    #endif
  #endif
#endif
#ifdef __cplusplus
  template <typename T>
  struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
  #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
#else
  #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
#endif
#if CYTHON_COMPILING_IN_PYPY == 1
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
#else
  #define __PYX_NEED_TP_PRINT_SLOT  (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
#endif
#define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))

#ifndef CYTHON_INLINE
  #if defined(__clang__)
    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
  #elif defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_DefaultClassType PyClass_Type
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_DefaultClassType PyType_Type
#if CYTHON_COMPILING_IN_LIMITED_API
    static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
        PyObject *exception_table = NULL;
        PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
        #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
        PyObject *version_info;
        PyObject *py_minor_version = NULL;
        #endif
        long minor_version = 0;
        PyObject *type, *value, *traceback;
        PyErr_Fetch(&type, &value, &traceback);
        #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
        minor_version = 11;
        #else
        if (!(version_info = PySys_GetObject("version_info"))) goto end;
        if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
        minor_version = PyLong_AsLong(py_minor_version);
        Py_DECREF(py_minor_version);
        if (minor_version == -1 && PyErr_Occurred()) goto end;
        #endif
        if (!(types_module = PyImport_ImportModule("types"))) goto end;
        if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
        if (minor_version <= 7) {
            (void)p;
            result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else if (minor_version <= 10) {
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, fline, lnos, fv, cell);
        } else {
            if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
            result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
                          c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
        }
    end:
        Py_XDECREF(code_type);
        Py_XDECREF(exception_table);
        Py_XDECREF(types_module);
        if (type) {
            PyErr_Restore(type, value, traceback);
        }
        return result;
    }
    #ifndef CO_OPTIMIZED
    #define CO_OPTIMIZED 0x0001
    #endif
    #ifndef CO_NEWLOCALS
    #define CO_NEWLOCALS 0x0002
    #endif
    #ifndef CO_VARARGS
    #define CO_VARARGS 0x0004
    #endif
    #ifndef CO_VARKEYWORDS
    #define CO_VARKEYWORDS 0x0008
    #endif
    #ifndef CO_ASYNC_GENERATOR
    #define CO_ASYNC_GENERATOR 0x0200
    #endif
    #ifndef CO_GENERATOR
    #define CO_GENERATOR 0x0020
    #endif
    #ifndef CO_COROUTINE
    #define CO_COROUTINE 0x0080
    #endif
#elif PY_VERSION_HEX >= 0x030B0000
  static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
                                                    PyObject *code, PyObject *c, PyObject* n, PyObject *v,
                                                    PyObject *fv, PyObject *cell, PyObject* fn,
                                                    PyObject *name, int fline, PyObject *lnos) {
    PyCodeObject *result;
    PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
    if (!empty_bytes) return NULL;
    result =
      #if PY_VERSION_HEX >= 0x030C0000
        PyUnstable_Code_NewWithPosOnlyArgs
      #else
        PyCode_NewWithPosOnlyArgs
      #endif
        (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
    Py_DECREF(empty_bytes);
    return result;
  }
#elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#else
  #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
#endif
#endif
#if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
  #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
#else
  #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
  #define __Pyx_Py_Is(x, y)  Py_Is(x, y)
#else
  #define __Pyx_Py_Is(x, y) ((x) == (y))
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
  #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
#else
  #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
  #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
#else
  #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
#endif
#if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
  #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
#else
  #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
#endif
#define __Pyx_NoneAsNull(obj)  (__Pyx_Py_IsNone(obj) ? NULL : (obj))
#if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
#else
  #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
#endif
#ifndef CO_COROUTINE
  #define CO_COROUTINE 0x80
#endif
#ifndef CO_ASYNC_GENERATOR
  #define CO_ASYNC_GENERATOR 0x200
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#ifndef Py_TPFLAGS_SEQUENCE
  #define Py_TPFLAGS_SEQUENCE 0
#endif
#ifndef Py_TPFLAGS_MAPPING
  #define Py_TPFLAGS_MAPPING 0
#endif
#ifndef METH_STACKLESS
  #define METH_STACKLESS 0
#endif
#if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
  #ifndef METH_FASTCALL
     #define METH_FASTCALL 0x80
  #endif
  typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
  typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
                                                          Py_ssize_t nargs, PyObject *kwnames);
#else
  #if PY_VERSION_HEX >= 0x030d00A4
  #  define __Pyx_PyCFunctionFast PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
  #else
  #  define __Pyx_PyCFunctionFast _PyCFunctionFast
  #  define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
  #endif
#endif
#if CYTHON_METH_FASTCALL
  #define __Pyx_METH_FASTCALL METH_FASTCALL
  #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
  #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
#else
  #define __Pyx_METH_FASTCALL METH_VARARGS
  #define __Pyx_PyCFunction_FastCall PyCFunction
  #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
#endif
#if CYTHON_VECTORCALL
  #define __pyx_vectorcallfunc vectorcallfunc
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  PY_VECTORCALL_ARGUMENTS_OFFSET
  #define __Pyx_PyVectorcall_NARGS(n)  PyVectorcall_NARGS((size_t)(n))
#elif CYTHON_BACKPORT_VECTORCALL
  typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
                                            size_t nargsf, PyObject *kwnames);
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  ((size_t)1 << (8 * sizeof(size_t) - 1))
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
#else
  #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET  0
  #define __Pyx_PyVectorcall_NARGS(n)  ((Py_ssize_t)(n))
#endif
#if PY_MAJOR_VERSION >= 0x030900B1
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_CheckExact(func)
#else
#define __Pyx_PyCFunction_CheckExact(func)  PyCFunction_Check(func)
#endif
#define __Pyx_CyOrPyCFunction_Check(func)  PyCFunction_Check(func)
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  (((PyCFunctionObject*)(func))->m_ml->ml_meth)
#elif !CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyOrPyCFunction_GET_FUNCTION(func)  PyCFunction_GET_FUNCTION(func)
#endif
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CyOrPyCFunction_GET_FLAGS(func)  (((PyCFunctionObject*)(func))->m_ml->ml_flags)
static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
    return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
}
#endif
static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
#if CYTHON_COMPILING_IN_LIMITED_API
    return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
#else
    return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
#endif
}
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCFunction(func, cfunc)
#if __PYX_LIMITED_VERSION_HEX < 0x030900B1
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  ((void)m, PyType_FromSpecWithBases(s, b))
  typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
#else
  #define __Pyx_PyType_FromModuleAndSpec(m, s, b)  PyType_FromModuleAndSpec(m, s, b)
  #define __Pyx_PyCMethod  PyCMethod
#endif
#ifndef METH_METHOD
  #define METH_METHOD 0x200
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
  #define PyObject_Malloc(s)   PyMem_Malloc(s)
  #define PyObject_Free(p)     PyMem_Free(p)
  #define PyObject_Realloc(p)  PyMem_Realloc(p)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
#else
  #define __Pyx_PyCode_HasFreeVars(co)  (PyCode_GetNumFree(co) > 0)
  #define __Pyx_PyFrame_SetLineNumber(frame, lineno)  (frame)->f_lineno = (lineno)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyThreadState_Current PyThreadState_Get()
#elif !CYTHON_FAST_THREAD_STATE
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#elif PY_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
#elif PY_VERSION_HEX >= 0x03060000
  #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
#elif PY_VERSION_HEX >= 0x03000000
  #define __Pyx_PyThreadState_Current PyThreadState_GET()
#else
  #define __Pyx_PyThreadState_Current _PyThreadState_Current
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
{
    void *result;
    result = PyModule_GetState(op);
    if (!result)
        Py_FatalError("Couldn't find the module state");
    return result;
}
#endif
#define __Pyx_PyObject_GetSlot(obj, name, func_ctype)  __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((func_ctype) PyType_GetSlot((type), Py_##name))
#else
  #define __Pyx_PyType_GetSlot(type, name, func_ctype)  ((type)->name)
#endif
#if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
#include "pythread.h"
#define Py_tss_NEEDS_INIT 0
typedef int Py_tss_t;
static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
  *key = PyThread_create_key();
  return 0;
}
static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
  Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
  *key = Py_tss_NEEDS_INIT;
  return key;
}
static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
  PyObject_Free(key);
}
static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
  return *key != Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
  PyThread_delete_key(*key);
  *key = Py_tss_NEEDS_INIT;
}
static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
  return PyThread_set_key_value(*key, value);
}
static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
  return PyThread_get_key_value(*key);
}
#endif
#if PY_MAJOR_VERSION < 3
    #if CYTHON_COMPILING_IN_PYPY
        #if PYPY_VERSION_NUM < 0x07030600
            #if defined(__cplusplus) && __cplusplus >= 201402L
                [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
            #elif defined(__GNUC__) || defined(__clang__)
                __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
            #elif defined(_MSC_VER)
                __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
            #endif
            static CYTHON_INLINE int PyGILState_Check(void) {
                return 0;
            }
        #else  // PYPY_VERSION_NUM < 0x07030600
        #endif  // PYPY_VERSION_NUM < 0x07030600
    #else
        static CYTHON_INLINE int PyGILState_Check(void) {
            PyThreadState * tstate = _PyThreadState_Current;
            return tstate && (tstate == PyGILState_GetThisThreadState());
        }
    #endif
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
#define __Pyx_PyDict_NewPresized(n)  ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
#else
#define __Pyx_PyDict_NewPresized(n)  PyDict_New()
#endif
#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
#define __Pyx_PyDict_GetItemStrWithError(dict, name)  _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
    PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
    if (res == NULL) PyErr_Clear();
    return res;
}
#elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
#define __Pyx_PyDict_GetItemStrWithError  PyDict_GetItemWithError
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#else
static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
#if CYTHON_COMPILING_IN_PYPY
    return PyDict_GetItem(dict, name);
#else
    PyDictEntry *ep;
    PyDictObject *mp = (PyDictObject*) dict;
    long hash = ((PyStringObject *) name)->ob_shash;
    assert(hash != -1);
    ep = (mp->ma_lookup)(mp, name, hash);
    if (ep == NULL) {
        return NULL;
    }
    return ep->me_value;
#endif
}
#define __Pyx_PyDict_GetItemStr           PyDict_GetItem
#endif
#if CYTHON_USE_TYPE_SLOTS
  #define __Pyx_PyType_GetFlags(tp)   (((PyTypeObject *)tp)->tp_flags)
  #define __Pyx_PyType_HasFeature(type, feature)  ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  (Py_TYPE(obj)->tp_iternext)
#else
  #define __Pyx_PyType_GetFlags(tp)   (PyType_GetFlags((PyTypeObject *)tp))
  #define __Pyx_PyType_HasFeature(type, feature)  PyType_HasFeature(type, feature)
  #define __Pyx_PyObject_GetIterNextFunc(obj)  PyIter_Next
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
#else
  #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
#endif
#if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  {\
    PyTypeObject *type = Py_TYPE((PyObject*)obj);\
    assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
    PyObject_GC_Del(obj);\
    Py_DECREF(type);\
}
#else
#define __Pyx_PyHeapTypeObject_GC_Del(obj)  PyObject_GC_Del(obj)
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GetLength(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((void)u, 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((void)u, (0))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)u)
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GetLength(u))
#elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_READY(op)       (0)
  #else
    #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                                0 : _PyUnicode_Ready((PyObject *)(op)))
  #endif
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   PyUnicode_MAX_CHAR_VALUE(u)
  #define __Pyx_PyUnicode_KIND(u)         ((int)PyUnicode_KIND(u))
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
  #if PY_VERSION_HEX >= 0x030C0000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_LENGTH(u))
  #else
    #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
    #else
    #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
    #endif
  #endif
#else
  #define CYTHON_PEP393_ENABLED 0
  #define PyUnicode_1BYTE_KIND  1
  #define PyUnicode_2BYTE_KIND  2
  #define PyUnicode_4BYTE_KIND  4
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u)   ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
  #define __Pyx_PyUnicode_KIND(u)         ((int)sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
  #define __Pyx_PyUnicode_WRITE(k, d, i, ch)  (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
  #define __Pyx_PyUnicode_IS_TRUE(u)      (0 != PyUnicode_GET_SIZE(u))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #if !defined(PyUnicode_DecodeUnicodeEscape)
    #define PyUnicode_DecodeUnicodeEscape(s, size, errors)  PyUnicode_Decode(s, size, "unicode_escape", errors)
  #endif
  #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
    #undef PyUnicode_Contains
    #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
  #endif
  #if !defined(PyByteArray_Check)
    #define PyByteArray_Check(obj)  PyObject_TypeCheck(obj, &PyByteArray_Type)
  #endif
  #if !defined(PyObject_Format)
    #define PyObject_Format(obj, fmt)  PyObject_CallMethod(obj, "__format__", "O", fmt)
  #endif
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#endif
#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
  #define PyObject_ASCII(o)            PyObject_Repr(o)
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#ifndef PyObject_Unicode
  #define PyObject_Unicode             PyObject_Str
#endif
#endif
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#endif
#if CYTHON_COMPILING_IN_CPYTHON
  #define __Pyx_PySequence_ListKeepNew(obj)\
    (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
#else
  #define __Pyx_PySequence_ListKeepNew(obj)  PySequence_List(obj)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        __Pyx_IS_TYPE(obj, &PySet_Type)
#endif
#if PY_VERSION_HEX >= 0x030900A4
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
#else
  #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
  #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
#endif
#if CYTHON_ASSUME_SAFE_MACROS
  #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
  #define __Pyx_PySequence_SIZE(seq)  Py_SIZE(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
#else
  #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
  #define __Pyx_PySequence_SIZE(seq)  PySequence_Size(seq)
  #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
  #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
  #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
  #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
  #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
  #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
  #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
#endif
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
  #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
#else
  static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
      PyObject *module = PyImport_AddModule(name);
      Py_XINCREF(module);
      return module;
  }
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define __Pyx_Py3Int_Check(op)       PyLong_Check(op)
  #define __Pyx_Py3Int_CheckExact(op)  PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
  #define PyNumber_Int                 PyNumber_Long
#else
  #define __Pyx_Py3Int_Check(op)       (PyLong_Check(op) || PyInt_Check(op))
  #define __Pyx_Py3Int_CheckExact(op)  (PyLong_CheckExact(op) || PyInt_CheckExact(op))
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsHash_t
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   __Pyx_PyIndex_AsSsize_t
#endif
#if CYTHON_USE_ASYNC_SLOTS
  #if PY_VERSION_HEX >= 0x030500B1
    #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
    #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
  #else
    #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
  #endif
#else
  #define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef __Pyx_PyAsyncMethodsStruct
    typedef struct {
        unaryfunc am_await;
        unaryfunc am_aiter;
        unaryfunc am_anext;
    } __Pyx_PyAsyncMethodsStruct;
#endif

#if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
  #if !defined(_USE_MATH_DEFINES)
    #define _USE_MATH_DEFINES
  #endif
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#endif
#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
#define __Pyx_truncl trunc
#else
#define __Pyx_truncl truncl
#endif

#define __PYX_MARK_ERR_POS(f_index, lineno) \
    { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__;  (void)__pyx_clineno; }
#define __PYX_ERR(f_index, lineno, Ln_error) \
    { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }

#ifdef CYTHON_EXTERN_C
    #undef __PYX_EXTERN_C
    #define __PYX_EXTERN_C CYTHON_EXTERN_C
#elif defined(__PYX_EXTERN_C)
    #ifdef _MSC_VER
    #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
    #else
    #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
    #endif
#else
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#define __PYX_HAVE__tbstock__dataAcquisition__saveDataToMysql
#define __PYX_HAVE_API__tbstock__dataAcquisition__saveDataToMysql
/* Early includes */
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
#define CYTHON_WITHOUT_ASSERTIONS
#endif

typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
    return (size_t) i < (size_t) limit;
}
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER)
    #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyBytes_AsWritableString(s)     ((char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableSString(s)    ((signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsWritableUString(s)    ((unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsString(s)     ((const char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsSString(s)    ((const signed char*) PyBytes_AS_STRING(s))
#define __Pyx_PyBytes_AsUString(s)    ((const unsigned char*) PyBytes_AS_STRING(s))
#define __Pyx_PyObject_AsWritableString(s)    ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableSString(s)    ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsWritableUString(s)    ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsSString(s)    ((const signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((const unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#define __Pyx_PyUnicode_FromOrdinal(o)       PyUnicode_FromOrdinal((int)o)
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
#define __Pyx_PySequence_Tuple(obj)\
    (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
#if CYTHON_ASSUME_SAFE_MACROS
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
#else
#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
#endif
#if CYTHON_USE_PYLONG_INTERNALS
  #if PY_VERSION_HEX >= 0x030C00A7
  #ifndef _PyLong_SIGN_MASK
    #define _PyLong_SIGN_MASK 3
  #endif
  #ifndef _PyLong_NON_SIZE_BITS
    #define _PyLong_NON_SIZE_BITS 3
  #endif
  #define __Pyx_PyLong_Sign(x)  (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
  #define __Pyx_PyLong_IsNeg(x)  ((__Pyx_PyLong_Sign(x) & 2) != 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (!__Pyx_PyLong_IsNeg(x))
  #define __Pyx_PyLong_IsZero(x)  (__Pyx_PyLong_Sign(x) & 1)
  #define __Pyx_PyLong_IsPos(x)  (__Pyx_PyLong_Sign(x) == 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  (__Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
  #define __Pyx_PyLong_SignedDigitCount(x)\
        ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
  #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
    #define __Pyx_PyLong_IsCompact(x)     PyUnstable_Long_IsCompact((PyLongObject*) x)
    #define __Pyx_PyLong_CompactValue(x)  PyUnstable_Long_CompactValue((PyLongObject*) x)
  #else
    #define __Pyx_PyLong_IsCompact(x)     (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
    #define __Pyx_PyLong_CompactValue(x)  ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
  #endif
  typedef Py_ssize_t  __Pyx_compact_pylong;
  typedef size_t  __Pyx_compact_upylong;
  #else
  #define __Pyx_PyLong_IsNeg(x)  (Py_SIZE(x) < 0)
  #define __Pyx_PyLong_IsNonNeg(x)  (Py_SIZE(x) >= 0)
  #define __Pyx_PyLong_IsZero(x)  (Py_SIZE(x) == 0)
  #define __Pyx_PyLong_IsPos(x)  (Py_SIZE(x) > 0)
  #define __Pyx_PyLong_CompactValueUnsigned(x)  ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
  #define __Pyx_PyLong_DigitCount(x)  __Pyx_sst_abs(Py_SIZE(x))
  #define __Pyx_PyLong_SignedDigitCount(x)  Py_SIZE(x)
  #define __Pyx_PyLong_IsCompact(x)  (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
  #define __Pyx_PyLong_CompactValue(x)\
        ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
  typedef sdigit  __Pyx_compact_pylong;
  typedef digit  __Pyx_compact_upylong;
  #endif
  #if PY_VERSION_HEX >= 0x030C00A5
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->long_value.ob_digit)
  #else
  #define __Pyx_PyLong_Digits(x)  (((PyLongObject*)x)->ob_digit)
  #endif
#endif
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
#include <string.h>
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = (char) c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#include <string.h>
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }

#if !CYTHON_USE_MODULE_STATE
static PyObject *__pyx_m = NULL;
#endif
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm = __FILE__;
static const char *__pyx_filename;

/* #### Code section: filename_table ### */

static const char *__pyx_f[] = {
  "tbstock/dataAcquisition/saveDataToMysql.py",
};
/* #### Code section: utility_code_proto_before_types ### */
/* ForceInitThreads.proto */
#ifndef __PYX_FORCE_INIT_THREADS
  #define __PYX_FORCE_INIT_THREADS 0
#endif

/* #### Code section: numeric_typedefs ### */
/* #### Code section: complex_type_declarations ### */
/* #### Code section: type_declarations ### */

/*--- Type declarations ---*/
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql;
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql;
struct __pyx_defaults;
typedef struct __pyx_defaults __pyx_defaults;
struct __pyx_defaults {
  PyObject *__pyx_arg_simple_stock_code;
};

/* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_table_columns;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo {
  PyObject_HEAD
  PyObject *__pyx_v_method;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_table_base_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo {
  PyObject_HEAD
  PyObject *__pyx_v_mode;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  PyObject *__pyx_v_mode;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_stock_industry_concept_basic_info;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  PyObject *__pyx_v_mode;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_concept;
  PyObject *__pyx_v_dtype_mapping;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_start_date;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_table_name;
};


/* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */
struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql {
  PyObject_HEAD
  PyObject *__pyx_v_dtype_mapping;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_self;
  PyObject *__pyx_v_table_name;
};

/* #### Code section: utility_code_proto ### */

/* --- Runtime support code (head) --- */
/* Refnanny.proto */
#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif
#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, Py_ssize_t);
    void (*DECREF)(void*, PyObject*, Py_ssize_t);
    void (*GOTREF)(void*, PyObject*, Py_ssize_t);
    void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
    void* (*SetupContext)(const char*, Py_ssize_t, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
          }
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
  #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
#endif
  #define __Pyx_RefNannyFinishContextNogil() {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __Pyx_RefNannyFinishContext();\
              PyGILState_Release(__pyx_gilstate_save);\
          }
  #define __Pyx_RefNannyFinishContext()\
          __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
  #define __Pyx_XINCREF(r)  do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name, acquire_gil)
  #define __Pyx_RefNannyFinishContextNogil()
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif
#define __Pyx_Py_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; Py_XDECREF(tmp);\
    } while (0)
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

/* PyErrExceptionMatches.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
#else
#define __Pyx_PyErr_ExceptionMatches(err)  PyErr_ExceptionMatches(err)
#endif

/* PyThreadStateGet.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyThreadState_declare  PyThreadState *__pyx_tstate;
#define __Pyx_PyThreadState_assign  __pyx_tstate = __Pyx_PyThreadState_Current;
#if PY_VERSION_HEX >= 0x030C00A6
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->current_exception != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
#else
#define __Pyx_PyErr_Occurred()  (__pyx_tstate->curexc_type != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  (__pyx_tstate->curexc_type)
#endif
#else
#define __Pyx_PyThreadState_declare
#define __Pyx_PyThreadState_assign
#define __Pyx_PyErr_Occurred()  (PyErr_Occurred() != NULL)
#define __Pyx_PyErr_CurrentExceptionType()  PyErr_Occurred()
#endif

/* PyErrFetchRestore.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
#define __Pyx_ErrRestoreWithState(type, value, tb)  __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)    __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)    __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
#else
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#endif
#else
#define __Pyx_PyErr_Clear() PyErr_Clear()
#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
#define __Pyx_ErrRestoreWithState(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchWithState(type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestoreInState(tstate, type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetchInState(tstate, type, value, tb)  PyErr_Fetch(type, value, tb)
#define __Pyx_ErrRestore(type, value, tb)  PyErr_Restore(type, value, tb)
#define __Pyx_ErrFetch(type, value, tb)  PyErr_Fetch(type, value, tb)
#endif

/* PyObjectGetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

/* PyObjectGetAttrStrNoError.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);

/* GetBuiltinName.proto */
static PyObject *__Pyx_GetBuiltinName(PyObject *name);

/* TupleAndListFromArray.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
#endif

/* IncludeStringH.proto */
#include <string.h>

/* BytesEquals.proto */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);

/* UnicodeEquals.proto */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);

/* fastcall.proto */
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
#elif CYTHON_ASSUME_SAFE_MACROS
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
#else
    #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
#endif
#if CYTHON_AVOID_BORROWED_REFS
    #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
    #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
#else
    #define __Pyx_Arg_NewRef_VARARGS(arg) arg
    #define __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
#define __Pyx_KwValues_VARARGS(args, nargs) NULL
#define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
#define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
#if CYTHON_METH_FASTCALL
    #define __Pyx_Arg_FASTCALL(args, i) args[i]
    #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
    #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
    static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
    CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
  #else
    #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
  #endif
    #define __Pyx_Arg_NewRef_FASTCALL(arg) arg  /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
                                                   to have the same reference counting */
    #define __Pyx_Arg_XDECREF_FASTCALL(arg)
#else
    #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
    #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
    #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
    #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
    #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
    #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
    #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
#endif
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
#else
#define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
#define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
#endif

/* RaiseDoubleKeywords.proto */
static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);

/* ParseKeywords.proto */
static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
    const char* function_name);

/* RaiseArgTupleInvalid.proto */
static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);

/* PyDictVersioning.proto */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
#define __PYX_DICT_VERSION_INIT  ((PY_UINT64_T) -1)
#define __PYX_GET_DICT_VERSION(dict)  (((PyDictObject*)(dict))->ma_version_tag)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
    (version_var) = __PYX_GET_DICT_VERSION(dict);\
    (cache_var) = (value);
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
        (VAR) = __pyx_dict_cached_value;\
    } else {\
        (VAR) = __pyx_dict_cached_value = (LOOKUP);\
        __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
    }\
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
#else
#define __PYX_GET_DICT_VERSION(dict)  (0)
#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP)  (VAR) = (LOOKUP);
#endif

/* GetModuleGlobalName.proto */
#if CYTHON_USE_DICT_VERSIONS
#define __Pyx_GetModuleGlobalName(var, name)  do {\
    static PY_UINT64_T __pyx_dict_version = 0;\
    static PyObject *__pyx_dict_cached_value = NULL;\
    (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
        (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
        __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  do {\
    PY_UINT64_T __pyx_dict_version;\
    PyObject *__pyx_dict_cached_value;\
    (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
} while(0)
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
#else
#define __Pyx_GetModuleGlobalName(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
#define __Pyx_GetModuleGlobalNameUncached(var, name)  (var) = __Pyx__GetModuleGlobalName(name)
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
#endif

/* PyObjectSetAttrStr.proto */
#if CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

/* PyFunctionFastCall.proto */
#if CYTHON_FAST_PYCALL
#if !CYTHON_VECTORCALL
#define __Pyx_PyFunction_FastCall(func, args, nargs)\
    __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
#endif
#define __Pyx_BUILD_ASSERT_EXPR(cond)\
    (sizeof(char [1 - 2*!(cond)]) - 1)
#ifndef Py_MEMBER_SIZE
#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
#endif
#if !CYTHON_VECTORCALL
#if PY_VERSION_HEX >= 0x03080000
  #include "frameobject.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
  #define __Pxy_PyFrame_Initialize_Offsets()
  #define __Pyx_PyFrame_GetLocalsplus(frame)  ((frame)->f_localsplus)
#else
  static size_t __pyx_pyframe_localsplus_offset = 0;
  #include "frameobject.h"
  #define __Pxy_PyFrame_Initialize_Offsets()\
    ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
     (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
  #define __Pyx_PyFrame_GetLocalsplus(frame)\
    (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
#endif
#endif
#endif

/* PyObjectCall.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

/* PyObjectCallMethO.proto */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

/* PyObjectFastCall.proto */
#define __Pyx_PyObject_FastCall(func, args, nargs)  __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);

/* RaiseTooManyValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

/* RaiseNeedMoreValuesToUnpack.proto */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

/* IterFinish.proto */
static CYTHON_INLINE int __Pyx_IterFinish(void);

/* UnpackItemEndCheck.proto */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);

/* PySequenceContains.proto */
static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
    int result = PySequence_Contains(seq, item);
    return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
}

/* GetItemInt.proto */
#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

/* PyObjectCallOneArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

/* ObjectGetItem.proto */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
#else
#define __Pyx_PyObject_GetItem(obj, key)  PyObject_GetItem(obj, key)
#endif

/* DictGetItem.proto */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
#define __Pyx_PyObject_Dict_GetItem(obj, name)\
    (likely(PyDict_CheckExact(obj)) ?\
     __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
#else
#define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#define __Pyx_PyObject_Dict_GetItem(obj, name)  PyObject_GetItem(obj, name)
#endif

/* PyObjectFormatSimple.proto */
#if CYTHON_COMPILING_IN_PYPY
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#elif PY_MAJOR_VERSION < 3
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyString_CheckExact(s)) ? PyUnicode_FromEncodedObject(s, NULL, "strict") :\
        PyObject_Format(s, f))
#elif CYTHON_USE_TYPE_SLOTS
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        likely(PyLong_CheckExact(s)) ? PyLong_Type.tp_repr(s) :\
        likely(PyFloat_CheckExact(s)) ? PyFloat_Type.tp_repr(s) :\
        PyObject_Format(s, f))
#else
    #define __Pyx_PyObject_FormatSimple(s, f) (\
        likely(PyUnicode_CheckExact(s)) ? (Py_INCREF(s), s) :\
        PyObject_Format(s, f))
#endif

/* JoinPyUnicode.proto */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char);

/* GetTopmostException.proto */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
#endif

/* SaveResetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSave(type, value, tb)  __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#define __Pyx_ExceptionReset(type, value, tb)  __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
#else
#define __Pyx_ExceptionSave(type, value, tb)   PyErr_GetExcInfo(type, value, tb)
#define __Pyx_ExceptionReset(type, value, tb)  PyErr_SetExcInfo(type, value, tb)
#endif

/* GetException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_GetException(type, value, tb)  __Pyx__GetException(__pyx_tstate, type, value, tb)
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* SwapException.proto */
#if CYTHON_FAST_THREAD_STATE
#define __Pyx_ExceptionSwap(type, value, tb)  __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
#endif

/* GetAttr.proto */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);

/* Globals.proto */
static PyObject* __Pyx_Globals(void);

/* StrEquals.proto */
#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

/* PyObjectLookupSpecial.proto */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
#define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
#define __Pyx_PyObject_LookupSpecial(obj, attr_name)  __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
#else
#define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
#endif

/* ListAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

/* RaiseClosureNameError.proto */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);

/* PyObject_Str.proto */
#define __Pyx_PyObject_Str(obj)\
    (likely(PyString_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))

/* py_dict_values.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d);

/* UnpackUnboundCMethod.proto */
typedef struct {
    PyObject *type;
    PyObject **method_name;
    PyCFunction func;
    PyObject *method;
    int flag;
} __Pyx_CachedCFunction;

/* CallUnboundCMethod0.proto */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_CallUnboundCMethod0(cfunc, self)\
    (likely((cfunc)->func) ?\
        (likely((cfunc)->flag == METH_NOARGS) ?  (*((cfunc)->func))(self, NULL) :\
         (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
            (PY_VERSION_HEX >= 0x030700A0 ?\
                (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
                (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
          (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
            (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
            (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ?  ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
               ((cfunc)->flag == METH_VARARGS ?  (*((cfunc)->func))(self, __pyx_empty_tuple) :\
               __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
        __Pyx__CallUnboundCMethod0(cfunc, self))
#else
#define __Pyx_CallUnboundCMethod0(cfunc, self)  __Pyx__CallUnboundCMethod0(cfunc, self)
#endif

/* py_dict_keys.proto */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);

/* PyObjectCall2Args.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);

/* PyObjectGetMethod.proto */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);

/* PyObjectCallMethod1.proto */
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

/* append.proto */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

/* ListCompAppend.proto */
#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len)) {
        Py_INCREF(x);
        #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
        L->ob_item[len] = x;
        #else
        PyList_SET_ITEM(list, len, x);
        #endif
        __Pyx_SET_SIZE(list, len + 1);
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
#endif

/* IncludeStructmemberH.proto */
#include <structmember.h>

/* FixUpExtensionType.proto */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
#endif

/* FetchSharedCythonModule.proto */
static PyObject *__Pyx_FetchSharedCythonABIModule(void);

/* FetchCommonType.proto */
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
#else
static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
#endif

/* PyMethodNew.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    typesModule = PyImport_ImportModule("types");
    if (!typesModule) return NULL;
    methodType = PyObject_GetAttrString(typesModule, "MethodType");
    Py_DECREF(typesModule);
    if (!methodType) return NULL;
    result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
    Py_DECREF(methodType);
    return result;
}
#elif PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
    CYTHON_UNUSED_VAR(typ);
    if (!self)
        return __Pyx_NewRef(func);
    return PyMethod_New(func, self);
}
#else
    #define __Pyx_PyMethod_New PyMethod_New
#endif

/* PyVectorcallFastCallDict.proto */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
#endif

/* CythonFunctionShared.proto */
#define __Pyx_CyFunction_USED
#define __Pyx_CYFUNCTION_STATICMETHOD  0x01
#define __Pyx_CYFUNCTION_CLASSMETHOD   0x02
#define __Pyx_CYFUNCTION_CCLASS        0x04
#define __Pyx_CYFUNCTION_COROUTINE     0x08
#define __Pyx_CyFunction_GetClosure(f)\
    (((__pyx_CyFunctionObject *) (f))->func_closure)
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
  #define __Pyx_CyFunction_GetClassObj(f)\
      (((__pyx_CyFunctionObject *) (f))->func_classobj)
#else
  #define __Pyx_CyFunction_GetClassObj(f)\
      ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
#endif
#define __Pyx_CyFunction_SetClassObj(f, classobj)\
    __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
#define __Pyx_CyFunction_Defaults(type, f)\
    ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
    ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
typedef struct {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject_HEAD
    PyObject *func;
#elif PY_VERSION_HEX < 0x030900B1
    PyCFunctionObject func;
#else
    PyCMethodObject func;
#endif
#if CYTHON_BACKPORT_VECTORCALL
    __pyx_vectorcallfunc func_vectorcall;
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_weakreflist;
#endif
    PyObject *func_dict;
    PyObject *func_name;
    PyObject *func_qualname;
    PyObject *func_doc;
    PyObject *func_globals;
    PyObject *func_code;
    PyObject *func_closure;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    PyObject *func_classobj;
#endif
    void *defaults;
    int defaults_pyobjects;
    size_t defaults_size;
    int flags;
    PyObject *defaults_tuple;
    PyObject *defaults_kwdict;
    PyObject *(*defaults_getter)(PyObject *);
    PyObject *func_annotations;
    PyObject *func_is_coroutine;
} __pyx_CyFunctionObject;
#undef __Pyx_CyOrPyCFunction_Check
#define __Pyx_CyFunction_Check(obj)  __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
#define __Pyx_CyOrPyCFunction_Check(obj)  __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
#define __Pyx_CyFunction_CheckExact(obj)  __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
#undef __Pyx_IsSameCFunction
#define __Pyx_IsSameCFunction(func, cfunc)   __Pyx__IsSameCyOrCFunction(func, cfunc)
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
                                                         size_t size,
                                                         int pyobjects);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
                                                            PyObject *tuple);
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
                                                             PyObject *dict);
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
                                                              PyObject *dict);
static int __pyx_CyFunction_init(PyObject *module);
#if CYTHON_METH_FASTCALL
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
#if CYTHON_BACKPORT_VECTORCALL
#define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
#else
#define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
#endif
#endif

/* CythonFunction.proto */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
                                      int flags, PyObject* qualname,
                                      PyObject *closure,
                                      PyObject *module, PyObject *globals,
                                      PyObject* code);

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_AddCObj(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_TrueDivideObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_AddObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
#endif

/* SetItemInt.proto */
#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
               __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
                                               int is_list, int wraparound, int boundscheck);

/* RaiseUnboundLocalError.proto */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);

/* ArgTypeTest.proto */
#define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
    ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
        __Pyx__ArgTypeTest(obj, type, name, exact))
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);

/* SliceObject.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
        PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
        int has_cstart, int has_cstop, int wraparound);

/* PyFloatBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyFloat_TrueDivideObjC(op1, op2, floatval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceTrueDivide(op1, op2) : PyNumber_TrueDivide(op1, op2))
#endif

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyIntCompare.proto */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace);

/* PyObjectCallNoArg.proto */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);

/* PyObjectCallMethod0.proto */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);

/* RaiseNoneIterError.proto */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void);

/* UnpackTupleError.proto */
static void __Pyx_UnpackTupleError(PyObject *, Py_ssize_t index);

/* UnpackTuple2.proto */
#define __Pyx_unpack_tuple2(tuple, value1, value2, is_tuple, has_known_size, decref_tuple)\
    (likely(is_tuple || PyTuple_Check(tuple)) ?\
        (likely(has_known_size || PyTuple_GET_SIZE(tuple) == 2) ?\
            __Pyx_unpack_tuple2_exact(tuple, value1, value2, decref_tuple) :\
            (__Pyx_UnpackTupleError(tuple, 2), -1)) :\
        __Pyx_unpack_tuple2_generic(tuple, value1, value2, has_known_size, decref_tuple))
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
    PyObject* tuple, PyObject** value1, PyObject** value2, int decref_tuple);
static int __Pyx_unpack_tuple2_generic(
    PyObject* tuple, PyObject** value1, PyObject** value2, int has_known_size, int decref_tuple);

/* dict_iter.proto */
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* dict, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_is_dict);
static CYTHON_INLINE int __Pyx_dict_iter_next(PyObject* dict_or_iter, Py_ssize_t orig_length, Py_ssize_t* ppos,
                                              PyObject** pkey, PyObject** pvalue, PyObject** pitem, int is_dict);

/* PyIntBinop.proto */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
#else
#define __Pyx_PyInt_MultiplyObjC(op1, op2, intval, inplace, zerodivision_check)\
    (inplace ? PyNumber_InPlaceMultiply(op1, op2) : PyNumber_Multiply(op1, op2))
#endif

/* StringJoin.proto */
#if PY_MAJOR_VERSION < 3
#define __Pyx_PyString_Join __Pyx_PyBytes_Join
#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
#else
#define __Pyx_PyString_Join PyUnicode_Join
#define __Pyx_PyBaseString_Join PyUnicode_Join
#endif
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);

/* RaiseUnexpectedTypeError.proto */
static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);

/* UnicodeConcatInPlace.proto */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
    #if CYTHON_REFNANNY
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right, __pyx_refnanny)
    #else
        #define __Pyx_PyUnicode_ConcatInPlace(left, right) __Pyx_PyUnicode_ConcatInPlaceImpl(&left, right)
    #endif
    static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    );
#else
#define __Pyx_PyUnicode_ConcatInPlace __Pyx_PyUnicode_Concat
#endif
#define __Pyx_PyUnicode_ConcatInPlaceSafe(left, right) ((unlikely((left) == Py_None) || unlikely((right) == Py_None)) ?\
    PyNumber_InPlaceAdd(left, right) : __Pyx_PyUnicode_ConcatInPlace(left, right))

/* RaiseException.proto */
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);

/* ValidateBasesTuple.proto */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
#endif

/* PyType_Ready.proto */
CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);

/* PyObject_GenericGetAttrNoDict.proto */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
#else
#define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
#endif

/* Import.proto */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);

/* ImportDottedModule.proto */
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
#endif

/* ImportFrom.proto */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);

/* Py3UpdateBases.proto */
static PyObject* __Pyx_PEP560_update_bases(PyObject *bases);

/* CalculateMetaclass.proto */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);

/* SetNameInClass.proto */
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
#elif CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_SetNameInClass(ns, name, value)\
    (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
#else
#define __Pyx_SetNameInClass(ns, name, value)  PyObject_SetItem(ns, name, value)
#endif

/* Py3ClassCreate.proto */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
                                           PyObject *mkw, PyObject *modname, PyObject *doc);
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
                                      PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);

/* CLineInTraceback.proto */
#ifdef CYTHON_CLINE_IN_TRACEBACK
#define __Pyx_CLineForTraceback(tstate, c_line)  (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
#else
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
#endif

/* CodeObjectCache.proto */
#if !CYTHON_COMPILING_IN_LIMITED_API
typedef struct {
    PyCodeObject* code_object;
    int code_line;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
#endif

/* AddTraceback.proto */
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

/* GCCDiagnostics.proto */
#if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#define __Pyx_HAS_GCC_DIAGNOSTIC
#endif

/* CIntToPy.proto */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

/* FormatTypeName.proto */
#if CYTHON_COMPILING_IN_LIMITED_API
typedef PyObject *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%U"
static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
#define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
#else
typedef const char *__Pyx_TypeName;
#define __Pyx_FMT_TYPENAME "%.200s"
#define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
#define __Pyx_DECREF_TypeName(obj)
#endif

/* CIntFromPy.proto */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

/* CIntFromPy.proto */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

/* FastTypeChecks.proto */
#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
#else
#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
#define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
#endif
#define __Pyx_PyErr_ExceptionMatches2(err1, err2)  __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)

/* CStringEquals.proto */
static CYTHON_INLINE int __Pyx_StrEq(const char *, const char *);

/* CheckBinaryVersion.proto */
static unsigned long __Pyx_get_runtime_version(void);
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);

/* InitStrings.proto */
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

/* #### Code section: module_declarations ### */

/* Module declarations from "tbstock.dataAcquisition.saveDataToMysql" */
/* #### Code section: typeinfo ### */
/* #### Code section: before_global_var ### */
#define __Pyx_MODULE_NAME "tbstock.dataAcquisition.saveDataToMysql"
extern int __pyx_module_is_main_tbstock__dataAcquisition__saveDataToMysql;
int __pyx_module_is_main_tbstock__dataAcquisition__saveDataToMysql = 0;

/* Implementation of "tbstock.dataAcquisition.saveDataToMysql" */
/* #### Code section: global_var ### */
static PyObject *__pyx_builtin_print;
static PyObject *__pyx_builtin_object;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_zip;
static PyObject *__pyx_builtin_reversed;
static PyObject *__pyx_builtin_ValueError;
/* #### Code section: string_decls ### */
static const char __pyx_k_[] = "\347\262\263\347\250\273\350\277\236\347\273\255";
static const char __pyx_k_0[] = "0";
static const char __pyx_k_3[] = "3";
static const char __pyx_k_A[] = "_A";
static const char __pyx_k_B[] = "_B";
static const char __pyx_k_d[] = "d";
static const char __pyx_k_e[] = "e";
static const char __pyx_k_i[] = "i";
static const char __pyx_k_k[] = "\346\227\245k";
static const char __pyx_k_s[] = " s.";
static const char __pyx_k_x[] = "x";
static const char __pyx_k_XX[] = ".XX";
static const char __pyx_k__2[] = "\346\227\251\347\261\274\347\250\273\350\277\236\347\273\255";
static const char __pyx_k__3[] = "\346\231\232\347\261\274\347\250\273\350\277\236\347\273\255";
static const char __pyx_k__4[] = "\345\274\272\351\272\246\350\277\236\347\273\255";
static const char __pyx_k__5[] = ".";
static const char __pyx_k__8[] = ",";
static const char __pyx_k__9[] = "\350\236\215\350\265\204\350\236\215\345\210\270";
static const char __pyx_k_ak[] = "ak";
static const char __pyx_k_bs[] = "bs";
static const char __pyx_k_by[] = "by";
static const char __pyx_k_dt[] = "dt";
static const char __pyx_k_em[] = "em";
static const char __pyx_k_gc[] = "gc";
static const char __pyx_k_id[] = "id";
static const char __pyx_k_is[] = "is_";
static const char __pyx_k_lg[] = "lg";
static const char __pyx_k_np[] = "np";
static const char __pyx_k_on[] = "on";
static const char __pyx_k_pd[] = "pd";
static const char __pyx_k_rs[] = "rs";
static const char __pyx_k_xx[] = "xx.";
static const char __pyx_k_JR0[] = "JR0";
static const char __pyx_k_LR0[] = "LR0";
static const char __pyx_k_NaT[] = "NaT";
static const char __pyx_k_RI0[] = "RI0";
static const char __pyx_k_The[] = "The ";
static const char __pyx_k_WH0[] = "WH0";
static const char __pyx_k__10[] = "\346\262\252\350\202\241\351\200\232";
static const char __pyx_k__11[] = "\346\267\261\350\202\241\351\200\232";
static const char __pyx_k__13[] = "\344\270\273\350\220\245\344\270\232\345\212\241";
static const char __pyx_k__15[] = "\344\272\247\345\223\201\345\220\215\347\247\260";
static const char __pyx_k__17[] = "\344\270\212\345\270\202\346\227\266\351\227\264";
static const char __pyx_k__18[] = "\345\234\260\345\237\237\346\235\277\345\235\227";
static const char __pyx_k__19[] = "\346\265\267\345\244\226";
static const char __pyx_k__21[] = ": ";
static const char __pyx_k__22[] = " ";
static const char __pyx_k__30[] = "";
static const char __pyx_k__31[] = "\346\224\266\347\233\230";
static const char __pyx_k__32[] = "\345\211\215\346\227\245\346\224\266\347\233\230\344\273\267";
static const char __pyx_k__33[] = "\346\266\250\350\267\214\345\271\205";
static const char __pyx_k__35[] = "\346\227\245\346\234\237";
static const char __pyx_k__36[] = "\346\266\250\350\267\214\351\242\235";
static const char __pyx_k__39[] = "\346\212\245\345\221\212\346\234\237";
static const char __pyx_k__42[] = "\351\231\244\346\235\203\351\231\244\346\201\257\346\227\245";
static const char __pyx_k__44[] = "\347\216\260\351\207\221\345\210\206\347\272\242-\347\216\260\351\207\221\345\210\206\347\272\242\346\257\224\344\276\213";
static const char __pyx_k__45[] = "\351\200\201\350\275\254\350\202\241\344\273\275-\351\200\201\350\275\254\346\200\273\346\257\224\344\276\213";
static const char __pyx_k__46[] = "\347\216\260\351\207\221\345\210\206\347\272\242-\347\216\260\351\207\221\345\210\206\347\272\242\346\257\224\344\276\213\346\217\217\350\277\260";
static const char __pyx_k__47[] = "\347\216\260\351\207\221\345\210\206\347\272\242-\350\202\241\346\201\257\347\216\207";
static const char __pyx_k__48[] = "\346\257\217\350\202\241\346\224\266\347\233\212";
static const char __pyx_k__49[] = "\346\257\217\350\202\241\345\205\254\347\247\257\351\207\221";
static const char __pyx_k__50[] = "\346\257\217\350\202\241\346\234\252\345\210\206\351\205\215\345\210\251\346\266\246";
static const char __pyx_k__51[] = "\344\273\243\347\240\201";
static const char __pyx_k__54[] = "-";
static const char __pyx_k__60[] = "\350\202\241\347\245\250\344\273\243\347\240\201";
static const char __pyx_k__61[] = "\345\274\200\347\233\230";
static const char __pyx_k__62[] = "\346\234\200\351\253\230";
static const char __pyx_k__63[] = "\346\234\200\344\275\216";
static const char __pyx_k__64[] = "\346\210\220\344\272\244\351\207\217";
static const char __pyx_k__65[] = "\346\210\220\344\272\244\351\242\235";
static const char __pyx_k__66[] = "\346\215\242\346\211\213\347\216\207";
static const char __pyx_k__67[] = "_";
static const char __pyx_k__71[] = "\346\235\277\345\235\227\344\273\243\347\240\201";
static const char __pyx_k__72[] = "\346\235\277\345\235\227\345\220\215\347\247\260";
static const char __pyx_k__76[] = "\346\214\257\345\271\205";
static const char __pyx_k__87[] = "\345\274\200\347\233\230\344\273\267";
static const char __pyx_k__88[] = "\346\234\200\351\253\230\344\273\267";
static const char __pyx_k__89[] = "\346\234\200\344\275\216\344\273\267";
static const char __pyx_k__90[] = "\346\224\266\347\233\230\344\273\267";
static const char __pyx_k__91[] = "\346\214\201\344\273\223\351\207\217";
static const char __pyx_k__94[] = "*";
static const char __pyx_k_all[] = "all";
static const char __pyx_k_api[] = "api";
static const char __pyx_k_con[] = "con";
static const char __pyx_k_doc[] = "__doc__";
static const char __pyx_k_end[] = "end";
static const char __pyx_k_eps[] = "eps";
static const char __pyx_k_how[] = "how";
static const char __pyx_k_inf[] = "inf";
static const char __pyx_k_key[] = "key";
static const char __pyx_k_loc[] = "loc";
static const char __pyx_k_low[] = "low";
static const char __pyx_k_max[] = "max";
static const char __pyx_k_nan[] = "nan";
static const char __pyx_k_new[] = "new";
static const char __pyx_k_pop[] = "pop";
static const char __pyx_k_qfq[] = "qfq";
static const char __pyx_k_res[] = "res";
static const char __pyx_k_row[] = "row";
static const char __pyx_k_sdc[] = "sdc";
static const char __pyx_k_str[] = "str";
static const char __pyx_k_sys[] = "sys";
static const char __pyx_k_zip[] = "zip";
static const char __pyx_k__177[] = "?";
static const char __pyx_k_axis[] = "axis";
static const char __pyx_k_bool[] = "bool";
static const char __pyx_k_code[] = "code";
static const char __pyx_k_cols[] = "cols";
static const char __pyx_k_copy[] = "copy";
static const char __pyx_k_data[] = "data";
static const char __pyx_k_date[] = "date";
static const char __pyx_k_desc[] = "desc";
static const char __pyx_k_dict[] = "dict";
static const char __pyx_k_drop[] = "drop";
static const char __pyx_k_exit[] = "__exit__";
static const char __pyx_k_func[] = "func";
static const char __pyx_k_high[] = "high";
static const char __pyx_k_iloc[] = "iloc";
static const char __pyx_k_info[] = "info";
static const char __pyx_k_init[] = "__init__";
static const char __pyx_k_isin[] = "isin";
static const char __pyx_k_isna[] = "isna";
static const char __pyx_k_item[] = "item";
static const char __pyx_k_join[] = "join";
static const char __pyx_k_keys[] = "keys";
static const char __pyx_k_list[] = "list";
static const char __pyx_k_main[] = "__main__";
static const char __pyx_k_mode[] = "mode";
static const char __pyx_k_name[] = "name";
static const char __pyx_k_next[] = "next";
static const char __pyx_k_open[] = "open";
static const char __pyx_k_rows[] = "rows";
static const char __pyx_k_rzrq[] = "rzrq";
static const char __pyx_k_self[] = "self";
static const char __pyx_k_sina[] = "sina";
static const char __pyx_k_size[] = "size";
static const char __pyx_k_spec[] = "__spec__";
static const char __pyx_k_temp[] = "temp";
static const char __pyx_k_test[] = "test";
static const char __pyx_k_time[] = "time";
static const char __pyx_k_tqdm[] = "tqdm";
static const char __pyx_k_turn[] = "turn";
static const char __pyx_k_wait[] = "wait";
static const char __pyx_k_year[] = "year";
static const char __pyx_k_Y_m_d[] = "%Y%m%d";
static const char __pyx_k_apply[] = "apply";
static const char __pyx_k_close[] = "close";
static const char __pyx_k_daily[] = "daily";
static const char __pyx_k_dtype[] = "dtype";
static const char __pyx_k_empty[] = "empty";
static const char __pyx_k_enter[] = "__enter__";
static const char __pyx_k_error[] = "error";
static const char __pyx_k_first[] = "first";
static const char __pyx_k_index[] = "index";
static const char __pyx_k_inner[] = "inner";
static const char __pyx_k_items[] = "items";
static const char __pyx_k_login[] = "login";
static const char __pyx_k_merge[] = "merge";
static const char __pyx_k_numpy[] = "numpy";
static const char __pyx_k_print[] = "print";
static const char __pyx_k_query[] = "query";
static const char __pyx_k_range[] = "range";
static const char __pyx_k_round[] = "round";
static const char __pyx_k_shape[] = "shape";
static const char __pyx_k_shift[] = "shift";
static const char __pyx_k_split[] = "split";
static const char __pyx_k_start[] = "start";
static const char __pyx_k_stock[] = " stock: ";
static const char __pyx_k_super[] = "super";
static const char __pyx_k_total[] = "total";
static const char __pyx_k_types[] = "types";
static const char __pyx_k_utils[] = "utils";
static const char __pyx_k_value[] = "value";
static const char __pyx_k_300416[] = "300416";
static const char __pyx_k_600096[] = "600096";
static const char __pyx_k_689009[] = "689009";
static const char __pyx_k_adjust[] = "adjust";
static const char __pyx_k_amount[] = "amount";
static const char __pyx_k_append[] = "append";
static const char __pyx_k_code_2[] = " code = ";
static const char __pyx_k_coerce[] = "coerce";
static const char __pyx_k_commit[] = "commit";
static const char __pyx_k_concat[] = "concat";
static const char __pyx_k_delete[] = "delete";
static const char __pyx_k_dict_2[] = "__dict__";
static const char __pyx_k_enable[] = "enable";
static const char __pyx_k_engine[] = "engine";
static const char __pyx_k_err_is[] = ", err is ";
static const char __pyx_k_errors[] = "errors";
static const char __pyx_k_f_code[] = "f_code";
static const char __pyx_k_fields[] = "fields";
static const char __pyx_k_fillna[] = "fillna";
static const char __pyx_k_filter[] = "filter";
static const char __pyx_k_future[] = "future";
static const char __pyx_k_import[] = "__import__";
static const char __pyx_k_insert[] = "insert";
static const char __pyx_k_is_new[] = " is new ";
static const char __pyx_k_logger[] = "logger";
static const char __pyx_k_logout[] = "logout";
static const char __pyx_k_method[] = "method";
static const char __pyx_k_module[] = "__module__";
static const char __pyx_k_name_2[] = "__name__";
static const char __pyx_k_name_A[] = "name_A";
static const char __pyx_k_name_B[] = "name_B";
static const char __pyx_k_object[] = "object";
static const char __pyx_k_pandas[] = "pandas";
static const char __pyx_k_period[] = "period";
static const char __pyx_k_remove[] = "remove";
static const char __pyx_k_rename[] = "rename";
static const char __pyx_k_report[] = "report";
static const char __pyx_k_res_fq[] = "res_fq";
static const char __pyx_k_result[] = "result";
static const char __pyx_k_return[] = "return";
static const char __pyx_k_scalar[] = "scalar";
static const char __pyx_k_single[] = "single";
static const char __pyx_k_submit[] = "submit";
static const char __pyx_k_symbol[] = "symbol";
static const char __pyx_k_test_2[] = "__test__";
static const char __pyx_k_thread[] = "thread";
static const char __pyx_k_to_sql[] = "to_sql";
static const char __pyx_k_update[] = "update ";
static const char __pyx_k_values[] = "values";
static const char __pyx_k_volume[] = "volume";
static const char __pyx_k_akshare[] = "akshare";
static const char __pyx_k_co_name[] = "co_name";
static const char __pyx_k_code_is[] = ", code is ";
static const char __pyx_k_columns[] = "columns";
static const char __pyx_k_concept[] = "concept";
static const char __pyx_k_cumprod[] = "cumprod";
static const char __pyx_k_disable[] = "disable";
static const char __pyx_k_dispose[] = "dispose";
static const char __pyx_k_error_2[] = "error: ";
static const char __pyx_k_ex_date[] = "ex_date";
static const char __pyx_k_fhsz_em[] = "fhsz_em";
static const char __pyx_k_futures[] = "futures";
static const char __pyx_k_history[] = "_history: ";
static const char __pyx_k_inplace[] = "inplace";
static const char __pyx_k_is_hsgt[] = "is_hsgt";
static const char __pyx_k_prepare[] = "__prepare__";
static const char __pyx_k_process[] = "process";
static const char __pyx_k_quarter[] = "quarter";
static const char __pyx_k_replace[] = "replace";
static const char __pyx_k_session[] = "session";
static const char __pyx_k_succeed[] = "succeed";
static const char __pyx_k_tbstock[] = "tbstock";
static const char __pyx_k_to_list[] = "to_list";
static const char __pyx_k_updated[] = "updated";
static const char __pyx_k_version[] = "__version__";
static const char __pyx_k_warning[] = "warning";
static const char __pyx_k_workers[] = "workers";
static const char __pyx_k_20180101[] = "20180101";
static const char __pyx_k_20240503[] = "20240503";
static const char __pyx_k_20240530[] = "20240530";
static const char __pyx_k_20241230[] = "20241230";
static const char __pyx_k_baostock[] = "baostock";
static const char __pyx_k_bool_str[] = "(bool, str)";
static const char __pyx_k_code_str[] = "code_str";
static const char __pyx_k_dataproc[] = "dataproc";
static const char __pyx_k_datetime[] = "datetime";
static const char __pyx_k_end_date[] = "end_date";
static const char __pyx_k_end_time[] = "end_time";
static const char __pyx_k_executor[] = "executor";
static const char __pyx_k_finished[] = " finished.";
static const char __pyx_k_for_code[] = " for code = ";
static const char __pyx_k_fun_name[] = "fun_name";
static const char __pyx_k_getframe[] = "_getframe";
static const char __pyx_k_industry[] = "industry";
static const char __pyx_k_ipo_time[] = "ipo_time";
static const char __pyx_k_is_Empty[] = " is Empty.";
static const char __pyx_k_iterrows[] = "iterrows";
static const char __pyx_k_max_date[] = "max_date";
static const char __pyx_k_no_fault[] = "no_fault";
static const char __pyx_k_order_by[] = "order_by";
static const char __pyx_k_preclose[] = "preclose";
static const char __pyx_k_province[] = "province";
static const char __pyx_k_qualname[] = "__qualname__";
static const char __pyx_k_read_csv[] = "read_csv";
static const char __pyx_k_reversed[] = "reversed";
static const char __pyx_k_row_code[] = "row_code";
static const char __pyx_k_row_date[] = "row_date";
static const char __pyx_k_set_name[] = "__set_name__";
static const char __pyx_k_shutdown[] = "shutdown";
static const char __pyx_k_strftime[] = "strftime";
static const char __pyx_k_strptime[] = "strptime";
static const char __pyx_k_suffixes[] = "suffixes";
static const char __pyx_k_Beginning[] = "Beginning ";
static const char __pyx_k_DataFrame[] = "DataFrame";
static const char __pyx_k_ascending[] = "ascending";
static const char __pyx_k_data_dict[] = "data_dict";
static const char __pyx_k_data_list[] = "data_list";
static const char __pyx_k_desc_name[] = "desc_name";
static const char __pyx_k_diff_code[] = "diff_code";
static const char __pyx_k_error_msg[] = "error_msg";
static const char __pyx_k_filter_by[] = "filter_by";
static const char __pyx_k_frequency[] = "frequency";
static const char __pyx_k_if_exists[] = "if_exists";
static const char __pyx_k_is_delist[] = "is_delist";
static const char __pyx_k_is_margin[] = "is_margin";
static const char __pyx_k_isenabled[] = "isenabled";
static const char __pyx_k_loadTable[] = "loadTable";
static const char __pyx_k_merged_df[] = "merged_df";
static const char __pyx_k_metaclass[] = "__metaclass__";
static const char __pyx_k_new_order[] = "new_order";
static const char __pyx_k_null_list[] = "null_list";
static const char __pyx_k_null_rows[] = "null_rows";
static const char __pyx_k_pre_close[] = "pre_close";
static const char __pyx_k_qfq_close[] = "qfq_close";
static const char __pyx_k_stock_len[] = "stock_len";
static const char __pyx_k_succeed_2[] = " succeed.";
static const char __pyx_k_time_cost[] = "time cost = ";
static const char __pyx_k_turn_over[] = "turn_over";
static const char __pyx_k_updateLib[] = "updateLib";
static const char __pyx_k_year_list[] = "year_list";
static const char __pyx_k_ValueError[] = "ValueError";
static const char __pyx_k_adjustflag[] = "adjustflag";
static const char __pyx_k_error_code[] = "error_code";
static const char __pyx_k_first_date[] = "first_date";
static const char __pyx_k_func_index[] = "func_index";
static const char __pyx_k_hfq_factor[] = "hfq_factor";
static const char __pyx_k_index_code[] = "index_code";
static const char __pyx_k_index_name[] = "index_name";
static const char __pyx_k_is_primary[] = "is_primary";
static const char __pyx_k_is_session[] = "is_session";
static const char __pyx_k_multi_type[] = "multi_type";
static const char __pyx_k_new_record[] = "new_record";
static const char __pyx_k_new_stocks[] = "new_stocks";
static const char __pyx_k_qfq_factor[] = "qfq_factor";
static const char __pyx_k_row_index1[] = "row_index1";
static const char __pyx_k_row_index2[] = "row_index2";
static const char __pyx_k_row_indice[] = "row_indice";
static const char __pyx_k_set_option[] = "set_option";
static const char __pyx_k_split_dict[] = "split_dict";
static const char __pyx_k_start_date[] = "start_date";
static const char __pyx_k_start_time[] = "start_time";
static const char __pyx_k_stock_code[] = "stock_code";
static const char __pyx_k_stock_item[] = "stock_item";
static const char __pyx_k_stock_name[] = "stock_name";
static const char __pyx_k_tableTools[] = "tableTools";
static const char __pyx_k_table_name[] = "table_name";
static const char __pyx_k_to_numeric[] = "to_numeric";
static const char __pyx_k_today_date[] = "today_date";
static const char __pyx_k_DataToMysql[] = "DataToMysql \344\270\215\345\217\257\345\272\217\345\210\227\345\214\226\347\232\204\345\261\236\346\200\247:";
static const char __pyx_k_all_succeed[] = "all_succeed";
static const char __pyx_k_cocept_name[] = "cocept_name";
static const char __pyx_k_cons_stocks[] = "cons_stocks";
static const char __pyx_k_dividend_df[] = "dividend_df";
static const char __pyx_k_failed_list[] = "failed_list";
static const char __pyx_k_fq_row_date[] = "fq_row_date";
static const char __pyx_k_future_code[] = "future_code";
static const char __pyx_k_future_name[] = "future_name";
static const char __pyx_k_has_updated[] = " has updated.";
static const char __pyx_k_is_datetime[] = "is_datetime";
static const char __pyx_k_match_index[] = "match_index";
static const char __pyx_k_max_date_em[] = "max_date_em";
static const char __pyx_k_max_workers[] = "max_workers";
static const char __pyx_k_min_date_em[] = "min_date_em";
static const char __pyx_k_mininterval[] = "mininterval";
static const char __pyx_k_mro_entries[] = "__mro_entries__";
static const char __pyx_k_need_update[] = "need_update";
static const char __pyx_k_report_date[] = "report_date";
static const char __pyx_k_sh_calendar[] = "sh_calendar";
static const char __pyx_k_simple_info[] = "simple_info";
static const char __pyx_k_sort_values[] = "sort_values";
static const char __pyx_k_stock_query[] = "stock_query";
static const char __pyx_k_stocks_list[] = "stocks_list";
static const char __pyx_k_to_datetime[] = "to_datetime";
static const char __pyx_k_tradestatus[] = "tradestatus";
static const char __pyx_k_update_dict[] = "update_dict";
static const char __pyx_k_update_json[] = "update_json";
static const char __pyx_k_update_list[] = "update_list";
static const char __pyx_k_Fq_factor_of[] = "Fq factor of ";
static const char __pyx_k_as_completed[] = "as_completed";
static const char __pyx_k_concept_name[] = "concept_name";
static const char __pyx_k_current_time[] = "current_time";
static const char __pyx_k_default_date[] = "default_date";
static const char __pyx_k_fq_factor_df[] = "fq_factor_df";
static const char __pyx_k_func_concept[] = "func_concept";
static const char __pyx_k_get_row_data[] = "get_row_data";
static const char __pyx_k_hfq_factor_2[] = "hfq-factor";
static const char __pyx_k_hsgt_history[] = "hsgt_history";
static const char __pyx_k_ignore_index[] = "ignore_index";
static const char __pyx_k_initializing[] = "_initializing";
static const char __pyx_k_is_coroutine[] = "_is_coroutine";
static const char __pyx_k_key_products[] = "key_products";
static const char __pyx_k_loadJsonData[] = "loadJsonData";
static const char __pyx_k_local_engine[] = "local_engine";
static const char __pyx_k_max_date_row[] = "max_date_row";
static const char __pyx_k_multi_thread[] = "multi_thread";
static const char __pyx_k_next_session[] = "next_session";
static const char __pyx_k_qfq_factor_2[] = "qfq-factor";
static const char __pyx_k_rzrq_history[] = "rzrq_history";
static const char __pyx_k_stock_tfp_em[] = "stock_tfp_em";
static const char __pyx_k_update_range[] = "update_range";
static const char __pyx_k_updated_list[] = "updated_list";
static const char __pyx_k_DataToMysql_2[] = "DataToMysql";
static const char __pyx_k_Failed_update[] = "Failed update ";
static const char __pyx_k_basic_info_df[] = "basic_info_df";
static const char __pyx_k_class_getitem[] = "__class_getitem__";
static const char __pyx_k_data_to_mysql[] = "data_to_mysql";
static const char __pyx_k_data_wrong_in[] = " data wrong in ";
static const char __pyx_k_dividend_text[] = "dividend_text";
static const char __pyx_k_dtype_mapping[] = "dtype_mapping";
static const char __pyx_k_func_industry[] = "func_industry";
static const char __pyx_k_industry_name[] = "industry_name";
static const char __pyx_k_init_subclass[] = "__init_subclass__";
static const char __pyx_k_local_session[] = "local_session";
static const char __pyx_k_main_business[] = "main_business";
static const char __pyx_k_min_date_sina[] = "min_date_sina";
static const char __pyx_k_open_interest[] = "open_interest";
static const char __pyx_k_origin_factor[] = "origin_factor";
static const char __pyx_k_table_columns[] = "table_columns";
static const char __pyx_k_tbstock_utils[] = "tbstock.utils";
static const char __pyx_k_Failed_date_is[] = "Failed date is ";
static const char __pyx_k_Succeed_update[] = "Succeed update ";
static const char __pyx_k_all_stock_list[] = "all_stock_list";
static const char __pyx_k_cash_dividends[] = "cash_dividends";
static const char __pyx_k_combined_codes[] = "combined_codes";
static const char __pyx_k_dataManagement[] = "dataManagement";
static const char __pyx_k_dataPreprocess[] = "dataPreprocess";
static const char __pyx_k_date_data_type[] = "date_data_type";
static const char __pyx_k_dividend_table[] = "dividend_table";
static const char __pyx_k_dividend_yield[] = "dividend_yield";
static const char __pyx_k_dumpJsonToFile[] = "dumpJsonToFile";
static const char __pyx_k_hsgt_trade_day[] = "hsgt_trade_day";
static const char __pyx_k_json_file_name[] = "json_file_name";
static const char __pyx_k_kzz_basic_info[] = "kzz_basic_info";
static const char __pyx_k_load_json_file[] = "load_json_file";
static const char __pyx_k_max_date_table[] = "max_date_table";
static const char __pyx_k_need_to_update[] = " need to update. ";
static const char __pyx_k_outstand_share[] = "outstand_share";
static const char __pyx_k_pandas_version[] = "pandas version: ";
static const char __pyx_k_row_qfq_factor[] = "row_qfq_factor";
static const char __pyx_k_rzrq_trade_day[] = "rzrq_trade_day";
static const char __pyx_k_startWithDigit[] = "startWithDigit";
static const char __pyx_k_stock_name_new[] = "stock_name_new";
static const char __pyx_k_stock_zyjs_ths[] = "stock_zyjs_ths";
static const char __pyx_k_update_concept[] = " : update concept : ";
static const char __pyx_k_updatelog_json[] = "_updatelog.json";
static const char __pyx_k_Succeed_save_in[] = "Succeed save in ";
static const char __pyx_k_TradeDayInfo_of[] = ": TradeDayInfo of ";
static const char __pyx_k_akshare_version[] = "akshare version: ";
static const char __pyx_k_cols_to_convert[] = "cols_to_convert";
static const char __pyx_k_dataAcquisition[] = "dataAcquisition";
static const char __pyx_k_delist_stock_df[] = "delist_stock_df";
static const char __pyx_k_detail_for_code[] = "_detail for code = ";
static const char __pyx_k_fq_row_date_str[] = "fq_row_date_str";
static const char __pyx_k_has_update_file[] = "has_update_file";
static const char __pyx_k_index_trade_day[] = "index_trade_day";
static const char __pyx_k_min_date_em_str[] = "min_date_em_str";
static const char __pyx_k_pre_close_first[] = "pre_close_first";
static const char __pyx_k_rename_stock_df[] = "rename_stock_df";
static const char __pyx_k_result_day_data[] = "result_day_data";
static const char __pyx_k_stock_code_back[] = "stock_code_back";
static const char __pyx_k_stock_dividends[] = "stock_dividends";
static const char __pyx_k_stock_fq_factor[] = "stock_fq_factor";
static const char __pyx_k_stock_full_code[] = "stock_full_code";
static const char __pyx_k_stock_tfp_em_df[] = "stock_tfp_em_df";
static const char __pyx_k_stock_to_update[] = "stock_to_update";
static const char __pyx_k_stock_trade_day[] = "stock_trade_day_";
static const char __pyx_k_stock_zh_a_gdhs[] = "stock_zh_a_gdhs";
static const char __pyx_k_stock_zh_a_hist[] = "stock_zh_a_hist";
static const char __pyx_k_table_base_name[] = "table_base_name";
static const char __pyx_k_table_name_year[] = "table_name_year";
static const char __pyx_k_update_industry[] = " : update industry : ";
static const char __pyx_k_updated_concept[] = "updated_concept";
static const char __pyx_k_year_stock_data[] = "year_stock_data";
static const char __pyx_k_baostock_version[] = "baostock version: ";
static const char __pyx_k_cash_dividend_ps[] = "cash_dividend_ps";
static const char __pyx_k_data_is_wrong_in[] = " data is wrong in ";
static const char __pyx_k_dump_json_period[] = "dump_json_period";
static const char __pyx_k_fq_factor_origin[] = "fq_factor_origin";
static const char __pyx_k_future_trade_day[] = "future_trade_day";
static const char __pyx_k_getFullStockCode[] = "getFullStockCode";
static const char __pyx_k_getIndexCodeName[] = "getIndexCodeName";
static const char __pyx_k_latest_trade_day[] = "latest_trade_day";
static const char __pyx_k_mysql_table_name[] = "mysql_table_name";
static const char __pyx_k_stockDataCrawler[] = "stockDataCrawler";
static const char __pyx_k_stock_basic_info[] = "stock_basic_info";
static const char __pyx_k_stock_zh_a_daily[] = "stock_zh_a_daily";
static const char __pyx_k_test_simple_code[] = "test_simple_code";
static const char __pyx_k_updated_industry[] = "updated_industry";
static const char __pyx_k_TradeDayInfo_of_2[] = "TradeDayInfo of ";
static const char __pyx_k_clearTableContent[] = "clearTableContent";
static const char __pyx_k_futures_main_sina[] = "futures_main_sina";
static const char __pyx_k_get_table_columns[] = "get_table_columns";
static const char __pyx_k_kzz_basic_info_em[] = "kzz_basic_info_em";
static const char __pyx_k_main_fina_data_df[] = "main_fina_data_df";
static const char __pyx_k_min_date_sina_str[] = "min_date_sina_str";
static const char __pyx_k_simple_stock_code[] = "simple_stock_code";
static const char __pyx_k_stock_dividend_ps[] = "stock_dividend_ps";
static const char __pyx_k_stock_hold_number[] = "stock_hold_number";
static const char __pyx_k_stock_hsgt_detail[] = "stock_hsgt_detail";
static const char __pyx_k_stock_rzrq_detail[] = "stock_rzrq_detail";
static const char __pyx_k_stock_simple_code[] = "stock_simple_code";
static const char __pyx_k_stock_simple_info[] = "stock_simple_info";
static const char __pyx_k_stock_trade_day_2[] = "stock_trade_day";
static const char __pyx_k_stock_zyjs_ths_df[] = "stock_zyjs_ths_df";
static const char __pyx_k_updateStockTables[] = "updateStockTables";
static const char __pyx_k_DataToMysql___init[] = "DataToMysql.__init__";
static const char __pyx_k_Failed_to_call_sdc[] = "Failed to call sdc.";
static const char __pyx_k_ThreadPoolExecutor[] = "ThreadPoolExecutor";
static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
static const char __pyx_k_capital_reserve_ps[] = "capital_reserve_ps";
static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
static const char __pyx_k_concept_history_df[] = "concept_history_df";
static const char __pyx_k_concurrent_futures[] = "concurrent.futures";
static const char __pyx_k_getStockSimpleInfo[] = "getStockSimpleInfo";
static const char __pyx_k_getSuspendedStocks[] = "getSuspendedStocks";
static const char __pyx_k_is_null_ex_data_em[] = "is_null_ex_data_em";
static const char __pyx_k_max_date_row_table[] = "max_date_row_table";
static const char __pyx_k_maybe_is_new_stock[] = ": maybe is new stock ";
static const char __pyx_k_stock_trade_day_df[] = "stock_trade_day_df";
static const char __pyx_k_table_max_date_str[] = "table_max_date_str";
static const char __pyx_k_unassign_profit_ps[] = "unassign_profit_ps";
static const char __pyx_k_updateStrategyDict[] = "updateStrategyDict";
static const char __pyx_k_update_db_logs_dir[] = "update_db_logs_dir";
static const char __pyx_k_updated_list_index[] = "updated_list_index";
static const char __pyx_k_Data_failed_save_in[] = "Data failed save in ";
static const char __pyx_k_ProcessPoolExecutor[] = "ProcessPoolExecutor";
static const char __pyx_k_concept_cons_stocks[] = "concept_cons_stocks";
static const char __pyx_k_dont_need_to_update[] = " dont need to update. ";
static const char __pyx_k_exclude_future_dict[] = "exclude_future_dict";
static const char __pyx_k_exclude_future_list[] = "exclude_future_list";
static const char __pyx_k_futureCodeNames_csv[] = "futureCodeNames.csv";
static const char __pyx_k_future_code_name_df[] = "future_code_name_df";
static const char __pyx_k_index_trade_data_df[] = "index_trade_data_df";
static const char __pyx_k_setTableColumnValue[] = "setTableColumnValue";
static const char __pyx_k_stock_basic_info_df[] = "stock_basic_info_df";
static const char __pyx_k_stock_dividend_info[] = "stock_dividend_info";
static const char __pyx_k_synchronize_session[] = "synchronize_session";
static const char __pyx_k_Don_t_need_to_update[] = "Don't need to update ";
static const char __pyx_k_StockTradeDayInfo_of[] = "StockTradeDayInfo of ";
static const char __pyx_k_fixTradeDayNullValue[] = "fixTradeDayNullValue";
static const char __pyx_k_future_trade_data_df[] = "future_trade_data_df";
static const char __pyx_k_getConceptStockCodes[] = "getConceptStockCodes";
static const char __pyx_k_getStockFqfactorInfo[] = "getStockFqfactorInfo";
static const char __pyx_k_index_code_name_dict[] = "index_code_name_dict";
static const char __pyx_k_industry_cons_stocks[] = "industry_cons_stocks";
static const char __pyx_k_isAPrimaryBoardStock[] = "isAPrimaryBoardStock";
static const char __pyx_k_splitDataframeByYear[] = "splitDataframeByYear";
static const char __pyx_k_stock_fhps_detail_em[] = "stock_fhps_detail_em";
static const char __pyx_k_stock_hsgt_trade_day[] = "stock_hsgt_trade_day";
static const char __pyx_k_stock_rzrq_trade_day[] = "stock_rzrq_trade_day";
static const char __pyx_k_stock_trade_day_2018[] = "stock_trade_day_2018";
static const char __pyx_k_stock_trade_day_2019[] = "stock_trade_day_2019";
static const char __pyx_k_stock_trade_day_2020[] = "stock_trade_day_2020";
static const char __pyx_k_stock_trade_day_2021[] = "stock_trade_day_2021";
static const char __pyx_k_stock_trade_day_2022[] = "stock_trade_day_2022";
static const char __pyx_k_stock_trade_day_2023[] = "stock_trade_day_2023";
static const char __pyx_k_stock_trade_day_2024[] = "stock_trade_day_2024";
static const char __pyx_k_suspended_stock_list[] = "suspended_stock_list";
static const char __pyx_k_update_industry_This[] = "update_industry: This ";
static const char __pyx_k_all_stock_simple_info[] = "all_stock_simple_info";
static const char __pyx_k_basic_info_table_name[] = "basic_info_table_name";
static const char __pyx_k_check_serializability[] = "check_serializability";
static const char __pyx_k_concept_trade_data_df[] = "concept_trade_data_df";
static const char __pyx_k_create_engine_session[] = "create_engine_session";
static const char __pyx_k_dont_need_to_update_2[] = " dont need to update.";
static const char __pyx_k_getFqFactorByDividend[] = "getFqFactorByDividend";
static const char __pyx_k_is_null_ex_data_table[] = "is_null_ex_data_table";
static const char __pyx_k_it_has_been_suspended[] = ", it has been suspended";
static const char __pyx_k_restoration_price_hfq[] = "restoration_price_hfq";
static const char __pyx_k_restoration_price_qfq[] = "restoration_price_qfq";
static const char __pyx_k_loadTableContentByCode[] = "loadTableContentByCode";
static const char __pyx_k_new_data_fist_date_str[] = "new_data_fist_date_str";
static const char __pyx_k_non_serializable_attrs[] = "non_serializable_attrs";
static const char __pyx_k_saveHistTradeDayInfoEm[] = "saveHistTradeDayInfoEm";
static const char __pyx_k_stock_dividend_info_of[] = "stock_dividend_info of ";
static const char __pyx_k_stock_financial_report[] = "stock_financial_report";
static const char __pyx_k_stock_info_a_code_name[] = "stock_info_a_code_name";
static const char __pyx_k_stock_zh_a_hist_em_bfq[] = "stock_zh_a_hist_em_bfq";
static const char __pyx_k_table_has_been_updated[] = " table has been updated.";
static const char __pyx_k_updateStockConceptInfo[] = "updateStockConceptInfo";
static const char __pyx_k_clearTableContentByCode[] = "clearTableContentByCode";
static const char __pyx_k_is_datetime64_any_dtype[] = "is_datetime64_any_dtype";
static const char __pyx_k_not_in_stock_basic_info[] = " not in stock_basic_info.";
static const char __pyx_k_stock_concept_trade_day[] = "stock_concept_trade_day";
static const char __pyx_k_stock_financial_quarter[] = "stock_financial_quarter";
static const char __pyx_k_stock_zh_index_daily_em[] = "stock_zh_index_daily_em";
static const char __pyx_k_trade_day_data_is_empty[] = " trade day data is empty. ";
static const char __pyx_k_updateStockIndustryInfo[] = "updateStockIndustryInfo";
static const char __pyx_k_updateStockTradeDayInfo[] = "updateStockTradeDayInfo";
static const char __pyx_k_DataToMysql_func_concept[] = "DataToMysql.func_concept";
static const char __pyx_k_Failed_to_call_sdc_stock[] = "Failed to call sdc.stock_";
static const char __pyx_k_kzz_basic_info_dataframe[] = "kzz_basic_info dataframe ";
static const char __pyx_k_saveHistTradeDayInfoSina[] = "saveHistTradeDayInfoSina";
static const char __pyx_k_stock_concept_basic_info[] = "stock_concept_basic_info";
static const char __pyx_k_stock_individual_info_em[] = "stock_individual_info_em";
static const char __pyx_k_stock_industry_trade_day[] = "stock_industry_trade_day";
static const char __pyx_k_stock_zh_a_hist_sina_bfq[] = "stock_zh_a_hist_sina_bfq";
static const char __pyx_k_stock_zh_a_hist_sina_hfq[] = "stock_zh_a_hist_sina_hfq";
static const char __pyx_k_stock_zh_a_hist_sina_qfq[] = "stock_zh_a_hist_sina_qfq";
static const char __pyx_k_table_has_been_updated_2[] = " table has been updated .";
static const char __pyx_k_DataToMysql_func_industry[] = "DataToMysql.func_industry";
static const char __pyx_k_query_history_k_data_plus[] = "query_history_k_data_plus";
static const char __pyx_k_stock_industry_basic_info[] = "stock_industry_basic_info";
static const char __pyx_k_stock_zh_a_gdhs_detail_em[] = "stock_zh_a_gdhs_detail_em";
static const char __pyx_k_updateKzzBasicInfoToMysql[] = "updateKzzBasicInfoToMysql";
static const char __pyx_k_updateSingleStockFqFactor[] = "updateSingleStockFqFactor";
static const char __pyx_k_DataToMysql_dumpJsonToFile[] = "DataToMysql.dumpJsonToFile";
static const char __pyx_k_getIndustryConceptConsText[] = "getIndustryConceptConsText";
static const char __pyx_k_updateIndexTradeDayToMysql[] = "updateIndexTradeDayToMysql";
static const char __pyx_k_updateSingleStockBasicInfo[] = "updateSingleStockBasicInfo";
static const char __pyx_k_updateStockFqFactorToMysql[] = "updateStockFqFactorToMysql";
static const char __pyx_k_update_concept_There_exist[] = "update_concept: There exist ";
static const char __pyx_k_industry_or_concept_cons_df[] = "industry_or_concept_cons_df";
static const char __pyx_k_industry_or_concept_name_df[] = "industry_or_concept_name_df";
static const char __pyx_k_stock_board_concept_cons_em[] = "stock_board_concept_cons_em";
static const char __pyx_k_stock_board_concept_hist_em[] = "stock_board_concept_hist_em";
static const char __pyx_k_stock_board_concept_name_em[] = "stock_board_concept_name_em";
static const char __pyx_k_stock_finance_mfd_report_em[] = "stock_finance_mfd_report_em";
static const char __pyx_k_stock_individual_info_em_df[] = "stock_individual_info_em_df";
static const char __pyx_k_updateFutureTradeDayToMysql[] = "updateFutureTradeDayToMysql";
static const char __pyx_k_updateSingleStockHoldNumber[] = "updateSingleStockHoldNumber";
static const char __pyx_k_updateStockBasicInfoToMysql[] = "updateStockBasicInfoToMysql";
static const char __pyx_k_updateStockFinancialToMysql[] = "updateStockFinancialToMysql";
static const char __pyx_k_updateStockTables_time_cost[] = "updateStockTables time cost = ";
static const char __pyx_k_dividend_data_failed_save_in[] = " dividend data failed save in ";
static const char __pyx_k_extractAdministrativeRegions[] = "extractAdministrativeRegions";
static const char __pyx_k_future_no_silent_downcasting[] = "future.no_silent_downcasting";
static const char __pyx_k_saveHistTradeDayInfoBaostock[] = "saveHistTradeDayInfoBaostock";
static const char __pyx_k_stock_board_industry_cons_em[] = "stock_board_industry_cons_em";
static const char __pyx_k_stock_board_industry_hist_em[] = "stock_board_industry_hist_em";
static const char __pyx_k_stock_board_industry_name_em[] = "stock_board_industry_name_em";
static const char __pyx_k_stock_finance_mfd_quarter_em[] = "stock_finance_mfd_quarter_em";
static const char __pyx_k_stock_industry_concept_basic[] = "stock_industry_concept_basic";
static const char __pyx_k_updateStockHoldNumberToMysql[] = "updateStockHoldNumberToMysql";
static const char __pyx_k_updateStockSimpleInfoToMysql[] = "updateStockSimpleInfoToMysql";
static const char __pyx_k_financial_data_failed_save_in[] = " financial data failed save in ";
static const char __pyx_k_trade_day_data_failed_save_in[] = " trade day data failed save in ";
static const char __pyx_k_updateRzrqHsgtTradeDayToMysql[] = "updateRzrqHsgtTradeDayToMysql";
static const char __pyx_k_updateSingleIndexTradeDayInfo[] = "updateSingleIndexTradeDayInfo";
static const char __pyx_k_updateSingleStockDividendInfo[] = "updateSingleStockDividendInfo";
static const char __pyx_k_updateSingleStockRzrqHsgtData[] = "updateSingleStockRzrqHsgtData";
static const char __pyx_k_updateSingleStockTradeDayInfo[] = "updateSingleStockTradeDayInfo";
static const char __pyx_k_DataToMysql_getSuspendedStocks[] = "DataToMysql.getSuspendedStocks";
static const char __pyx_k_DataToMysql_updateStrategyDict[] = "DataToMysql.updateStrategyDict";
static const char __pyx_k_industry_or_concept_hist_em_df[] = "industry_or_concept_hist_em_df";
static const char __pyx_k_row_qfq_factor_equal_zero_when[] = " row_qfq_factor equal zero when date = ";
static const char __pyx_k_so_execute_delete_its_all_data[] = ", so execute delete its all data.";
static const char __pyx_k_stock_zh_a_hist_sina_fq_factor[] = "stock_zh_a_hist_sina_fq_factor";
static const char __pyx_k_tbstock_dataAcquisition_models[] = "tbstock.dataAcquisition.models";
static const char __pyx_k_updateSingleFutureTradeDayInfo[] = "updateSingleFutureTradeDayInfo";
static const char __pyx_k_updateSingleStockFinancialData[] = "updateSingleStockFinancialData";
static const char __pyx_k_updateStockDividendInfoToMysql[] = "updateStockDividendInfoToMysql";
static const char __pyx_k_Failed_to_call_ak_stock_board_c[] = ": Failed to call ak.stock_board_cons_em for name = ";
static const char __pyx_k_Failed_to_call_ak_stock_board_h[] = ": Failed to call ak.stock_board_hist_em for name = ";
static const char __pyx_k_Failed_to_call_bs_query_history[] = "Failed to call bs.query_history_k_data_plus for stock_code = ";
static const char __pyx_k_Failed_to_call_stock_finance_mf[] = ": Failed to call stock_finance_mfd_em for code = ";
static const char __pyx_k_Need_update_stock_concept_basic[] = "Need update stock_concept_basic_info first.";
static const char __pyx_k_data_has_not_update_from_networ[] = ", data has not update from network.";
static const char __pyx_k_failed_to_save_in_tables_err_is[] = " failed to save in tables, err is ";
static const char __pyx_k_sdc_stock_fhps_detail_em_return[] = "sdc.stock_fhps_detail_em return empty for code = ";
static const char __pyx_k_table_code_name_first_date_prov[] = " table code, name, first_date, province, main_business, key_products columns has been updated.";
static const char __pyx_k_table_has_been_updated_by_updat[] = " table has been updated by update_industry.";
static const char __pyx_k_table_industry_concept_is_margi[] = " table industry, concept, is_margin, is_hsgt columns has been updated.";
static const char __pyx_k_trade_data_failed_to_save_in_ta[] = " trade data failed to save in tables, err is ";
static const char __pyx_k_Call_ak_stock_zh_a_daily_datafra[] = "Call ak.stock_zh_a_daily dataframe is empty for stock_code = ";
static const char __pyx_k_Call_bs_query_history_k_data_plu[] = "Call bs.query_history_k_data_plus dataframe is empty for stock_code = ";
static const char __pyx_k_DataFrame_result_day_data_is_emp[] = "DataFrame result_day_data is empty for stock_code = ";
static const char __pyx_k_DataToMysql_fixTradeDayNullValue[] = "DataToMysql.fixTradeDayNullValue";
static const char __pyx_k_DataToMysql_getFqFactorByDividen[] = "DataToMysql.getFqFactorByDividend";
static const char __pyx_k_DataToMysql_saveHistTradeDayInfo[] = "DataToMysql.saveHistTradeDayInfoSina";
static const char __pyx_k_DataToMysql_updateFutureTradeDay[] = "DataToMysql.updateFutureTradeDayToMysql.<locals>.updateSingleFutureTradeDayInfo";
static const char __pyx_k_DataToMysql_updateIndexTradeDayT[] = "DataToMysql.updateIndexTradeDayToMysql.<locals>.updateSingleIndexTradeDayInfo";
static const char __pyx_k_DataToMysql_updateKzzBasicInfoTo[] = "DataToMysql.updateKzzBasicInfoToMysql";
static const char __pyx_k_DataToMysql_updateRzrqHsgtTradeD[] = "DataToMysql.updateRzrqHsgtTradeDayToMysql";
static const char __pyx_k_DataToMysql_updateSingleStockDiv[] = "DataToMysql.updateSingleStockDividendInfo";
static const char __pyx_k_DataToMysql_updateSingleStockFqF[] = "DataToMysql.updateSingleStockFqFactor";
static const char __pyx_k_DataToMysql_updateStockBasicInfo[] = "DataToMysql.updateStockBasicInfoToMysql.<locals>.updateSingleStockBasicInfo";
static const char __pyx_k_DataToMysql_updateStockConceptIn[] = "DataToMysql.updateStockConceptInfo";
static const char __pyx_k_DataToMysql_updateStockDividendI[] = "DataToMysql.updateStockDividendInfoToMysql";
static const char __pyx_k_DataToMysql_updateStockFinancial[] = "DataToMysql.updateStockFinancialToMysql.<locals>.updateSingleStockFinancialData";
static const char __pyx_k_DataToMysql_updateStockFqFactorT[] = "DataToMysql.updateStockFqFactorToMysql";
static const char __pyx_k_DataToMysql_updateStockHoldNumbe[] = "DataToMysql.updateStockHoldNumberToMysql.<locals>.updateSingleStockHoldNumber";
static const char __pyx_k_DataToMysql_updateStockIndustryC[] = "DataToMysql.updateStockIndustryConceptBasicInfo.<locals>.getIndustryConceptConsText";
static const char __pyx_k_DataToMysql_updateStockIndustryI[] = "DataToMysql.updateStockIndustryInfo";
static const char __pyx_k_DataToMysql_updateStockRzrqHsgtT[] = "DataToMysql.updateStockRzrqHsgtTradeDayToMysql.<locals>.updateSingleStockRzrqHsgtData";
static const char __pyx_k_DataToMysql_updateStockSimpleInf[] = "DataToMysql.updateStockSimpleInfoToMysql";
static const char __pyx_k_DataToMysql_updateStockTradeDayI[] = "DataToMysql.updateStockTradeDayInfo.<locals>.updateSingleStockTradeDayInfo";
static const char __pyx_k_Failed_to_call_ak_futures_main_s[] = "Failed to call ak.futures_main_sina for name = ";
static const char __pyx_k_Failed_to_call_ak_stock_info_a_c[] = "Failed to call ak.stock_info_a_code_name: ";
static const char __pyx_k_Failed_to_call_ak_stock_zh_a_dai[] = "Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = ";
static const char __pyx_k_Failed_to_call_ak_stock_zh_a_his[] = "Failed to call ak.stock_zh_a_hist for stock_code = ";
static const char __pyx_k_Failed_to_call_sdc_stock_zh_inde[] = "Failed to call sdc.stock_zh_index_daily_em for name = ";
static const char __pyx_k_Failed_to_call_stock_finance_mfd[] = "Failed to call stock_finance_mfd_em for code = ";
static const char __pyx_k_Failed_to_call_stock_zh_a_gdhs_d[] = "Failed to call stock_zh_a_gdhs_detail_em for code = ";
static const char __pyx_k_Failed_to_updateSingleStockBasic[] = "Failed to updateSingleStockBasicInfo for stock_code = ";
static const char __pyx_k_Need_update_stock_industry_basic[] = "Need update stock_industry_basic_info first.";
static const char __pyx_k_Need_update_stock_simple_info_fi[] = "Need update stock_simple_info firstly.";
static const char __pyx_k_Succeed_to_call_getFqFactorByDiv[] = "Succeed to call getFqFactorByDividend and save to database for stock_code = ";
static const char __pyx_k_There_is_not_new_stocks_to_updat[] = "There is not new stocks to update ";
static const char __pyx_k_ak_stock_zh_a_gdhs_detail_em_ret[] = "ak.stock_zh_a_gdhs_detail_em return empty for code = ";
static const char __pyx_k_baostock_login_respond_error_cod[] = "baostock: login respond error_code:";
static const char __pyx_k_baostock_login_respond_error_msg[] = "baostock: login respond  error_msg:";
static const char __pyx_k_date_code_open_high_low_close_pr[] = "date,code,open,high,low,close,preclose,volume,amount,adjustflag,turn,tradestatus,pctChg,isST";
static const char __pyx_k_getSingleIndustryConceptTradeDay[] = "getSingleIndustryConceptTradeDayInfo";
static const char __pyx_k_null_value_row_id_d_row_date_s_r[] = "null value: row_id=%d, row_date=%s, row_code=%s";
static const char __pyx_k_stock_industry_concept_basic_inf[] = "stock_industry_concept_basic_info";
static const char __pyx_k_tbstock_dataAcquisition_saveData[] = "tbstock/dataAcquisition/saveDataToMysql.py";
static const char __pyx_k_tbstock_dataAcquisition_stockDat[] = "tbstock.dataAcquisition.stockDataCrawler";
static const char __pyx_k_tbstock_dataManagement_dataPrepr[] = "tbstock.dataManagement.dataPreprocess";
static const char __pyx_k_updateStockBasicInfoByIndustryCo[] = "updateStockBasicInfoByIndustryConcept";
static const char __pyx_k_updateStockIndustryConceptBasicI[] = "updateStockIndustryConceptBasicInfo";
static const char __pyx_k_updateStockIndustryConceptTradeD[] = "updateStockIndustryConceptTradeDayInfo";
static const char __pyx_k_updateStockRzrqHsgtTradeDayToMys[] = "updateStockRzrqHsgtTradeDayToMysql";
static const char __pyx_k_table_has_been_updated_by_updat_2[] = " table has been updated by update_concept.";
static const char __pyx_k_DataToMysql_saveHistTradeDayInfo_2[] = "DataToMysql.saveHistTradeDayInfoBaostock";
static const char __pyx_k_DataToMysql_saveHistTradeDayInfo_3[] = "DataToMysql.saveHistTradeDayInfoEm";
static const char __pyx_k_DataToMysql_updateFutureTradeDay_2[] = "DataToMysql.updateFutureTradeDayToMysql";
static const char __pyx_k_DataToMysql_updateIndexTradeDayT_2[] = "DataToMysql.updateIndexTradeDayToMysql";
static const char __pyx_k_DataToMysql_updateStockBasicInfo_2[] = "DataToMysql.updateStockBasicInfoByIndustryConcept";
static const char __pyx_k_DataToMysql_updateStockBasicInfo_3[] = "DataToMysql.updateStockBasicInfoToMysql";
static const char __pyx_k_DataToMysql_updateStockFinancial_2[] = "DataToMysql.updateStockFinancialToMysql";
static const char __pyx_k_DataToMysql_updateStockHoldNumbe_2[] = "DataToMysql.updateStockHoldNumberToMysql";
static const char __pyx_k_DataToMysql_updateStockIndustryC_2[] = "DataToMysql.updateStockIndustryConceptTradeDayInfo.<locals>.<lambda>";
static const char __pyx_k_DataToMysql_updateStockIndustryC_3[] = "DataToMysql.updateStockIndustryConceptTradeDayInfo.<locals>.getSingleIndustryConceptTradeDayInfo";
static const char __pyx_k_DataToMysql_updateStockIndustryC_4[] = "DataToMysql.updateStockIndustryConceptBasicInfo";
static const char __pyx_k_DataToMysql_updateStockIndustryC_5[] = "DataToMysql.updateStockIndustryConceptTradeDayInfo";
static const char __pyx_k_DataToMysql_updateStockRzrqHsgtT_2[] = "DataToMysql.updateStockRzrqHsgtTradeDayToMysql";
static const char __pyx_k_DataToMysql_updateStockTradeDayI_2[] = "DataToMysql.updateStockTradeDayInfo";
static const char __pyx_k_Failed_to_call_ak_stock_zh_a_dai_2[] = "Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = ";
static const char __pyx_k_Failed_to_call_ak_stock_zh_a_dai_3[] = "Failed to call ak.stock_zh_a_daily for stock_code = ";
static const char __pyx_k_Failed_to_call_ak_stock_zh_a_dai_4[] = "Failed to call ak.stock_zh_a_daily: ";
static const char __pyx_k_tbstock_dataAcquisition_saveData_2[] = "tbstock.dataAcquisition.saveDataToMysql";
/* #### Code section: decls ### */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dump_json_period); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_2dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_4updateKzzBasicInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_6updateStockSimpleInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_8func_industry(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_industry_name, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_10func_concept(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_concept_name, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_12updateStockBasicInfoByIndustryConcept(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_updateSingleStockBasicInfo(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_14updateStockBasicInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_16getFqFactorByDividend(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_18updateStockFqFactorToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_20updateSingleStockFqFactor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_simple_code, PyObject *__pyx_v_dtype_mapping, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_22updateStockDividendInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_24updateSingleStockDividendInfo(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_dtype_mapping, PyObject *__pyx_v_multi_type); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateStrategyDict(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_succeed, PyObject *__pyx_v_stock_item, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28getSuspendedStocks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_30saveHistTradeDayInfoSina(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_pre_close_first); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_32saveHistTradeDayInfoBaostock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, CYTHON_UNUSED PyObject *__pyx_v_pre_close_first); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34saveHistTradeDayInfoEm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_pre_close_first, PyObject *__pyx_v_period); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_updateSingleStockTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_code_str, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_36updateStockTradeDayInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38fixTradeDayNullValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_getIndustryConceptConsText(PyObject *__pyx_self, PyObject *__pyx_v_stock_industry_concept_basic, PyObject *__pyx_v_i); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_40updateStockIndustryConceptBasicInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_getSingleIndustryConceptTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_code, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_42updateStockIndustryConceptTradeDayInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_44updateStockIndustryInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_46updateStockConceptInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_updateSingleStockFinancialData(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_48updateStockFinancialToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_updateSingleStockHoldNumber(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_50updateStockHoldNumberToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_52updateRzrqHsgtTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_updateSingleStockRzrqHsgtData(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_54updateStockRzrqHsgtTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_updateSingleIndexTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_index_code, PyObject *__pyx_v_index_name, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_56updateIndexTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_updateSingleFutureTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_future_code, PyObject *__pyx_v_future_name, PyObject *__pyx_v_update_dict); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_58updateFutureTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_tableTools(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_2test(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_4updateStockTables(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, 0, 0, 0, 0};
static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_values = {0, 0, 0, 0, 0};
/* #### Code section: late_includes ### */
/* #### Code section: module_state ### */
typedef struct {
  PyObject *__pyx_d;
  PyObject *__pyx_b;
  PyObject *__pyx_cython_runtime;
  PyObject *__pyx_empty_tuple;
  PyObject *__pyx_empty_bytes;
  PyObject *__pyx_empty_unicode;
  #ifdef __Pyx_CyFunction_USED
  PyTypeObject *__pyx_CyFunctionType;
  #endif
  #ifdef __Pyx_FusedFunction_USED
  PyTypeObject *__pyx_FusedFunctionType;
  #endif
  #ifdef __Pyx_Generator_USED
  PyTypeObject *__pyx_GeneratorType;
  #endif
  #ifdef __Pyx_IterableCoroutine_USED
  PyTypeObject *__pyx_IterableCoroutineType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineAwaitType;
  #endif
  #ifdef __Pyx_Coroutine_USED
  PyTypeObject *__pyx_CoroutineType;
  #endif
  #if CYTHON_USE_MODULE_STATE
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql;
  PyObject *__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql;
  #endif
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql;
  PyTypeObject *__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql;
  PyObject *__pyx_kp_s_;
  PyObject *__pyx_kp_s_0;
  PyObject *__pyx_kp_s_20180101;
  PyObject *__pyx_kp_s_20240503;
  PyObject *__pyx_kp_s_20240530;
  PyObject *__pyx_kp_s_20241230;
  PyObject *__pyx_kp_s_3;
  PyObject *__pyx_kp_s_300416;
  PyObject *__pyx_kp_s_600096;
  PyObject *__pyx_kp_s_689009;
  PyObject *__pyx_n_s_A;
  PyObject *__pyx_n_s_B;
  PyObject *__pyx_kp_u_Beginning;
  PyObject *__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra;
  PyObject *__pyx_kp_u_Call_bs_query_history_k_data_plu;
  PyObject *__pyx_n_s_DataFrame;
  PyObject *__pyx_kp_u_DataFrame_result_day_data_is_emp;
  PyObject *__pyx_kp_s_DataToMysql;
  PyObject *__pyx_n_s_DataToMysql_2;
  PyObject *__pyx_n_s_DataToMysql___init;
  PyObject *__pyx_n_s_DataToMysql_dumpJsonToFile;
  PyObject *__pyx_n_s_DataToMysql_fixTradeDayNullValue;
  PyObject *__pyx_n_s_DataToMysql_func_concept;
  PyObject *__pyx_n_s_DataToMysql_func_industry;
  PyObject *__pyx_n_s_DataToMysql_getFqFactorByDividen;
  PyObject *__pyx_n_s_DataToMysql_getSuspendedStocks;
  PyObject *__pyx_n_s_DataToMysql_saveHistTradeDayInfo;
  PyObject *__pyx_n_s_DataToMysql_saveHistTradeDayInfo_2;
  PyObject *__pyx_n_s_DataToMysql_saveHistTradeDayInfo_3;
  PyObject *__pyx_n_s_DataToMysql_updateFutureTradeDay;
  PyObject *__pyx_n_s_DataToMysql_updateFutureTradeDay_2;
  PyObject *__pyx_n_s_DataToMysql_updateIndexTradeDayT;
  PyObject *__pyx_n_s_DataToMysql_updateIndexTradeDayT_2;
  PyObject *__pyx_n_s_DataToMysql_updateKzzBasicInfoTo;
  PyObject *__pyx_n_s_DataToMysql_updateRzrqHsgtTradeD;
  PyObject *__pyx_n_s_DataToMysql_updateSingleStockDiv;
  PyObject *__pyx_n_s_DataToMysql_updateSingleStockFqF;
  PyObject *__pyx_n_s_DataToMysql_updateStockBasicInfo;
  PyObject *__pyx_n_s_DataToMysql_updateStockBasicInfo_2;
  PyObject *__pyx_n_s_DataToMysql_updateStockBasicInfo_3;
  PyObject *__pyx_n_s_DataToMysql_updateStockConceptIn;
  PyObject *__pyx_n_s_DataToMysql_updateStockDividendI;
  PyObject *__pyx_n_s_DataToMysql_updateStockFinancial;
  PyObject *__pyx_n_s_DataToMysql_updateStockFinancial_2;
  PyObject *__pyx_n_s_DataToMysql_updateStockFqFactorT;
  PyObject *__pyx_n_s_DataToMysql_updateStockHoldNumbe;
  PyObject *__pyx_n_s_DataToMysql_updateStockHoldNumbe_2;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryC;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryC_2;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryC_3;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryC_4;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryC_5;
  PyObject *__pyx_n_s_DataToMysql_updateStockIndustryI;
  PyObject *__pyx_n_s_DataToMysql_updateStockRzrqHsgtT;
  PyObject *__pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2;
  PyObject *__pyx_n_s_DataToMysql_updateStockSimpleInf;
  PyObject *__pyx_n_s_DataToMysql_updateStockTradeDayI;
  PyObject *__pyx_n_s_DataToMysql_updateStockTradeDayI_2;
  PyObject *__pyx_n_s_DataToMysql_updateStrategyDict;
  PyObject *__pyx_kp_u_Data_failed_save_in;
  PyObject *__pyx_kp_u_Don_t_need_to_update;
  PyObject *__pyx_kp_u_Failed_date_is;
  PyObject *__pyx_kp_u_Failed_to_call_ak_futures_main_s;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_board_c;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_board_h;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_info_a_c;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4;
  PyObject *__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his;
  PyObject *__pyx_kp_u_Failed_to_call_bs_query_history;
  PyObject *__pyx_kp_u_Failed_to_call_sdc;
  PyObject *__pyx_kp_u_Failed_to_call_sdc_stock;
  PyObject *__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde;
  PyObject *__pyx_kp_u_Failed_to_call_stock_finance_mf;
  PyObject *__pyx_kp_u_Failed_to_call_stock_finance_mfd;
  PyObject *__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d;
  PyObject *__pyx_kp_u_Failed_to_updateSingleStockBasic;
  PyObject *__pyx_kp_u_Failed_update;
  PyObject *__pyx_kp_u_Fq_factor_of;
  PyObject *__pyx_n_s_JR0;
  PyObject *__pyx_n_s_LR0;
  PyObject *__pyx_n_s_NaT;
  PyObject *__pyx_kp_u_Need_update_stock_concept_basic;
  PyObject *__pyx_kp_u_Need_update_stock_industry_basic;
  PyObject *__pyx_kp_u_Need_update_stock_simple_info_fi;
  PyObject *__pyx_n_s_ProcessPoolExecutor;
  PyObject *__pyx_n_s_RI0;
  PyObject *__pyx_kp_u_StockTradeDayInfo_of;
  PyObject *__pyx_kp_u_Succeed_save_in;
  PyObject *__pyx_kp_u_Succeed_to_call_getFqFactorByDiv;
  PyObject *__pyx_kp_u_Succeed_update;
  PyObject *__pyx_kp_u_The;
  PyObject *__pyx_kp_u_There_is_not_new_stocks_to_updat;
  PyObject *__pyx_n_s_ThreadPoolExecutor;
  PyObject *__pyx_kp_u_TradeDayInfo_of;
  PyObject *__pyx_kp_u_TradeDayInfo_of_2;
  PyObject *__pyx_n_s_ValueError;
  PyObject *__pyx_n_s_WH0;
  PyObject *__pyx_kp_s_XX;
  PyObject *__pyx_kp_s_Y_m_d;
  PyObject *__pyx_kp_s__10;
  PyObject *__pyx_kp_s__11;
  PyObject *__pyx_kp_s__13;
  PyObject *__pyx_kp_s__15;
  PyObject *__pyx_kp_s__17;
  PyObject *__pyx_n_s__177;
  PyObject *__pyx_kp_s__18;
  PyObject *__pyx_kp_s__19;
  PyObject *__pyx_kp_s__2;
  PyObject *__pyx_kp_s__21;
  PyObject *__pyx_kp_u__21;
  PyObject *__pyx_kp_u__22;
  PyObject *__pyx_kp_s__3;
  PyObject *__pyx_kp_s__30;
  PyObject *__pyx_kp_s__31;
  PyObject *__pyx_kp_s__32;
  PyObject *__pyx_kp_s__33;
  PyObject *__pyx_kp_s__35;
  PyObject *__pyx_kp_s__36;
  PyObject *__pyx_kp_s__39;
  PyObject *__pyx_kp_s__4;
  PyObject *__pyx_kp_s__42;
  PyObject *__pyx_kp_s__44;
  PyObject *__pyx_kp_s__45;
  PyObject *__pyx_kp_s__46;
  PyObject *__pyx_kp_s__47;
  PyObject *__pyx_kp_s__48;
  PyObject *__pyx_kp_s__49;
  PyObject *__pyx_kp_u__5;
  PyObject *__pyx_kp_s__50;
  PyObject *__pyx_kp_s__51;
  PyObject *__pyx_kp_s__54;
  PyObject *__pyx_kp_s__60;
  PyObject *__pyx_kp_s__61;
  PyObject *__pyx_kp_s__62;
  PyObject *__pyx_kp_s__63;
  PyObject *__pyx_kp_s__64;
  PyObject *__pyx_kp_s__65;
  PyObject *__pyx_kp_s__66;
  PyObject *__pyx_n_s__67;
  PyObject *__pyx_kp_s__71;
  PyObject *__pyx_kp_s__72;
  PyObject *__pyx_kp_s__76;
  PyObject *__pyx_kp_s__8;
  PyObject *__pyx_kp_s__87;
  PyObject *__pyx_kp_s__88;
  PyObject *__pyx_kp_s__89;
  PyObject *__pyx_kp_s__9;
  PyObject *__pyx_kp_s__90;
  PyObject *__pyx_kp_s__91;
  PyObject *__pyx_n_s__94;
  PyObject *__pyx_n_s_adjust;
  PyObject *__pyx_n_s_adjustflag;
  PyObject *__pyx_n_s_ak;
  PyObject *__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret;
  PyObject *__pyx_n_s_akshare;
  PyObject *__pyx_kp_u_akshare_version;
  PyObject *__pyx_n_s_all;
  PyObject *__pyx_n_s_all_stock_list;
  PyObject *__pyx_n_s_all_stock_simple_info;
  PyObject *__pyx_n_s_all_succeed;
  PyObject *__pyx_n_s_amount;
  PyObject *__pyx_n_s_api;
  PyObject *__pyx_n_s_append;
  PyObject *__pyx_n_s_apply;
  PyObject *__pyx_n_s_as_completed;
  PyObject *__pyx_n_s_ascending;
  PyObject *__pyx_n_s_asyncio_coroutines;
  PyObject *__pyx_n_s_axis;
  PyObject *__pyx_n_s_baostock;
  PyObject *__pyx_kp_s_baostock_login_respond_error_cod;
  PyObject *__pyx_kp_s_baostock_login_respond_error_msg;
  PyObject *__pyx_kp_u_baostock_version;
  PyObject *__pyx_n_s_basic_info_df;
  PyObject *__pyx_n_s_basic_info_table_name;
  PyObject *__pyx_n_s_bool;
  PyObject *__pyx_kp_s_bool_str;
  PyObject *__pyx_n_s_bs;
  PyObject *__pyx_n_s_by;
  PyObject *__pyx_n_s_capital_reserve_ps;
  PyObject *__pyx_n_s_cash_dividend_ps;
  PyObject *__pyx_n_s_cash_dividends;
  PyObject *__pyx_n_s_check_serializability;
  PyObject *__pyx_n_s_class_getitem;
  PyObject *__pyx_n_s_clearTableContent;
  PyObject *__pyx_n_s_clearTableContentByCode;
  PyObject *__pyx_n_s_cline_in_traceback;
  PyObject *__pyx_n_s_close;
  PyObject *__pyx_n_s_co_name;
  PyObject *__pyx_n_s_cocept_name;
  PyObject *__pyx_n_s_code;
  PyObject *__pyx_kp_u_code_2;
  PyObject *__pyx_kp_u_code_is;
  PyObject *__pyx_n_s_code_str;
  PyObject *__pyx_n_s_coerce;
  PyObject *__pyx_n_s_cols;
  PyObject *__pyx_n_s_cols_to_convert;
  PyObject *__pyx_n_s_columns;
  PyObject *__pyx_n_s_combined_codes;
  PyObject *__pyx_n_s_commit;
  PyObject *__pyx_n_s_con;
  PyObject *__pyx_n_s_concat;
  PyObject *__pyx_n_s_concept;
  PyObject *__pyx_n_s_concept_cons_stocks;
  PyObject *__pyx_n_s_concept_history_df;
  PyObject *__pyx_n_s_concept_name;
  PyObject *__pyx_n_s_concept_trade_data_df;
  PyObject *__pyx_n_s_concurrent_futures;
  PyObject *__pyx_n_s_cons_stocks;
  PyObject *__pyx_n_s_copy;
  PyObject *__pyx_n_s_create_engine_session;
  PyObject *__pyx_n_s_cumprod;
  PyObject *__pyx_n_s_current_time;
  PyObject *__pyx_n_s_d;
  PyObject *__pyx_n_s_daily;
  PyObject *__pyx_n_s_data;
  PyObject *__pyx_n_s_dataAcquisition;
  PyObject *__pyx_n_s_dataManagement;
  PyObject *__pyx_n_s_dataPreprocess;
  PyObject *__pyx_n_s_data_dict;
  PyObject *__pyx_kp_u_data_has_not_update_from_networ;
  PyObject *__pyx_kp_u_data_is_wrong_in;
  PyObject *__pyx_n_s_data_list;
  PyObject *__pyx_n_s_data_to_mysql;
  PyObject *__pyx_kp_u_data_wrong_in;
  PyObject *__pyx_n_s_dataproc;
  PyObject *__pyx_n_s_date;
  PyObject *__pyx_kp_s_date_code_open_high_low_close_pr;
  PyObject *__pyx_n_s_date_data_type;
  PyObject *__pyx_n_s_datetime;
  PyObject *__pyx_n_s_default_date;
  PyObject *__pyx_n_s_delete;
  PyObject *__pyx_n_s_delist_stock_df;
  PyObject *__pyx_n_s_desc;
  PyObject *__pyx_n_s_desc_name;
  PyObject *__pyx_kp_u_detail_for_code;
  PyObject *__pyx_n_s_dict;
  PyObject *__pyx_n_s_dict_2;
  PyObject *__pyx_n_s_diff_code;
  PyObject *__pyx_n_s_disable;
  PyObject *__pyx_kp_u_disable;
  PyObject *__pyx_n_s_dispose;
  PyObject *__pyx_kp_u_dividend_data_failed_save_in;
  PyObject *__pyx_n_s_dividend_df;
  PyObject *__pyx_n_s_dividend_table;
  PyObject *__pyx_n_s_dividend_text;
  PyObject *__pyx_n_s_dividend_yield;
  PyObject *__pyx_n_s_doc;
  PyObject *__pyx_kp_u_dont_need_to_update;
  PyObject *__pyx_kp_u_dont_need_to_update_2;
  PyObject *__pyx_n_s_drop;
  PyObject *__pyx_n_s_dt;
  PyObject *__pyx_n_s_dtype;
  PyObject *__pyx_n_s_dtype_mapping;
  PyObject *__pyx_n_s_dumpJsonToFile;
  PyObject *__pyx_n_s_dump_json_period;
  PyObject *__pyx_n_s_e;
  PyObject *__pyx_n_s_em;
  PyObject *__pyx_n_s_empty;
  PyObject *__pyx_kp_u_enable;
  PyObject *__pyx_n_s_end;
  PyObject *__pyx_n_s_end_date;
  PyObject *__pyx_n_s_end_time;
  PyObject *__pyx_n_s_engine;
  PyObject *__pyx_n_s_enter;
  PyObject *__pyx_n_s_eps;
  PyObject *__pyx_kp_u_err_is;
  PyObject *__pyx_n_s_error;
  PyObject *__pyx_kp_u_error_2;
  PyObject *__pyx_n_s_error_code;
  PyObject *__pyx_n_s_error_msg;
  PyObject *__pyx_n_s_errors;
  PyObject *__pyx_n_s_ex_date;
  PyObject *__pyx_n_s_exclude_future_dict;
  PyObject *__pyx_n_s_exclude_future_list;
  PyObject *__pyx_n_s_executor;
  PyObject *__pyx_n_s_exit;
  PyObject *__pyx_n_s_extractAdministrativeRegions;
  PyObject *__pyx_n_s_f_code;
  PyObject *__pyx_n_s_failed_list;
  PyObject *__pyx_kp_u_failed_to_save_in_tables_err_is;
  PyObject *__pyx_n_s_fhsz_em;
  PyObject *__pyx_n_s_fields;
  PyObject *__pyx_n_s_fillna;
  PyObject *__pyx_n_s_filter;
  PyObject *__pyx_n_s_filter_by;
  PyObject *__pyx_kp_u_financial_data_failed_save_in;
  PyObject *__pyx_kp_u_finished;
  PyObject *__pyx_n_s_first;
  PyObject *__pyx_n_s_first_date;
  PyObject *__pyx_n_s_fixTradeDayNullValue;
  PyObject *__pyx_kp_u_for_code;
  PyObject *__pyx_n_s_fq_factor_df;
  PyObject *__pyx_n_s_fq_factor_origin;
  PyObject *__pyx_n_s_fq_row_date;
  PyObject *__pyx_n_s_fq_row_date_str;
  PyObject *__pyx_n_s_frequency;
  PyObject *__pyx_n_s_fun_name;
  PyObject *__pyx_n_s_func;
  PyObject *__pyx_n_s_func_concept;
  PyObject *__pyx_n_s_func_index;
  PyObject *__pyx_n_s_func_industry;
  PyObject *__pyx_n_s_future;
  PyObject *__pyx_kp_s_futureCodeNames_csv;
  PyObject *__pyx_n_s_future_code;
  PyObject *__pyx_n_s_future_code_name_df;
  PyObject *__pyx_n_s_future_name;
  PyObject *__pyx_kp_s_future_no_silent_downcasting;
  PyObject *__pyx_n_s_future_trade_data_df;
  PyObject *__pyx_n_s_future_trade_day;
  PyObject *__pyx_n_s_futures;
  PyObject *__pyx_n_s_futures_main_sina;
  PyObject *__pyx_kp_u_gc;
  PyObject *__pyx_n_s_getConceptStockCodes;
  PyObject *__pyx_n_s_getFqFactorByDividend;
  PyObject *__pyx_n_s_getFullStockCode;
  PyObject *__pyx_n_s_getIndexCodeName;
  PyObject *__pyx_n_s_getIndustryConceptConsText;
  PyObject *__pyx_n_s_getSingleIndustryConceptTradeDay;
  PyObject *__pyx_n_s_getStockFqfactorInfo;
  PyObject *__pyx_n_s_getStockSimpleInfo;
  PyObject *__pyx_n_s_getSuspendedStocks;
  PyObject *__pyx_n_s_get_row_data;
  PyObject *__pyx_n_s_get_table_columns;
  PyObject *__pyx_n_s_getframe;
  PyObject *__pyx_n_s_has_update_file;
  PyObject *__pyx_kp_u_has_updated;
  PyObject *__pyx_n_s_hfq_factor;
  PyObject *__pyx_kp_s_hfq_factor_2;
  PyObject *__pyx_n_s_high;
  PyObject *__pyx_kp_u_history;
  PyObject *__pyx_n_s_how;
  PyObject *__pyx_n_s_hsgt_history;
  PyObject *__pyx_n_s_hsgt_trade_day;
  PyObject *__pyx_n_s_i;
  PyObject *__pyx_n_s_id;
  PyObject *__pyx_n_s_if_exists;
  PyObject *__pyx_n_s_ignore_index;
  PyObject *__pyx_n_s_iloc;
  PyObject *__pyx_n_s_import;
  PyObject *__pyx_n_s_index;
  PyObject *__pyx_n_s_index_code;
  PyObject *__pyx_n_s_index_code_name_dict;
  PyObject *__pyx_n_s_index_name;
  PyObject *__pyx_n_s_index_trade_data_df;
  PyObject *__pyx_n_s_index_trade_day;
  PyObject *__pyx_n_s_industry;
  PyObject *__pyx_n_s_industry_cons_stocks;
  PyObject *__pyx_n_s_industry_name;
  PyObject *__pyx_n_s_industry_or_concept_cons_df;
  PyObject *__pyx_n_s_industry_or_concept_hist_em_df;
  PyObject *__pyx_n_s_industry_or_concept_name_df;
  PyObject *__pyx_n_s_inf;
  PyObject *__pyx_n_s_info;
  PyObject *__pyx_n_s_init;
  PyObject *__pyx_n_s_init_subclass;
  PyObject *__pyx_n_s_initializing;
  PyObject *__pyx_n_s_inner;
  PyObject *__pyx_n_s_inplace;
  PyObject *__pyx_n_s_insert;
  PyObject *__pyx_n_s_ipo_time;
  PyObject *__pyx_n_s_is;
  PyObject *__pyx_n_s_isAPrimaryBoardStock;
  PyObject *__pyx_kp_u_is_Empty;
  PyObject *__pyx_n_s_is_coroutine;
  PyObject *__pyx_n_s_is_datetime;
  PyObject *__pyx_n_s_is_datetime64_any_dtype;
  PyObject *__pyx_n_s_is_delist;
  PyObject *__pyx_n_s_is_hsgt;
  PyObject *__pyx_n_s_is_margin;
  PyObject *__pyx_kp_u_is_new;
  PyObject *__pyx_n_s_is_null_ex_data_em;
  PyObject *__pyx_n_s_is_null_ex_data_table;
  PyObject *__pyx_n_s_is_primary;
  PyObject *__pyx_n_s_is_session;
  PyObject *__pyx_kp_u_isenabled;
  PyObject *__pyx_n_s_isin;
  PyObject *__pyx_n_s_isna;
  PyObject *__pyx_kp_u_it_has_been_suspended;
  PyObject *__pyx_n_s_item;
  PyObject *__pyx_n_s_items;
  PyObject *__pyx_n_s_iterrows;
  PyObject *__pyx_n_s_join;
  PyObject *__pyx_n_s_json_file_name;
  PyObject *__pyx_kp_s_k;
  PyObject *__pyx_n_s_key;
  PyObject *__pyx_n_s_key_products;
  PyObject *__pyx_n_s_keys;
  PyObject *__pyx_n_s_kzz_basic_info;
  PyObject *__pyx_kp_u_kzz_basic_info_dataframe;
  PyObject *__pyx_n_s_kzz_basic_info_em;
  PyObject *__pyx_n_s_latest_trade_day;
  PyObject *__pyx_n_s_lg;
  PyObject *__pyx_n_s_list;
  PyObject *__pyx_n_s_loadJsonData;
  PyObject *__pyx_n_s_loadTable;
  PyObject *__pyx_n_s_loadTableContentByCode;
  PyObject *__pyx_n_s_load_json_file;
  PyObject *__pyx_n_s_loc;
  PyObject *__pyx_n_s_local_engine;
  PyObject *__pyx_n_s_local_session;
  PyObject *__pyx_n_s_logger;
  PyObject *__pyx_n_s_login;
  PyObject *__pyx_n_s_logout;
  PyObject *__pyx_n_s_low;
  PyObject *__pyx_n_s_main;
  PyObject *__pyx_n_s_main_business;
  PyObject *__pyx_n_s_main_fina_data_df;
  PyObject *__pyx_n_s_match_index;
  PyObject *__pyx_n_s_max;
  PyObject *__pyx_n_s_max_date;
  PyObject *__pyx_n_s_max_date_em;
  PyObject *__pyx_n_s_max_date_row;
  PyObject *__pyx_n_s_max_date_row_table;
  PyObject *__pyx_n_s_max_date_table;
  PyObject *__pyx_n_s_max_workers;
  PyObject *__pyx_kp_u_maybe_is_new_stock;
  PyObject *__pyx_n_s_merge;
  PyObject *__pyx_n_s_merged_df;
  PyObject *__pyx_n_s_metaclass;
  PyObject *__pyx_n_s_method;
  PyObject *__pyx_n_s_min_date_em;
  PyObject *__pyx_n_s_min_date_em_str;
  PyObject *__pyx_n_s_min_date_sina;
  PyObject *__pyx_n_s_min_date_sina_str;
  PyObject *__pyx_n_s_mininterval;
  PyObject *__pyx_n_s_mode;
  PyObject *__pyx_n_s_module;
  PyObject *__pyx_n_s_mro_entries;
  PyObject *__pyx_n_s_multi_thread;
  PyObject *__pyx_n_s_multi_type;
  PyObject *__pyx_n_s_mysql_table_name;
  PyObject *__pyx_n_s_name;
  PyObject *__pyx_n_s_name_2;
  PyObject *__pyx_n_s_name_A;
  PyObject *__pyx_n_s_name_B;
  PyObject *__pyx_n_s_nan;
  PyObject *__pyx_kp_u_need_to_update;
  PyObject *__pyx_n_s_need_update;
  PyObject *__pyx_n_s_new;
  PyObject *__pyx_n_s_new_data_fist_date_str;
  PyObject *__pyx_n_s_new_order;
  PyObject *__pyx_n_s_new_record;
  PyObject *__pyx_n_s_new_stocks;
  PyObject *__pyx_n_s_next;
  PyObject *__pyx_n_s_next_session;
  PyObject *__pyx_n_s_no_fault;
  PyObject *__pyx_n_s_non_serializable_attrs;
  PyObject *__pyx_kp_u_not_in_stock_basic_info;
  PyObject *__pyx_n_s_np;
  PyObject *__pyx_n_s_null_list;
  PyObject *__pyx_n_s_null_rows;
  PyObject *__pyx_kp_s_null_value_row_id_d_row_date_s_r;
  PyObject *__pyx_n_s_numpy;
  PyObject *__pyx_n_s_object;
  PyObject *__pyx_n_s_on;
  PyObject *__pyx_n_s_open;
  PyObject *__pyx_n_s_open_interest;
  PyObject *__pyx_n_s_order_by;
  PyObject *__pyx_n_s_origin_factor;
  PyObject *__pyx_n_s_outstand_share;
  PyObject *__pyx_n_s_pandas;
  PyObject *__pyx_kp_u_pandas_version;
  PyObject *__pyx_n_s_pd;
  PyObject *__pyx_n_s_period;
  PyObject *__pyx_n_s_pop;
  PyObject *__pyx_n_s_pre_close;
  PyObject *__pyx_n_s_pre_close_first;
  PyObject *__pyx_n_s_preclose;
  PyObject *__pyx_n_s_prepare;
  PyObject *__pyx_n_s_print;
  PyObject *__pyx_n_s_process;
  PyObject *__pyx_n_s_province;
  PyObject *__pyx_n_s_qfq;
  PyObject *__pyx_n_s_qfq_close;
  PyObject *__pyx_n_s_qfq_factor;
  PyObject *__pyx_kp_s_qfq_factor_2;
  PyObject *__pyx_n_s_qualname;
  PyObject *__pyx_n_s_quarter;
  PyObject *__pyx_n_s_query;
  PyObject *__pyx_n_s_query_history_k_data_plus;
  PyObject *__pyx_n_s_range;
  PyObject *__pyx_n_s_read_csv;
  PyObject *__pyx_n_s_remove;
  PyObject *__pyx_n_s_rename;
  PyObject *__pyx_n_s_rename_stock_df;
  PyObject *__pyx_n_s_replace;
  PyObject *__pyx_n_s_report;
  PyObject *__pyx_n_s_report_date;
  PyObject *__pyx_n_s_res;
  PyObject *__pyx_n_s_res_fq;
  PyObject *__pyx_n_s_restoration_price_hfq;
  PyObject *__pyx_n_s_restoration_price_qfq;
  PyObject *__pyx_n_s_result;
  PyObject *__pyx_n_s_result_day_data;
  PyObject *__pyx_n_s_return;
  PyObject *__pyx_n_s_reversed;
  PyObject *__pyx_n_s_round;
  PyObject *__pyx_n_s_row;
  PyObject *__pyx_n_s_row_code;
  PyObject *__pyx_n_s_row_date;
  PyObject *__pyx_n_s_row_index1;
  PyObject *__pyx_n_s_row_index2;
  PyObject *__pyx_n_s_row_indice;
  PyObject *__pyx_n_s_row_qfq_factor;
  PyObject *__pyx_kp_u_row_qfq_factor_equal_zero_when;
  PyObject *__pyx_n_s_rows;
  PyObject *__pyx_n_s_rs;
  PyObject *__pyx_n_s_rzrq;
  PyObject *__pyx_n_s_rzrq_history;
  PyObject *__pyx_n_s_rzrq_trade_day;
  PyObject *__pyx_kp_u_s;
  PyObject *__pyx_n_s_saveHistTradeDayInfoBaostock;
  PyObject *__pyx_n_s_saveHistTradeDayInfoEm;
  PyObject *__pyx_n_s_saveHistTradeDayInfoSina;
  PyObject *__pyx_n_s_scalar;
  PyObject *__pyx_n_s_sdc;
  PyObject *__pyx_kp_u_sdc_stock_fhps_detail_em_return;
  PyObject *__pyx_n_s_self;
  PyObject *__pyx_n_s_session;
  PyObject *__pyx_n_s_setTableColumnValue;
  PyObject *__pyx_n_s_set_name;
  PyObject *__pyx_n_s_set_option;
  PyObject *__pyx_n_s_sh_calendar;
  PyObject *__pyx_n_s_shape;
  PyObject *__pyx_n_s_shift;
  PyObject *__pyx_n_s_shutdown;
  PyObject *__pyx_n_s_simple_info;
  PyObject *__pyx_n_s_simple_stock_code;
  PyObject *__pyx_n_s_sina;
  PyObject *__pyx_n_s_single;
  PyObject *__pyx_n_s_size;
  PyObject *__pyx_kp_u_so_execute_delete_its_all_data;
  PyObject *__pyx_n_s_sort_values;
  PyObject *__pyx_n_s_spec;
  PyObject *__pyx_n_s_split;
  PyObject *__pyx_n_s_splitDataframeByYear;
  PyObject *__pyx_n_s_split_dict;
  PyObject *__pyx_n_s_start;
  PyObject *__pyx_n_s_startWithDigit;
  PyObject *__pyx_n_s_start_date;
  PyObject *__pyx_n_s_start_time;
  PyObject *__pyx_kp_u_stock;
  PyObject *__pyx_n_s_stockDataCrawler;
  PyObject *__pyx_n_s_stock_basic_info;
  PyObject *__pyx_n_s_stock_basic_info_df;
  PyObject *__pyx_n_s_stock_board_concept_cons_em;
  PyObject *__pyx_n_s_stock_board_concept_hist_em;
  PyObject *__pyx_n_s_stock_board_concept_name_em;
  PyObject *__pyx_n_s_stock_board_industry_cons_em;
  PyObject *__pyx_n_s_stock_board_industry_hist_em;
  PyObject *__pyx_n_s_stock_board_industry_name_em;
  PyObject *__pyx_n_s_stock_code;
  PyObject *__pyx_n_s_stock_code_back;
  PyObject *__pyx_n_s_stock_concept_basic_info;
  PyObject *__pyx_n_s_stock_concept_trade_day;
  PyObject *__pyx_n_s_stock_dividend_info;
  PyObject *__pyx_kp_u_stock_dividend_info_of;
  PyObject *__pyx_n_s_stock_dividend_ps;
  PyObject *__pyx_n_s_stock_dividends;
  PyObject *__pyx_n_s_stock_fhps_detail_em;
  PyObject *__pyx_n_s_stock_finance_mfd_quarter_em;
  PyObject *__pyx_n_s_stock_finance_mfd_report_em;
  PyObject *__pyx_n_s_stock_financial_quarter;
  PyObject *__pyx_n_s_stock_financial_report;
  PyObject *__pyx_n_s_stock_fq_factor;
  PyObject *__pyx_n_s_stock_full_code;
  PyObject *__pyx_n_s_stock_hold_number;
  PyObject *__pyx_n_s_stock_hsgt_detail;
  PyObject *__pyx_n_s_stock_hsgt_trade_day;
  PyObject *__pyx_n_s_stock_individual_info_em;
  PyObject *__pyx_n_s_stock_individual_info_em_df;
  PyObject *__pyx_n_s_stock_industry_basic_info;
  PyObject *__pyx_n_s_stock_industry_concept_basic;
  PyObject *__pyx_n_s_stock_industry_concept_basic_inf;
  PyObject *__pyx_n_s_stock_industry_trade_day;
  PyObject *__pyx_n_s_stock_info_a_code_name;
  PyObject *__pyx_n_s_stock_item;
  PyObject *__pyx_n_s_stock_len;
  PyObject *__pyx_n_s_stock_name;
  PyObject *__pyx_n_s_stock_name_new;
  PyObject *__pyx_n_s_stock_query;
  PyObject *__pyx_n_s_stock_rzrq_detail;
  PyObject *__pyx_n_s_stock_rzrq_trade_day;
  PyObject *__pyx_n_s_stock_simple_code;
  PyObject *__pyx_n_s_stock_simple_info;
  PyObject *__pyx_n_s_stock_tfp_em;
  PyObject *__pyx_n_s_stock_tfp_em_df;
  PyObject *__pyx_n_s_stock_to_update;
  PyObject *__pyx_n_s_stock_trade_day;
  PyObject *__pyx_n_s_stock_trade_day_2;
  PyObject *__pyx_n_s_stock_trade_day_2018;
  PyObject *__pyx_n_s_stock_trade_day_2019;
  PyObject *__pyx_n_s_stock_trade_day_2020;
  PyObject *__pyx_n_s_stock_trade_day_2021;
  PyObject *__pyx_n_s_stock_trade_day_2022;
  PyObject *__pyx_n_s_stock_trade_day_2023;
  PyObject *__pyx_n_s_stock_trade_day_2024;
  PyObject *__pyx_n_s_stock_trade_day_df;
  PyObject *__pyx_n_s_stock_zh_a_daily;
  PyObject *__pyx_n_s_stock_zh_a_gdhs;
  PyObject *__pyx_n_s_stock_zh_a_gdhs_detail_em;
  PyObject *__pyx_n_s_stock_zh_a_hist;
  PyObject *__pyx_n_s_stock_zh_a_hist_em_bfq;
  PyObject *__pyx_n_s_stock_zh_a_hist_sina_bfq;
  PyObject *__pyx_n_s_stock_zh_a_hist_sina_fq_factor;
  PyObject *__pyx_n_s_stock_zh_a_hist_sina_hfq;
  PyObject *__pyx_n_s_stock_zh_a_hist_sina_qfq;
  PyObject *__pyx_n_s_stock_zh_index_daily_em;
  PyObject *__pyx_n_s_stock_zyjs_ths;
  PyObject *__pyx_n_s_stock_zyjs_ths_df;
  PyObject *__pyx_n_s_stocks_list;
  PyObject *__pyx_n_s_str;
  PyObject *__pyx_n_s_strftime;
  PyObject *__pyx_n_s_strptime;
  PyObject *__pyx_n_s_submit;
  PyObject *__pyx_n_s_succeed;
  PyObject *__pyx_kp_u_succeed_2;
  PyObject *__pyx_n_s_suffixes;
  PyObject *__pyx_n_s_super;
  PyObject *__pyx_n_s_suspended_stock_list;
  PyObject *__pyx_n_s_symbol;
  PyObject *__pyx_n_s_synchronize_session;
  PyObject *__pyx_n_s_sys;
  PyObject *__pyx_n_s_tableTools;
  PyObject *__pyx_n_s_table_base_name;
  PyObject *__pyx_kp_u_table_code_name_first_date_prov;
  PyObject *__pyx_n_s_table_columns;
  PyObject *__pyx_kp_u_table_has_been_updated;
  PyObject *__pyx_kp_u_table_has_been_updated_2;
  PyObject *__pyx_kp_u_table_has_been_updated_by_updat;
  PyObject *__pyx_kp_u_table_has_been_updated_by_updat_2;
  PyObject *__pyx_kp_u_table_industry_concept_is_margi;
  PyObject *__pyx_n_s_table_max_date_str;
  PyObject *__pyx_n_s_table_name;
  PyObject *__pyx_n_s_table_name_year;
  PyObject *__pyx_n_s_tbstock;
  PyObject *__pyx_n_s_tbstock_dataAcquisition_models;
  PyObject *__pyx_kp_s_tbstock_dataAcquisition_saveData;
  PyObject *__pyx_n_s_tbstock_dataAcquisition_saveData_2;
  PyObject *__pyx_n_s_tbstock_dataAcquisition_stockDat;
  PyObject *__pyx_n_s_tbstock_dataManagement_dataPrepr;
  PyObject *__pyx_n_s_tbstock_utils;
  PyObject *__pyx_n_s_temp;
  PyObject *__pyx_n_s_test;
  PyObject *__pyx_n_s_test_2;
  PyObject *__pyx_n_s_test_simple_code;
  PyObject *__pyx_n_s_thread;
  PyObject *__pyx_n_s_time;
  PyObject *__pyx_kp_u_time_cost;
  PyObject *__pyx_n_s_to_datetime;
  PyObject *__pyx_n_s_to_list;
  PyObject *__pyx_n_s_to_numeric;
  PyObject *__pyx_n_s_to_sql;
  PyObject *__pyx_n_s_today_date;
  PyObject *__pyx_n_s_total;
  PyObject *__pyx_n_s_tqdm;
  PyObject *__pyx_kp_u_trade_data_failed_to_save_in_ta;
  PyObject *__pyx_kp_u_trade_day_data_failed_save_in;
  PyObject *__pyx_kp_u_trade_day_data_is_empty;
  PyObject *__pyx_n_s_tradestatus;
  PyObject *__pyx_n_s_turn;
  PyObject *__pyx_n_s_turn_over;
  PyObject *__pyx_n_s_types;
  PyObject *__pyx_n_s_unassign_profit_ps;
  PyObject *__pyx_kp_u_update;
  PyObject *__pyx_n_s_updateFutureTradeDayToMysql;
  PyObject *__pyx_n_s_updateIndexTradeDayToMysql;
  PyObject *__pyx_n_s_updateKzzBasicInfoToMysql;
  PyObject *__pyx_n_s_updateLib;
  PyObject *__pyx_n_s_updateRzrqHsgtTradeDayToMysql;
  PyObject *__pyx_n_s_updateSingleFutureTradeDayInfo;
  PyObject *__pyx_n_s_updateSingleIndexTradeDayInfo;
  PyObject *__pyx_n_s_updateSingleStockBasicInfo;
  PyObject *__pyx_n_s_updateSingleStockDividendInfo;
  PyObject *__pyx_n_s_updateSingleStockFinancialData;
  PyObject *__pyx_n_s_updateSingleStockFqFactor;
  PyObject *__pyx_n_s_updateSingleStockHoldNumber;
  PyObject *__pyx_n_s_updateSingleStockRzrqHsgtData;
  PyObject *__pyx_n_s_updateSingleStockTradeDayInfo;
  PyObject *__pyx_n_s_updateStockBasicInfoByIndustryCo;
  PyObject *__pyx_n_s_updateStockBasicInfoToMysql;
  PyObject *__pyx_n_s_updateStockConceptInfo;
  PyObject *__pyx_n_s_updateStockDividendInfoToMysql;
  PyObject *__pyx_n_s_updateStockFinancialToMysql;
  PyObject *__pyx_n_s_updateStockFqFactorToMysql;
  PyObject *__pyx_n_s_updateStockHoldNumberToMysql;
  PyObject *__pyx_n_s_updateStockIndustryConceptBasicI;
  PyObject *__pyx_n_s_updateStockIndustryConceptTradeD;
  PyObject *__pyx_n_s_updateStockIndustryInfo;
  PyObject *__pyx_n_s_updateStockRzrqHsgtTradeDayToMys;
  PyObject *__pyx_n_s_updateStockSimpleInfoToMysql;
  PyObject *__pyx_n_s_updateStockTables;
  PyObject *__pyx_kp_u_updateStockTables_time_cost;
  PyObject *__pyx_n_s_updateStockTradeDayInfo;
  PyObject *__pyx_n_s_updateStrategyDict;
  PyObject *__pyx_kp_s_update_concept;
  PyObject *__pyx_kp_u_update_concept_There_exist;
  PyObject *__pyx_n_s_update_db_logs_dir;
  PyObject *__pyx_n_s_update_dict;
  PyObject *__pyx_kp_s_update_industry;
  PyObject *__pyx_kp_u_update_industry_This;
  PyObject *__pyx_n_s_update_json;
  PyObject *__pyx_n_s_update_list;
  PyObject *__pyx_n_s_update_range;
  PyObject *__pyx_n_s_updated;
  PyObject *__pyx_n_s_updated_concept;
  PyObject *__pyx_n_s_updated_industry;
  PyObject *__pyx_n_s_updated_list;
  PyObject *__pyx_n_s_updated_list_index;
  PyObject *__pyx_kp_s_updatelog_json;
  PyObject *__pyx_n_s_utils;
  PyObject *__pyx_n_s_value;
  PyObject *__pyx_n_s_values;
  PyObject *__pyx_n_s_version;
  PyObject *__pyx_n_s_volume;
  PyObject *__pyx_n_s_wait;
  PyObject *__pyx_n_s_warning;
  PyObject *__pyx_n_s_workers;
  PyObject *__pyx_n_s_x;
  PyObject *__pyx_kp_s_xx;
  PyObject *__pyx_n_s_year;
  PyObject *__pyx_n_s_year_list;
  PyObject *__pyx_n_s_year_stock_data;
  PyObject *__pyx_n_s_zip;
  PyObject *__pyx_float_1_0;
  PyObject *__pyx_float_0_01;
  PyObject *__pyx_float_10_0;
  PyObject *__pyx_float_100_0;
  PyObject *__pyx_int_0;
  PyObject *__pyx_int_1;
  PyObject *__pyx_int_2;
  PyObject *__pyx_int_4;
  PyObject *__pyx_int_5;
  PyObject *__pyx_int_6;
  PyObject *__pyx_int_10;
  PyObject *__pyx_int_12;
  PyObject *__pyx_int_100;
  PyObject *__pyx_int_1900;
  PyObject *__pyx_int_2100;
  PyObject *__pyx_int_neg_1;
  PyObject *__pyx_tuple__6;
  PyObject *__pyx_tuple__7;
  PyObject *__pyx_slice__37;
  PyObject *__pyx_slice__53;
  PyObject *__pyx_slice__55;
  PyObject *__pyx_slice__56;
  PyObject *__pyx_slice__57;
  PyObject *__pyx_tuple__12;
  PyObject *__pyx_tuple__14;
  PyObject *__pyx_tuple__16;
  PyObject *__pyx_tuple__20;
  PyObject *__pyx_tuple__23;
  PyObject *__pyx_tuple__25;
  PyObject *__pyx_tuple__26;
  PyObject *__pyx_tuple__27;
  PyObject *__pyx_tuple__28;
  PyObject *__pyx_tuple__29;
  PyObject *__pyx_tuple__34;
  PyObject *__pyx_tuple__38;
  PyObject *__pyx_tuple__40;
  PyObject *__pyx_tuple__41;
  PyObject *__pyx_tuple__43;
  PyObject *__pyx_tuple__52;
  PyObject *__pyx_tuple__58;
  PyObject *__pyx_tuple__59;
  PyObject *__pyx_tuple__68;
  PyObject *__pyx_tuple__70;
  PyObject *__pyx_tuple__73;
  PyObject *__pyx_tuple__75;
  PyObject *__pyx_tuple__77;
  PyObject *__pyx_tuple__79;
  PyObject *__pyx_tuple__81;
  PyObject *__pyx_tuple__83;
  PyObject *__pyx_tuple__85;
  PyObject *__pyx_tuple__92;
  PyObject *__pyx_tuple__95;
  PyObject *__pyx_tuple__96;
  PyObject *__pyx_tuple__97;
  PyObject *__pyx_tuple__98;
  PyObject *__pyx_tuple__99;
  PyObject *__pyx_tuple__100;
  PyObject *__pyx_tuple__102;
  PyObject *__pyx_tuple__103;
  PyObject *__pyx_tuple__105;
  PyObject *__pyx_tuple__107;
  PyObject *__pyx_tuple__108;
  PyObject *__pyx_tuple__110;
  PyObject *__pyx_tuple__111;
  PyObject *__pyx_tuple__113;
  PyObject *__pyx_tuple__114;
  PyObject *__pyx_tuple__116;
  PyObject *__pyx_tuple__118;
  PyObject *__pyx_tuple__119;
  PyObject *__pyx_tuple__121;
  PyObject *__pyx_tuple__122;
  PyObject *__pyx_tuple__124;
  PyObject *__pyx_tuple__125;
  PyObject *__pyx_tuple__127;
  PyObject *__pyx_tuple__130;
  PyObject *__pyx_tuple__132;
  PyObject *__pyx_tuple__134;
  PyObject *__pyx_tuple__136;
  PyObject *__pyx_tuple__138;
  PyObject *__pyx_tuple__140;
  PyObject *__pyx_tuple__142;
  PyObject *__pyx_tuple__143;
  PyObject *__pyx_tuple__145;
  PyObject *__pyx_tuple__146;
  PyObject *__pyx_tuple__148;
  PyObject *__pyx_tuple__150;
  PyObject *__pyx_tuple__151;
  PyObject *__pyx_tuple__153;
  PyObject *__pyx_tuple__156;
  PyObject *__pyx_tuple__158;
  PyObject *__pyx_tuple__159;
  PyObject *__pyx_tuple__161;
  PyObject *__pyx_tuple__163;
  PyObject *__pyx_tuple__164;
  PyObject *__pyx_tuple__166;
  PyObject *__pyx_tuple__167;
  PyObject *__pyx_tuple__169;
  PyObject *__pyx_tuple__171;
  PyObject *__pyx_tuple__173;
  PyObject *__pyx_tuple__175;
  PyObject *__pyx_codeobj__24;
  PyObject *__pyx_codeobj__69;
  PyObject *__pyx_codeobj__74;
  PyObject *__pyx_codeobj__78;
  PyObject *__pyx_codeobj__80;
  PyObject *__pyx_codeobj__82;
  PyObject *__pyx_codeobj__84;
  PyObject *__pyx_codeobj__86;
  PyObject *__pyx_codeobj__93;
  PyObject *__pyx_codeobj__101;
  PyObject *__pyx_codeobj__104;
  PyObject *__pyx_codeobj__106;
  PyObject *__pyx_codeobj__109;
  PyObject *__pyx_codeobj__112;
  PyObject *__pyx_codeobj__115;
  PyObject *__pyx_codeobj__117;
  PyObject *__pyx_codeobj__120;
  PyObject *__pyx_codeobj__123;
  PyObject *__pyx_codeobj__126;
  PyObject *__pyx_codeobj__128;
  PyObject *__pyx_codeobj__129;
  PyObject *__pyx_codeobj__131;
  PyObject *__pyx_codeobj__133;
  PyObject *__pyx_codeobj__135;
  PyObject *__pyx_codeobj__137;
  PyObject *__pyx_codeobj__139;
  PyObject *__pyx_codeobj__141;
  PyObject *__pyx_codeobj__144;
  PyObject *__pyx_codeobj__147;
  PyObject *__pyx_codeobj__149;
  PyObject *__pyx_codeobj__152;
  PyObject *__pyx_codeobj__154;
  PyObject *__pyx_codeobj__155;
  PyObject *__pyx_codeobj__157;
  PyObject *__pyx_codeobj__160;
  PyObject *__pyx_codeobj__162;
  PyObject *__pyx_codeobj__165;
  PyObject *__pyx_codeobj__168;
  PyObject *__pyx_codeobj__170;
  PyObject *__pyx_codeobj__172;
  PyObject *__pyx_codeobj__174;
  PyObject *__pyx_codeobj__176;
} __pyx_mstate;

#if CYTHON_USE_MODULE_STATE
#ifdef __cplusplus
namespace {
  extern struct PyModuleDef __pyx_moduledef;
} /* anonymous namespace */
#else
static struct PyModuleDef __pyx_moduledef;
#endif

#define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))

#define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))

#define __pyx_m (PyState_FindModule(&__pyx_moduledef))
#else
static __pyx_mstate __pyx_mstate_global_static =
#ifdef __cplusplus
    {};
#else
    {0};
#endif
static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
#endif
/* #### Code section: module_state_clear ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_clear(PyObject *m) {
  __pyx_mstate *clear_module_state = __pyx_mstate(m);
  if (!clear_module_state) return 0;
  Py_CLEAR(clear_module_state->__pyx_d);
  Py_CLEAR(clear_module_state->__pyx_b);
  Py_CLEAR(clear_module_state->__pyx_cython_runtime);
  Py_CLEAR(clear_module_state->__pyx_empty_tuple);
  Py_CLEAR(clear_module_state->__pyx_empty_bytes);
  Py_CLEAR(clear_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
  #endif
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_kp_s_);
  Py_CLEAR(clear_module_state->__pyx_kp_s_0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20180101);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20240503);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20240530);
  Py_CLEAR(clear_module_state->__pyx_kp_s_20241230);
  Py_CLEAR(clear_module_state->__pyx_kp_s_3);
  Py_CLEAR(clear_module_state->__pyx_kp_s_300416);
  Py_CLEAR(clear_module_state->__pyx_kp_s_600096);
  Py_CLEAR(clear_module_state->__pyx_kp_s_689009);
  Py_CLEAR(clear_module_state->__pyx_n_s_A);
  Py_CLEAR(clear_module_state->__pyx_n_s_B);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Beginning);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Call_bs_query_history_k_data_plu);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataFrame);
  Py_CLEAR(clear_module_state->__pyx_kp_u_DataFrame_result_day_data_is_emp);
  Py_CLEAR(clear_module_state->__pyx_kp_s_DataToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql___init);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_dumpJsonToFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_fixTradeDayNullValue);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_func_concept);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_func_industry);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_getFqFactorByDividen);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_getSuspendedStocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateFutureTradeDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateFutureTradeDay_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateIndexTradeDayT);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateIndexTradeDayT_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateKzzBasicInfoTo);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateRzrqHsgtTradeD);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateSingleStockDiv);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateSingleStockFqF);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockConceptIn);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockDividendI);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockFinancial);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockFinancial_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockFqFactorT);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockHoldNumbe);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockHoldNumbe_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_3);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_4);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_5);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockIndustryI);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockSimpleInf);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockTradeDayI);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStockTradeDayI_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_DataToMysql_updateStrategyDict);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Data_failed_save_in);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Don_t_need_to_update);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_date_is);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_futures_main_s);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_board_c);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_board_h);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_bs_query_history);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_sdc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_sdc_stock);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_stock_finance_mf);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_stock_finance_mfd);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_to_updateSingleStockBasic);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Failed_update);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Fq_factor_of);
  Py_CLEAR(clear_module_state->__pyx_n_s_JR0);
  Py_CLEAR(clear_module_state->__pyx_n_s_LR0);
  Py_CLEAR(clear_module_state->__pyx_n_s_NaT);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Need_update_stock_concept_basic);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Need_update_stock_industry_basic);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Need_update_stock_simple_info_fi);
  Py_CLEAR(clear_module_state->__pyx_n_s_ProcessPoolExecutor);
  Py_CLEAR(clear_module_state->__pyx_n_s_RI0);
  Py_CLEAR(clear_module_state->__pyx_kp_u_StockTradeDayInfo_of);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Succeed_save_in);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Succeed_to_call_getFqFactorByDiv);
  Py_CLEAR(clear_module_state->__pyx_kp_u_Succeed_update);
  Py_CLEAR(clear_module_state->__pyx_kp_u_The);
  Py_CLEAR(clear_module_state->__pyx_kp_u_There_is_not_new_stocks_to_updat);
  Py_CLEAR(clear_module_state->__pyx_n_s_ThreadPoolExecutor);
  Py_CLEAR(clear_module_state->__pyx_kp_u_TradeDayInfo_of);
  Py_CLEAR(clear_module_state->__pyx_kp_u_TradeDayInfo_of_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
  Py_CLEAR(clear_module_state->__pyx_n_s_WH0);
  Py_CLEAR(clear_module_state->__pyx_kp_s_XX);
  Py_CLEAR(clear_module_state->__pyx_kp_s_Y_m_d);
  Py_CLEAR(clear_module_state->__pyx_kp_s__10);
  Py_CLEAR(clear_module_state->__pyx_kp_s__11);
  Py_CLEAR(clear_module_state->__pyx_kp_s__13);
  Py_CLEAR(clear_module_state->__pyx_kp_s__15);
  Py_CLEAR(clear_module_state->__pyx_kp_s__17);
  Py_CLEAR(clear_module_state->__pyx_n_s__177);
  Py_CLEAR(clear_module_state->__pyx_kp_s__18);
  Py_CLEAR(clear_module_state->__pyx_kp_s__19);
  Py_CLEAR(clear_module_state->__pyx_kp_s__2);
  Py_CLEAR(clear_module_state->__pyx_kp_s__21);
  Py_CLEAR(clear_module_state->__pyx_kp_u__21);
  Py_CLEAR(clear_module_state->__pyx_kp_u__22);
  Py_CLEAR(clear_module_state->__pyx_kp_s__3);
  Py_CLEAR(clear_module_state->__pyx_kp_s__30);
  Py_CLEAR(clear_module_state->__pyx_kp_s__31);
  Py_CLEAR(clear_module_state->__pyx_kp_s__32);
  Py_CLEAR(clear_module_state->__pyx_kp_s__33);
  Py_CLEAR(clear_module_state->__pyx_kp_s__35);
  Py_CLEAR(clear_module_state->__pyx_kp_s__36);
  Py_CLEAR(clear_module_state->__pyx_kp_s__39);
  Py_CLEAR(clear_module_state->__pyx_kp_s__4);
  Py_CLEAR(clear_module_state->__pyx_kp_s__42);
  Py_CLEAR(clear_module_state->__pyx_kp_s__44);
  Py_CLEAR(clear_module_state->__pyx_kp_s__45);
  Py_CLEAR(clear_module_state->__pyx_kp_s__46);
  Py_CLEAR(clear_module_state->__pyx_kp_s__47);
  Py_CLEAR(clear_module_state->__pyx_kp_s__48);
  Py_CLEAR(clear_module_state->__pyx_kp_s__49);
  Py_CLEAR(clear_module_state->__pyx_kp_u__5);
  Py_CLEAR(clear_module_state->__pyx_kp_s__50);
  Py_CLEAR(clear_module_state->__pyx_kp_s__51);
  Py_CLEAR(clear_module_state->__pyx_kp_s__54);
  Py_CLEAR(clear_module_state->__pyx_kp_s__60);
  Py_CLEAR(clear_module_state->__pyx_kp_s__61);
  Py_CLEAR(clear_module_state->__pyx_kp_s__62);
  Py_CLEAR(clear_module_state->__pyx_kp_s__63);
  Py_CLEAR(clear_module_state->__pyx_kp_s__64);
  Py_CLEAR(clear_module_state->__pyx_kp_s__65);
  Py_CLEAR(clear_module_state->__pyx_kp_s__66);
  Py_CLEAR(clear_module_state->__pyx_n_s__67);
  Py_CLEAR(clear_module_state->__pyx_kp_s__71);
  Py_CLEAR(clear_module_state->__pyx_kp_s__72);
  Py_CLEAR(clear_module_state->__pyx_kp_s__76);
  Py_CLEAR(clear_module_state->__pyx_kp_s__8);
  Py_CLEAR(clear_module_state->__pyx_kp_s__87);
  Py_CLEAR(clear_module_state->__pyx_kp_s__88);
  Py_CLEAR(clear_module_state->__pyx_kp_s__89);
  Py_CLEAR(clear_module_state->__pyx_kp_s__9);
  Py_CLEAR(clear_module_state->__pyx_kp_s__90);
  Py_CLEAR(clear_module_state->__pyx_kp_s__91);
  Py_CLEAR(clear_module_state->__pyx_n_s__94);
  Py_CLEAR(clear_module_state->__pyx_n_s_adjust);
  Py_CLEAR(clear_module_state->__pyx_n_s_adjustflag);
  Py_CLEAR(clear_module_state->__pyx_n_s_ak);
  Py_CLEAR(clear_module_state->__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret);
  Py_CLEAR(clear_module_state->__pyx_n_s_akshare);
  Py_CLEAR(clear_module_state->__pyx_kp_u_akshare_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_all);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_stock_simple_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_all_succeed);
  Py_CLEAR(clear_module_state->__pyx_n_s_amount);
  Py_CLEAR(clear_module_state->__pyx_n_s_api);
  Py_CLEAR(clear_module_state->__pyx_n_s_append);
  Py_CLEAR(clear_module_state->__pyx_n_s_apply);
  Py_CLEAR(clear_module_state->__pyx_n_s_as_completed);
  Py_CLEAR(clear_module_state->__pyx_n_s_ascending);
  Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
  Py_CLEAR(clear_module_state->__pyx_n_s_axis);
  Py_CLEAR(clear_module_state->__pyx_n_s_baostock);
  Py_CLEAR(clear_module_state->__pyx_kp_s_baostock_login_respond_error_cod);
  Py_CLEAR(clear_module_state->__pyx_kp_s_baostock_login_respond_error_msg);
  Py_CLEAR(clear_module_state->__pyx_kp_u_baostock_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_basic_info_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_basic_info_table_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_bool);
  Py_CLEAR(clear_module_state->__pyx_kp_s_bool_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_bs);
  Py_CLEAR(clear_module_state->__pyx_n_s_by);
  Py_CLEAR(clear_module_state->__pyx_n_s_capital_reserve_ps);
  Py_CLEAR(clear_module_state->__pyx_n_s_cash_dividend_ps);
  Py_CLEAR(clear_module_state->__pyx_n_s_cash_dividends);
  Py_CLEAR(clear_module_state->__pyx_n_s_check_serializability);
  Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
  Py_CLEAR(clear_module_state->__pyx_n_s_clearTableContent);
  Py_CLEAR(clear_module_state->__pyx_n_s_clearTableContentByCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
  Py_CLEAR(clear_module_state->__pyx_n_s_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_co_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_cocept_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_code);
  Py_CLEAR(clear_module_state->__pyx_kp_u_code_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_code_is);
  Py_CLEAR(clear_module_state->__pyx_n_s_code_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_coerce);
  Py_CLEAR(clear_module_state->__pyx_n_s_cols);
  Py_CLEAR(clear_module_state->__pyx_n_s_cols_to_convert);
  Py_CLEAR(clear_module_state->__pyx_n_s_columns);
  Py_CLEAR(clear_module_state->__pyx_n_s_combined_codes);
  Py_CLEAR(clear_module_state->__pyx_n_s_commit);
  Py_CLEAR(clear_module_state->__pyx_n_s_con);
  Py_CLEAR(clear_module_state->__pyx_n_s_concat);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_cons_stocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_history_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_concept_trade_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_concurrent_futures);
  Py_CLEAR(clear_module_state->__pyx_n_s_cons_stocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_copy);
  Py_CLEAR(clear_module_state->__pyx_n_s_create_engine_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_cumprod);
  Py_CLEAR(clear_module_state->__pyx_n_s_current_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_d);
  Py_CLEAR(clear_module_state->__pyx_n_s_daily);
  Py_CLEAR(clear_module_state->__pyx_n_s_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataAcquisition);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataManagement);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataPreprocess);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_dict);
  Py_CLEAR(clear_module_state->__pyx_kp_u_data_has_not_update_from_networ);
  Py_CLEAR(clear_module_state->__pyx_kp_u_data_is_wrong_in);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_data_to_mysql);
  Py_CLEAR(clear_module_state->__pyx_kp_u_data_wrong_in);
  Py_CLEAR(clear_module_state->__pyx_n_s_dataproc);
  Py_CLEAR(clear_module_state->__pyx_n_s_date);
  Py_CLEAR(clear_module_state->__pyx_kp_s_date_code_open_high_low_close_pr);
  Py_CLEAR(clear_module_state->__pyx_n_s_date_data_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_default_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_delete);
  Py_CLEAR(clear_module_state->__pyx_n_s_delist_stock_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_desc);
  Py_CLEAR(clear_module_state->__pyx_n_s_desc_name);
  Py_CLEAR(clear_module_state->__pyx_kp_u_detail_for_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_diff_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_disable);
  Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
  Py_CLEAR(clear_module_state->__pyx_n_s_dispose);
  Py_CLEAR(clear_module_state->__pyx_kp_u_dividend_data_failed_save_in);
  Py_CLEAR(clear_module_state->__pyx_n_s_dividend_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_dividend_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_dividend_text);
  Py_CLEAR(clear_module_state->__pyx_n_s_dividend_yield);
  Py_CLEAR(clear_module_state->__pyx_n_s_doc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_dont_need_to_update);
  Py_CLEAR(clear_module_state->__pyx_kp_u_dont_need_to_update_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_drop);
  Py_CLEAR(clear_module_state->__pyx_n_s_dt);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_dtype_mapping);
  Py_CLEAR(clear_module_state->__pyx_n_s_dumpJsonToFile);
  Py_CLEAR(clear_module_state->__pyx_n_s_dump_json_period);
  Py_CLEAR(clear_module_state->__pyx_n_s_e);
  Py_CLEAR(clear_module_state->__pyx_n_s_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_empty);
  Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
  Py_CLEAR(clear_module_state->__pyx_n_s_end);
  Py_CLEAR(clear_module_state->__pyx_n_s_end_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_end_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_engine);
  Py_CLEAR(clear_module_state->__pyx_n_s_enter);
  Py_CLEAR(clear_module_state->__pyx_n_s_eps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_err_is);
  Py_CLEAR(clear_module_state->__pyx_n_s_error);
  Py_CLEAR(clear_module_state->__pyx_kp_u_error_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_error_msg);
  Py_CLEAR(clear_module_state->__pyx_n_s_errors);
  Py_CLEAR(clear_module_state->__pyx_n_s_ex_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_exclude_future_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_exclude_future_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_executor);
  Py_CLEAR(clear_module_state->__pyx_n_s_exit);
  Py_CLEAR(clear_module_state->__pyx_n_s_extractAdministrativeRegions);
  Py_CLEAR(clear_module_state->__pyx_n_s_f_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_failed_list);
  Py_CLEAR(clear_module_state->__pyx_kp_u_failed_to_save_in_tables_err_is);
  Py_CLEAR(clear_module_state->__pyx_n_s_fhsz_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_fields);
  Py_CLEAR(clear_module_state->__pyx_n_s_fillna);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter);
  Py_CLEAR(clear_module_state->__pyx_n_s_filter_by);
  Py_CLEAR(clear_module_state->__pyx_kp_u_financial_data_failed_save_in);
  Py_CLEAR(clear_module_state->__pyx_kp_u_finished);
  Py_CLEAR(clear_module_state->__pyx_n_s_first);
  Py_CLEAR(clear_module_state->__pyx_n_s_first_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_fixTradeDayNullValue);
  Py_CLEAR(clear_module_state->__pyx_kp_u_for_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_fq_factor_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_fq_factor_origin);
  Py_CLEAR(clear_module_state->__pyx_n_s_fq_row_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_fq_row_date_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_frequency);
  Py_CLEAR(clear_module_state->__pyx_n_s_fun_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_func);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_concept);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_func_industry);
  Py_CLEAR(clear_module_state->__pyx_n_s_future);
  Py_CLEAR(clear_module_state->__pyx_kp_s_futureCodeNames_csv);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_code_name_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_future_no_silent_downcasting);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_trade_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_future_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_futures);
  Py_CLEAR(clear_module_state->__pyx_n_s_futures_main_sina);
  Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
  Py_CLEAR(clear_module_state->__pyx_n_s_getConceptStockCodes);
  Py_CLEAR(clear_module_state->__pyx_n_s_getFqFactorByDividend);
  Py_CLEAR(clear_module_state->__pyx_n_s_getFullStockCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndexCodeName);
  Py_CLEAR(clear_module_state->__pyx_n_s_getIndustryConceptConsText);
  Py_CLEAR(clear_module_state->__pyx_n_s_getSingleIndustryConceptTradeDay);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockFqfactorInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_getStockSimpleInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_getSuspendedStocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_row_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_get_table_columns);
  Py_CLEAR(clear_module_state->__pyx_n_s_getframe);
  Py_CLEAR(clear_module_state->__pyx_n_s_has_update_file);
  Py_CLEAR(clear_module_state->__pyx_kp_u_has_updated);
  Py_CLEAR(clear_module_state->__pyx_n_s_hfq_factor);
  Py_CLEAR(clear_module_state->__pyx_kp_s_hfq_factor_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_high);
  Py_CLEAR(clear_module_state->__pyx_kp_u_history);
  Py_CLEAR(clear_module_state->__pyx_n_s_how);
  Py_CLEAR(clear_module_state->__pyx_n_s_hsgt_history);
  Py_CLEAR(clear_module_state->__pyx_n_s_hsgt_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_i);
  Py_CLEAR(clear_module_state->__pyx_n_s_id);
  Py_CLEAR(clear_module_state->__pyx_n_s_if_exists);
  Py_CLEAR(clear_module_state->__pyx_n_s_ignore_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_iloc);
  Py_CLEAR(clear_module_state->__pyx_n_s_import);
  Py_CLEAR(clear_module_state->__pyx_n_s_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_code_name_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_trade_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_index_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_cons_stocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_or_concept_cons_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_or_concept_hist_em_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_industry_or_concept_name_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_inf);
  Py_CLEAR(clear_module_state->__pyx_n_s_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_init);
  Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
  Py_CLEAR(clear_module_state->__pyx_n_s_inner);
  Py_CLEAR(clear_module_state->__pyx_n_s_inplace);
  Py_CLEAR(clear_module_state->__pyx_n_s_insert);
  Py_CLEAR(clear_module_state->__pyx_n_s_ipo_time);
  Py_CLEAR(clear_module_state->__pyx_n_s_is);
  Py_CLEAR(clear_module_state->__pyx_n_s_isAPrimaryBoardStock);
  Py_CLEAR(clear_module_state->__pyx_kp_u_is_Empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_datetime64_any_dtype);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_delist);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_hsgt);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_margin);
  Py_CLEAR(clear_module_state->__pyx_kp_u_is_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_null_ex_data_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_null_ex_data_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_primary);
  Py_CLEAR(clear_module_state->__pyx_n_s_is_session);
  Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
  Py_CLEAR(clear_module_state->__pyx_n_s_isin);
  Py_CLEAR(clear_module_state->__pyx_n_s_isna);
  Py_CLEAR(clear_module_state->__pyx_kp_u_it_has_been_suspended);
  Py_CLEAR(clear_module_state->__pyx_n_s_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_items);
  Py_CLEAR(clear_module_state->__pyx_n_s_iterrows);
  Py_CLEAR(clear_module_state->__pyx_n_s_join);
  Py_CLEAR(clear_module_state->__pyx_n_s_json_file_name);
  Py_CLEAR(clear_module_state->__pyx_kp_s_k);
  Py_CLEAR(clear_module_state->__pyx_n_s_key);
  Py_CLEAR(clear_module_state->__pyx_n_s_key_products);
  Py_CLEAR(clear_module_state->__pyx_n_s_keys);
  Py_CLEAR(clear_module_state->__pyx_n_s_kzz_basic_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_kzz_basic_info_dataframe);
  Py_CLEAR(clear_module_state->__pyx_n_s_kzz_basic_info_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_latest_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_lg);
  Py_CLEAR(clear_module_state->__pyx_n_s_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadJsonData);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadTable);
  Py_CLEAR(clear_module_state->__pyx_n_s_loadTableContentByCode);
  Py_CLEAR(clear_module_state->__pyx_n_s_load_json_file);
  Py_CLEAR(clear_module_state->__pyx_n_s_loc);
  Py_CLEAR(clear_module_state->__pyx_n_s_local_engine);
  Py_CLEAR(clear_module_state->__pyx_n_s_local_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_logger);
  Py_CLEAR(clear_module_state->__pyx_n_s_login);
  Py_CLEAR(clear_module_state->__pyx_n_s_logout);
  Py_CLEAR(clear_module_state->__pyx_n_s_low);
  Py_CLEAR(clear_module_state->__pyx_n_s_main);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_business);
  Py_CLEAR(clear_module_state->__pyx_n_s_main_fina_data_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_match_index);
  Py_CLEAR(clear_module_state->__pyx_n_s_max);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_date_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_date_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_date_row_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_date_table);
  Py_CLEAR(clear_module_state->__pyx_n_s_max_workers);
  Py_CLEAR(clear_module_state->__pyx_kp_u_maybe_is_new_stock);
  Py_CLEAR(clear_module_state->__pyx_n_s_merge);
  Py_CLEAR(clear_module_state->__pyx_n_s_merged_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
  Py_CLEAR(clear_module_state->__pyx_n_s_method);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_date_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_date_em_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_date_sina);
  Py_CLEAR(clear_module_state->__pyx_n_s_min_date_sina_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_mininterval);
  Py_CLEAR(clear_module_state->__pyx_n_s_mode);
  Py_CLEAR(clear_module_state->__pyx_n_s_module);
  Py_CLEAR(clear_module_state->__pyx_n_s_mro_entries);
  Py_CLEAR(clear_module_state->__pyx_n_s_multi_thread);
  Py_CLEAR(clear_module_state->__pyx_n_s_multi_type);
  Py_CLEAR(clear_module_state->__pyx_n_s_mysql_table_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_A);
  Py_CLEAR(clear_module_state->__pyx_n_s_name_B);
  Py_CLEAR(clear_module_state->__pyx_n_s_nan);
  Py_CLEAR(clear_module_state->__pyx_kp_u_need_to_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_need_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_data_fist_date_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_order);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_record);
  Py_CLEAR(clear_module_state->__pyx_n_s_new_stocks);
  Py_CLEAR(clear_module_state->__pyx_n_s_next);
  Py_CLEAR(clear_module_state->__pyx_n_s_next_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_no_fault);
  Py_CLEAR(clear_module_state->__pyx_n_s_non_serializable_attrs);
  Py_CLEAR(clear_module_state->__pyx_kp_u_not_in_stock_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_np);
  Py_CLEAR(clear_module_state->__pyx_n_s_null_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_null_rows);
  Py_CLEAR(clear_module_state->__pyx_kp_s_null_value_row_id_d_row_date_s_r);
  Py_CLEAR(clear_module_state->__pyx_n_s_numpy);
  Py_CLEAR(clear_module_state->__pyx_n_s_object);
  Py_CLEAR(clear_module_state->__pyx_n_s_on);
  Py_CLEAR(clear_module_state->__pyx_n_s_open);
  Py_CLEAR(clear_module_state->__pyx_n_s_open_interest);
  Py_CLEAR(clear_module_state->__pyx_n_s_order_by);
  Py_CLEAR(clear_module_state->__pyx_n_s_origin_factor);
  Py_CLEAR(clear_module_state->__pyx_n_s_outstand_share);
  Py_CLEAR(clear_module_state->__pyx_n_s_pandas);
  Py_CLEAR(clear_module_state->__pyx_kp_u_pandas_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_pd);
  Py_CLEAR(clear_module_state->__pyx_n_s_period);
  Py_CLEAR(clear_module_state->__pyx_n_s_pop);
  Py_CLEAR(clear_module_state->__pyx_n_s_pre_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_pre_close_first);
  Py_CLEAR(clear_module_state->__pyx_n_s_preclose);
  Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
  Py_CLEAR(clear_module_state->__pyx_n_s_print);
  Py_CLEAR(clear_module_state->__pyx_n_s_process);
  Py_CLEAR(clear_module_state->__pyx_n_s_province);
  Py_CLEAR(clear_module_state->__pyx_n_s_qfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_qfq_close);
  Py_CLEAR(clear_module_state->__pyx_n_s_qfq_factor);
  Py_CLEAR(clear_module_state->__pyx_kp_s_qfq_factor_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
  Py_CLEAR(clear_module_state->__pyx_n_s_quarter);
  Py_CLEAR(clear_module_state->__pyx_n_s_query);
  Py_CLEAR(clear_module_state->__pyx_n_s_query_history_k_data_plus);
  Py_CLEAR(clear_module_state->__pyx_n_s_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_read_csv);
  Py_CLEAR(clear_module_state->__pyx_n_s_remove);
  Py_CLEAR(clear_module_state->__pyx_n_s_rename);
  Py_CLEAR(clear_module_state->__pyx_n_s_rename_stock_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_replace);
  Py_CLEAR(clear_module_state->__pyx_n_s_report);
  Py_CLEAR(clear_module_state->__pyx_n_s_report_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_res);
  Py_CLEAR(clear_module_state->__pyx_n_s_res_fq);
  Py_CLEAR(clear_module_state->__pyx_n_s_restoration_price_hfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_restoration_price_qfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_result);
  Py_CLEAR(clear_module_state->__pyx_n_s_result_day_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_return);
  Py_CLEAR(clear_module_state->__pyx_n_s_reversed);
  Py_CLEAR(clear_module_state->__pyx_n_s_round);
  Py_CLEAR(clear_module_state->__pyx_n_s_row);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_index1);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_index2);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_indice);
  Py_CLEAR(clear_module_state->__pyx_n_s_row_qfq_factor);
  Py_CLEAR(clear_module_state->__pyx_kp_u_row_qfq_factor_equal_zero_when);
  Py_CLEAR(clear_module_state->__pyx_n_s_rows);
  Py_CLEAR(clear_module_state->__pyx_n_s_rs);
  Py_CLEAR(clear_module_state->__pyx_n_s_rzrq);
  Py_CLEAR(clear_module_state->__pyx_n_s_rzrq_history);
  Py_CLEAR(clear_module_state->__pyx_n_s_rzrq_trade_day);
  Py_CLEAR(clear_module_state->__pyx_kp_u_s);
  Py_CLEAR(clear_module_state->__pyx_n_s_saveHistTradeDayInfoBaostock);
  Py_CLEAR(clear_module_state->__pyx_n_s_saveHistTradeDayInfoEm);
  Py_CLEAR(clear_module_state->__pyx_n_s_saveHistTradeDayInfoSina);
  Py_CLEAR(clear_module_state->__pyx_n_s_scalar);
  Py_CLEAR(clear_module_state->__pyx_n_s_sdc);
  Py_CLEAR(clear_module_state->__pyx_kp_u_sdc_stock_fhps_detail_em_return);
  Py_CLEAR(clear_module_state->__pyx_n_s_self);
  Py_CLEAR(clear_module_state->__pyx_n_s_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_setTableColumnValue);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_set_option);
  Py_CLEAR(clear_module_state->__pyx_n_s_sh_calendar);
  Py_CLEAR(clear_module_state->__pyx_n_s_shape);
  Py_CLEAR(clear_module_state->__pyx_n_s_shift);
  Py_CLEAR(clear_module_state->__pyx_n_s_shutdown);
  Py_CLEAR(clear_module_state->__pyx_n_s_simple_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_simple_stock_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_sina);
  Py_CLEAR(clear_module_state->__pyx_n_s_single);
  Py_CLEAR(clear_module_state->__pyx_n_s_size);
  Py_CLEAR(clear_module_state->__pyx_kp_u_so_execute_delete_its_all_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_sort_values);
  Py_CLEAR(clear_module_state->__pyx_n_s_spec);
  Py_CLEAR(clear_module_state->__pyx_n_s_split);
  Py_CLEAR(clear_module_state->__pyx_n_s_splitDataframeByYear);
  Py_CLEAR(clear_module_state->__pyx_n_s_split_dict);
  Py_CLEAR(clear_module_state->__pyx_n_s_start);
  Py_CLEAR(clear_module_state->__pyx_n_s_startWithDigit);
  Py_CLEAR(clear_module_state->__pyx_n_s_start_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_start_time);
  Py_CLEAR(clear_module_state->__pyx_kp_u_stock);
  Py_CLEAR(clear_module_state->__pyx_n_s_stockDataCrawler);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_basic_info_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_concept_cons_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_concept_hist_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_concept_name_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_industry_cons_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_industry_hist_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_board_industry_name_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_code_back);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_concept_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_concept_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_dividend_info);
  Py_CLEAR(clear_module_state->__pyx_kp_u_stock_dividend_info_of);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_dividend_ps);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_dividends);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_fhps_detail_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_finance_mfd_quarter_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_finance_mfd_report_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_financial_quarter);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_financial_report);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_fq_factor);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_full_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_hold_number);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_hsgt_detail);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_hsgt_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_individual_info_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_individual_info_em_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_basic_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_concept_basic);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_concept_basic_inf);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_industry_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_info_a_code_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_item);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_len);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_name_new);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_query);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_rzrq_detail);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_rzrq_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_simple_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_simple_info);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tfp_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_tfp_em_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_to_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2018);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2019);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2020);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2021);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2022);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2023);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_2024);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_trade_day_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_daily);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_gdhs);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_gdhs_detail_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist_em_bfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist_sina_bfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist_sina_fq_factor);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist_sina_hfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_a_hist_sina_qfq);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zh_index_daily_em);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zyjs_ths);
  Py_CLEAR(clear_module_state->__pyx_n_s_stock_zyjs_ths_df);
  Py_CLEAR(clear_module_state->__pyx_n_s_stocks_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_strftime);
  Py_CLEAR(clear_module_state->__pyx_n_s_strptime);
  Py_CLEAR(clear_module_state->__pyx_n_s_submit);
  Py_CLEAR(clear_module_state->__pyx_n_s_succeed);
  Py_CLEAR(clear_module_state->__pyx_kp_u_succeed_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_suffixes);
  Py_CLEAR(clear_module_state->__pyx_n_s_super);
  Py_CLEAR(clear_module_state->__pyx_n_s_suspended_stock_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_symbol);
  Py_CLEAR(clear_module_state->__pyx_n_s_synchronize_session);
  Py_CLEAR(clear_module_state->__pyx_n_s_sys);
  Py_CLEAR(clear_module_state->__pyx_n_s_tableTools);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_base_name);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_code_name_first_date_prov);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_columns);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated_by_updat);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_has_been_updated_by_updat_2);
  Py_CLEAR(clear_module_state->__pyx_kp_u_table_industry_concept_is_margi);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_max_date_str);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_name);
  Py_CLEAR(clear_module_state->__pyx_n_s_table_name_year);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataAcquisition_models);
  Py_CLEAR(clear_module_state->__pyx_kp_s_tbstock_dataAcquisition_saveData);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataAcquisition_saveData_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataAcquisition_stockDat);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_dataManagement_dataPrepr);
  Py_CLEAR(clear_module_state->__pyx_n_s_tbstock_utils);
  Py_CLEAR(clear_module_state->__pyx_n_s_temp);
  Py_CLEAR(clear_module_state->__pyx_n_s_test);
  Py_CLEAR(clear_module_state->__pyx_n_s_test_2);
  Py_CLEAR(clear_module_state->__pyx_n_s_test_simple_code);
  Py_CLEAR(clear_module_state->__pyx_n_s_thread);
  Py_CLEAR(clear_module_state->__pyx_n_s_time);
  Py_CLEAR(clear_module_state->__pyx_kp_u_time_cost);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_datetime);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_numeric);
  Py_CLEAR(clear_module_state->__pyx_n_s_to_sql);
  Py_CLEAR(clear_module_state->__pyx_n_s_today_date);
  Py_CLEAR(clear_module_state->__pyx_n_s_total);
  Py_CLEAR(clear_module_state->__pyx_n_s_tqdm);
  Py_CLEAR(clear_module_state->__pyx_kp_u_trade_data_failed_to_save_in_ta);
  Py_CLEAR(clear_module_state->__pyx_kp_u_trade_day_data_failed_save_in);
  Py_CLEAR(clear_module_state->__pyx_kp_u_trade_day_data_is_empty);
  Py_CLEAR(clear_module_state->__pyx_n_s_tradestatus);
  Py_CLEAR(clear_module_state->__pyx_n_s_turn);
  Py_CLEAR(clear_module_state->__pyx_n_s_turn_over);
  Py_CLEAR(clear_module_state->__pyx_n_s_types);
  Py_CLEAR(clear_module_state->__pyx_n_s_unassign_profit_ps);
  Py_CLEAR(clear_module_state->__pyx_kp_u_update);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateFutureTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateIndexTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateKzzBasicInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateLib);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateRzrqHsgtTradeDayToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleFutureTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleIndexTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockBasicInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockDividendInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockFinancialData);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockFqFactor);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockHoldNumber);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockRzrqHsgtData);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateSingleStockTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockBasicInfoByIndustryCo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockBasicInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockConceptInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockDividendInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockFinancialToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockFqFactorToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockHoldNumberToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockIndustryConceptBasicI);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockIndustryConceptTradeD);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockIndustryInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockRzrqHsgtTradeDayToMys);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockSimpleInfoToMysql);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockTables);
  Py_CLEAR(clear_module_state->__pyx_kp_u_updateStockTables_time_cost);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStockTradeDayInfo);
  Py_CLEAR(clear_module_state->__pyx_n_s_updateStrategyDict);
  Py_CLEAR(clear_module_state->__pyx_kp_s_update_concept);
  Py_CLEAR(clear_module_state->__pyx_kp_u_update_concept_There_exist);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_db_logs_dir);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_dict);
  Py_CLEAR(clear_module_state->__pyx_kp_s_update_industry);
  Py_CLEAR(clear_module_state->__pyx_kp_u_update_industry_This);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_update_range);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated_concept);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated_industry);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_updated_list_index);
  Py_CLEAR(clear_module_state->__pyx_kp_s_updatelog_json);
  Py_CLEAR(clear_module_state->__pyx_n_s_utils);
  Py_CLEAR(clear_module_state->__pyx_n_s_value);
  Py_CLEAR(clear_module_state->__pyx_n_s_values);
  Py_CLEAR(clear_module_state->__pyx_n_s_version);
  Py_CLEAR(clear_module_state->__pyx_n_s_volume);
  Py_CLEAR(clear_module_state->__pyx_n_s_wait);
  Py_CLEAR(clear_module_state->__pyx_n_s_warning);
  Py_CLEAR(clear_module_state->__pyx_n_s_workers);
  Py_CLEAR(clear_module_state->__pyx_n_s_x);
  Py_CLEAR(clear_module_state->__pyx_kp_s_xx);
  Py_CLEAR(clear_module_state->__pyx_n_s_year);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_list);
  Py_CLEAR(clear_module_state->__pyx_n_s_year_stock_data);
  Py_CLEAR(clear_module_state->__pyx_n_s_zip);
  Py_CLEAR(clear_module_state->__pyx_float_1_0);
  Py_CLEAR(clear_module_state->__pyx_float_0_01);
  Py_CLEAR(clear_module_state->__pyx_float_10_0);
  Py_CLEAR(clear_module_state->__pyx_float_100_0);
  Py_CLEAR(clear_module_state->__pyx_int_0);
  Py_CLEAR(clear_module_state->__pyx_int_1);
  Py_CLEAR(clear_module_state->__pyx_int_2);
  Py_CLEAR(clear_module_state->__pyx_int_4);
  Py_CLEAR(clear_module_state->__pyx_int_5);
  Py_CLEAR(clear_module_state->__pyx_int_6);
  Py_CLEAR(clear_module_state->__pyx_int_10);
  Py_CLEAR(clear_module_state->__pyx_int_12);
  Py_CLEAR(clear_module_state->__pyx_int_100);
  Py_CLEAR(clear_module_state->__pyx_int_1900);
  Py_CLEAR(clear_module_state->__pyx_int_2100);
  Py_CLEAR(clear_module_state->__pyx_int_neg_1);
  Py_CLEAR(clear_module_state->__pyx_tuple__6);
  Py_CLEAR(clear_module_state->__pyx_tuple__7);
  Py_CLEAR(clear_module_state->__pyx_slice__37);
  Py_CLEAR(clear_module_state->__pyx_slice__53);
  Py_CLEAR(clear_module_state->__pyx_slice__55);
  Py_CLEAR(clear_module_state->__pyx_slice__56);
  Py_CLEAR(clear_module_state->__pyx_slice__57);
  Py_CLEAR(clear_module_state->__pyx_tuple__12);
  Py_CLEAR(clear_module_state->__pyx_tuple__14);
  Py_CLEAR(clear_module_state->__pyx_tuple__16);
  Py_CLEAR(clear_module_state->__pyx_tuple__20);
  Py_CLEAR(clear_module_state->__pyx_tuple__23);
  Py_CLEAR(clear_module_state->__pyx_tuple__25);
  Py_CLEAR(clear_module_state->__pyx_tuple__26);
  Py_CLEAR(clear_module_state->__pyx_tuple__27);
  Py_CLEAR(clear_module_state->__pyx_tuple__28);
  Py_CLEAR(clear_module_state->__pyx_tuple__29);
  Py_CLEAR(clear_module_state->__pyx_tuple__34);
  Py_CLEAR(clear_module_state->__pyx_tuple__38);
  Py_CLEAR(clear_module_state->__pyx_tuple__40);
  Py_CLEAR(clear_module_state->__pyx_tuple__41);
  Py_CLEAR(clear_module_state->__pyx_tuple__43);
  Py_CLEAR(clear_module_state->__pyx_tuple__52);
  Py_CLEAR(clear_module_state->__pyx_tuple__58);
  Py_CLEAR(clear_module_state->__pyx_tuple__59);
  Py_CLEAR(clear_module_state->__pyx_tuple__68);
  Py_CLEAR(clear_module_state->__pyx_tuple__70);
  Py_CLEAR(clear_module_state->__pyx_tuple__73);
  Py_CLEAR(clear_module_state->__pyx_tuple__75);
  Py_CLEAR(clear_module_state->__pyx_tuple__77);
  Py_CLEAR(clear_module_state->__pyx_tuple__79);
  Py_CLEAR(clear_module_state->__pyx_tuple__81);
  Py_CLEAR(clear_module_state->__pyx_tuple__83);
  Py_CLEAR(clear_module_state->__pyx_tuple__85);
  Py_CLEAR(clear_module_state->__pyx_tuple__92);
  Py_CLEAR(clear_module_state->__pyx_tuple__95);
  Py_CLEAR(clear_module_state->__pyx_tuple__96);
  Py_CLEAR(clear_module_state->__pyx_tuple__97);
  Py_CLEAR(clear_module_state->__pyx_tuple__98);
  Py_CLEAR(clear_module_state->__pyx_tuple__99);
  Py_CLEAR(clear_module_state->__pyx_tuple__100);
  Py_CLEAR(clear_module_state->__pyx_tuple__102);
  Py_CLEAR(clear_module_state->__pyx_tuple__103);
  Py_CLEAR(clear_module_state->__pyx_tuple__105);
  Py_CLEAR(clear_module_state->__pyx_tuple__107);
  Py_CLEAR(clear_module_state->__pyx_tuple__108);
  Py_CLEAR(clear_module_state->__pyx_tuple__110);
  Py_CLEAR(clear_module_state->__pyx_tuple__111);
  Py_CLEAR(clear_module_state->__pyx_tuple__113);
  Py_CLEAR(clear_module_state->__pyx_tuple__114);
  Py_CLEAR(clear_module_state->__pyx_tuple__116);
  Py_CLEAR(clear_module_state->__pyx_tuple__118);
  Py_CLEAR(clear_module_state->__pyx_tuple__119);
  Py_CLEAR(clear_module_state->__pyx_tuple__121);
  Py_CLEAR(clear_module_state->__pyx_tuple__122);
  Py_CLEAR(clear_module_state->__pyx_tuple__124);
  Py_CLEAR(clear_module_state->__pyx_tuple__125);
  Py_CLEAR(clear_module_state->__pyx_tuple__127);
  Py_CLEAR(clear_module_state->__pyx_tuple__130);
  Py_CLEAR(clear_module_state->__pyx_tuple__132);
  Py_CLEAR(clear_module_state->__pyx_tuple__134);
  Py_CLEAR(clear_module_state->__pyx_tuple__136);
  Py_CLEAR(clear_module_state->__pyx_tuple__138);
  Py_CLEAR(clear_module_state->__pyx_tuple__140);
  Py_CLEAR(clear_module_state->__pyx_tuple__142);
  Py_CLEAR(clear_module_state->__pyx_tuple__143);
  Py_CLEAR(clear_module_state->__pyx_tuple__145);
  Py_CLEAR(clear_module_state->__pyx_tuple__146);
  Py_CLEAR(clear_module_state->__pyx_tuple__148);
  Py_CLEAR(clear_module_state->__pyx_tuple__150);
  Py_CLEAR(clear_module_state->__pyx_tuple__151);
  Py_CLEAR(clear_module_state->__pyx_tuple__153);
  Py_CLEAR(clear_module_state->__pyx_tuple__156);
  Py_CLEAR(clear_module_state->__pyx_tuple__158);
  Py_CLEAR(clear_module_state->__pyx_tuple__159);
  Py_CLEAR(clear_module_state->__pyx_tuple__161);
  Py_CLEAR(clear_module_state->__pyx_tuple__163);
  Py_CLEAR(clear_module_state->__pyx_tuple__164);
  Py_CLEAR(clear_module_state->__pyx_tuple__166);
  Py_CLEAR(clear_module_state->__pyx_tuple__167);
  Py_CLEAR(clear_module_state->__pyx_tuple__169);
  Py_CLEAR(clear_module_state->__pyx_tuple__171);
  Py_CLEAR(clear_module_state->__pyx_tuple__173);
  Py_CLEAR(clear_module_state->__pyx_tuple__175);
  Py_CLEAR(clear_module_state->__pyx_codeobj__24);
  Py_CLEAR(clear_module_state->__pyx_codeobj__69);
  Py_CLEAR(clear_module_state->__pyx_codeobj__74);
  Py_CLEAR(clear_module_state->__pyx_codeobj__78);
  Py_CLEAR(clear_module_state->__pyx_codeobj__80);
  Py_CLEAR(clear_module_state->__pyx_codeobj__82);
  Py_CLEAR(clear_module_state->__pyx_codeobj__84);
  Py_CLEAR(clear_module_state->__pyx_codeobj__86);
  Py_CLEAR(clear_module_state->__pyx_codeobj__93);
  Py_CLEAR(clear_module_state->__pyx_codeobj__101);
  Py_CLEAR(clear_module_state->__pyx_codeobj__104);
  Py_CLEAR(clear_module_state->__pyx_codeobj__106);
  Py_CLEAR(clear_module_state->__pyx_codeobj__109);
  Py_CLEAR(clear_module_state->__pyx_codeobj__112);
  Py_CLEAR(clear_module_state->__pyx_codeobj__115);
  Py_CLEAR(clear_module_state->__pyx_codeobj__117);
  Py_CLEAR(clear_module_state->__pyx_codeobj__120);
  Py_CLEAR(clear_module_state->__pyx_codeobj__123);
  Py_CLEAR(clear_module_state->__pyx_codeobj__126);
  Py_CLEAR(clear_module_state->__pyx_codeobj__128);
  Py_CLEAR(clear_module_state->__pyx_codeobj__129);
  Py_CLEAR(clear_module_state->__pyx_codeobj__131);
  Py_CLEAR(clear_module_state->__pyx_codeobj__133);
  Py_CLEAR(clear_module_state->__pyx_codeobj__135);
  Py_CLEAR(clear_module_state->__pyx_codeobj__137);
  Py_CLEAR(clear_module_state->__pyx_codeobj__139);
  Py_CLEAR(clear_module_state->__pyx_codeobj__141);
  Py_CLEAR(clear_module_state->__pyx_codeobj__144);
  Py_CLEAR(clear_module_state->__pyx_codeobj__147);
  Py_CLEAR(clear_module_state->__pyx_codeobj__149);
  Py_CLEAR(clear_module_state->__pyx_codeobj__152);
  Py_CLEAR(clear_module_state->__pyx_codeobj__154);
  Py_CLEAR(clear_module_state->__pyx_codeobj__155);
  Py_CLEAR(clear_module_state->__pyx_codeobj__157);
  Py_CLEAR(clear_module_state->__pyx_codeobj__160);
  Py_CLEAR(clear_module_state->__pyx_codeobj__162);
  Py_CLEAR(clear_module_state->__pyx_codeobj__165);
  Py_CLEAR(clear_module_state->__pyx_codeobj__168);
  Py_CLEAR(clear_module_state->__pyx_codeobj__170);
  Py_CLEAR(clear_module_state->__pyx_codeobj__172);
  Py_CLEAR(clear_module_state->__pyx_codeobj__174);
  Py_CLEAR(clear_module_state->__pyx_codeobj__176);
  return 0;
}
#endif
/* #### Code section: module_state_traverse ### */
#if CYTHON_USE_MODULE_STATE
static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
  __pyx_mstate *traverse_module_state = __pyx_mstate(m);
  if (!traverse_module_state) return 0;
  Py_VISIT(traverse_module_state->__pyx_d);
  Py_VISIT(traverse_module_state->__pyx_b);
  Py_VISIT(traverse_module_state->__pyx_cython_runtime);
  Py_VISIT(traverse_module_state->__pyx_empty_tuple);
  Py_VISIT(traverse_module_state->__pyx_empty_bytes);
  Py_VISIT(traverse_module_state->__pyx_empty_unicode);
  #ifdef __Pyx_CyFunction_USED
  Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
  #endif
  #ifdef __Pyx_FusedFunction_USED
  Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
  #endif
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_kp_s_);
  Py_VISIT(traverse_module_state->__pyx_kp_s_0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20180101);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20240503);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20240530);
  Py_VISIT(traverse_module_state->__pyx_kp_s_20241230);
  Py_VISIT(traverse_module_state->__pyx_kp_s_3);
  Py_VISIT(traverse_module_state->__pyx_kp_s_300416);
  Py_VISIT(traverse_module_state->__pyx_kp_s_600096);
  Py_VISIT(traverse_module_state->__pyx_kp_s_689009);
  Py_VISIT(traverse_module_state->__pyx_n_s_A);
  Py_VISIT(traverse_module_state->__pyx_n_s_B);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Beginning);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Call_bs_query_history_k_data_plu);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataFrame);
  Py_VISIT(traverse_module_state->__pyx_kp_u_DataFrame_result_day_data_is_emp);
  Py_VISIT(traverse_module_state->__pyx_kp_s_DataToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql___init);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_dumpJsonToFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_fixTradeDayNullValue);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_func_concept);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_func_industry);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_getFqFactorByDividen);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_getSuspendedStocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateFutureTradeDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateFutureTradeDay_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateIndexTradeDayT);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateIndexTradeDayT_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateKzzBasicInfoTo);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateRzrqHsgtTradeD);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateSingleStockDiv);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateSingleStockFqF);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockBasicInfo_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockConceptIn);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockDividendI);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockFinancial);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockFinancial_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockFqFactorT);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockHoldNumbe);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockHoldNumbe_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_3);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_4);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryC_5);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockIndustryI);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockSimpleInf);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockTradeDayI);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStockTradeDayI_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_DataToMysql_updateStrategyDict);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Data_failed_save_in);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Don_t_need_to_update);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_date_is);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_futures_main_s);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_board_c);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_board_h);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_bs_query_history);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_sdc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_sdc_stock);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_stock_finance_mf);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_stock_finance_mfd);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_to_updateSingleStockBasic);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Failed_update);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Fq_factor_of);
  Py_VISIT(traverse_module_state->__pyx_n_s_JR0);
  Py_VISIT(traverse_module_state->__pyx_n_s_LR0);
  Py_VISIT(traverse_module_state->__pyx_n_s_NaT);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Need_update_stock_concept_basic);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Need_update_stock_industry_basic);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Need_update_stock_simple_info_fi);
  Py_VISIT(traverse_module_state->__pyx_n_s_ProcessPoolExecutor);
  Py_VISIT(traverse_module_state->__pyx_n_s_RI0);
  Py_VISIT(traverse_module_state->__pyx_kp_u_StockTradeDayInfo_of);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Succeed_save_in);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Succeed_to_call_getFqFactorByDiv);
  Py_VISIT(traverse_module_state->__pyx_kp_u_Succeed_update);
  Py_VISIT(traverse_module_state->__pyx_kp_u_The);
  Py_VISIT(traverse_module_state->__pyx_kp_u_There_is_not_new_stocks_to_updat);
  Py_VISIT(traverse_module_state->__pyx_n_s_ThreadPoolExecutor);
  Py_VISIT(traverse_module_state->__pyx_kp_u_TradeDayInfo_of);
  Py_VISIT(traverse_module_state->__pyx_kp_u_TradeDayInfo_of_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
  Py_VISIT(traverse_module_state->__pyx_n_s_WH0);
  Py_VISIT(traverse_module_state->__pyx_kp_s_XX);
  Py_VISIT(traverse_module_state->__pyx_kp_s_Y_m_d);
  Py_VISIT(traverse_module_state->__pyx_kp_s__10);
  Py_VISIT(traverse_module_state->__pyx_kp_s__11);
  Py_VISIT(traverse_module_state->__pyx_kp_s__13);
  Py_VISIT(traverse_module_state->__pyx_kp_s__15);
  Py_VISIT(traverse_module_state->__pyx_kp_s__17);
  Py_VISIT(traverse_module_state->__pyx_n_s__177);
  Py_VISIT(traverse_module_state->__pyx_kp_s__18);
  Py_VISIT(traverse_module_state->__pyx_kp_s__19);
  Py_VISIT(traverse_module_state->__pyx_kp_s__2);
  Py_VISIT(traverse_module_state->__pyx_kp_s__21);
  Py_VISIT(traverse_module_state->__pyx_kp_u__21);
  Py_VISIT(traverse_module_state->__pyx_kp_u__22);
  Py_VISIT(traverse_module_state->__pyx_kp_s__3);
  Py_VISIT(traverse_module_state->__pyx_kp_s__30);
  Py_VISIT(traverse_module_state->__pyx_kp_s__31);
  Py_VISIT(traverse_module_state->__pyx_kp_s__32);
  Py_VISIT(traverse_module_state->__pyx_kp_s__33);
  Py_VISIT(traverse_module_state->__pyx_kp_s__35);
  Py_VISIT(traverse_module_state->__pyx_kp_s__36);
  Py_VISIT(traverse_module_state->__pyx_kp_s__39);
  Py_VISIT(traverse_module_state->__pyx_kp_s__4);
  Py_VISIT(traverse_module_state->__pyx_kp_s__42);
  Py_VISIT(traverse_module_state->__pyx_kp_s__44);
  Py_VISIT(traverse_module_state->__pyx_kp_s__45);
  Py_VISIT(traverse_module_state->__pyx_kp_s__46);
  Py_VISIT(traverse_module_state->__pyx_kp_s__47);
  Py_VISIT(traverse_module_state->__pyx_kp_s__48);
  Py_VISIT(traverse_module_state->__pyx_kp_s__49);
  Py_VISIT(traverse_module_state->__pyx_kp_u__5);
  Py_VISIT(traverse_module_state->__pyx_kp_s__50);
  Py_VISIT(traverse_module_state->__pyx_kp_s__51);
  Py_VISIT(traverse_module_state->__pyx_kp_s__54);
  Py_VISIT(traverse_module_state->__pyx_kp_s__60);
  Py_VISIT(traverse_module_state->__pyx_kp_s__61);
  Py_VISIT(traverse_module_state->__pyx_kp_s__62);
  Py_VISIT(traverse_module_state->__pyx_kp_s__63);
  Py_VISIT(traverse_module_state->__pyx_kp_s__64);
  Py_VISIT(traverse_module_state->__pyx_kp_s__65);
  Py_VISIT(traverse_module_state->__pyx_kp_s__66);
  Py_VISIT(traverse_module_state->__pyx_n_s__67);
  Py_VISIT(traverse_module_state->__pyx_kp_s__71);
  Py_VISIT(traverse_module_state->__pyx_kp_s__72);
  Py_VISIT(traverse_module_state->__pyx_kp_s__76);
  Py_VISIT(traverse_module_state->__pyx_kp_s__8);
  Py_VISIT(traverse_module_state->__pyx_kp_s__87);
  Py_VISIT(traverse_module_state->__pyx_kp_s__88);
  Py_VISIT(traverse_module_state->__pyx_kp_s__89);
  Py_VISIT(traverse_module_state->__pyx_kp_s__9);
  Py_VISIT(traverse_module_state->__pyx_kp_s__90);
  Py_VISIT(traverse_module_state->__pyx_kp_s__91);
  Py_VISIT(traverse_module_state->__pyx_n_s__94);
  Py_VISIT(traverse_module_state->__pyx_n_s_adjust);
  Py_VISIT(traverse_module_state->__pyx_n_s_adjustflag);
  Py_VISIT(traverse_module_state->__pyx_n_s_ak);
  Py_VISIT(traverse_module_state->__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret);
  Py_VISIT(traverse_module_state->__pyx_n_s_akshare);
  Py_VISIT(traverse_module_state->__pyx_kp_u_akshare_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_all);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_stock_simple_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_all_succeed);
  Py_VISIT(traverse_module_state->__pyx_n_s_amount);
  Py_VISIT(traverse_module_state->__pyx_n_s_api);
  Py_VISIT(traverse_module_state->__pyx_n_s_append);
  Py_VISIT(traverse_module_state->__pyx_n_s_apply);
  Py_VISIT(traverse_module_state->__pyx_n_s_as_completed);
  Py_VISIT(traverse_module_state->__pyx_n_s_ascending);
  Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
  Py_VISIT(traverse_module_state->__pyx_n_s_axis);
  Py_VISIT(traverse_module_state->__pyx_n_s_baostock);
  Py_VISIT(traverse_module_state->__pyx_kp_s_baostock_login_respond_error_cod);
  Py_VISIT(traverse_module_state->__pyx_kp_s_baostock_login_respond_error_msg);
  Py_VISIT(traverse_module_state->__pyx_kp_u_baostock_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_basic_info_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_basic_info_table_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_bool);
  Py_VISIT(traverse_module_state->__pyx_kp_s_bool_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_bs);
  Py_VISIT(traverse_module_state->__pyx_n_s_by);
  Py_VISIT(traverse_module_state->__pyx_n_s_capital_reserve_ps);
  Py_VISIT(traverse_module_state->__pyx_n_s_cash_dividend_ps);
  Py_VISIT(traverse_module_state->__pyx_n_s_cash_dividends);
  Py_VISIT(traverse_module_state->__pyx_n_s_check_serializability);
  Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
  Py_VISIT(traverse_module_state->__pyx_n_s_clearTableContent);
  Py_VISIT(traverse_module_state->__pyx_n_s_clearTableContentByCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
  Py_VISIT(traverse_module_state->__pyx_n_s_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_co_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_cocept_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_code);
  Py_VISIT(traverse_module_state->__pyx_kp_u_code_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_code_is);
  Py_VISIT(traverse_module_state->__pyx_n_s_code_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_coerce);
  Py_VISIT(traverse_module_state->__pyx_n_s_cols);
  Py_VISIT(traverse_module_state->__pyx_n_s_cols_to_convert);
  Py_VISIT(traverse_module_state->__pyx_n_s_columns);
  Py_VISIT(traverse_module_state->__pyx_n_s_combined_codes);
  Py_VISIT(traverse_module_state->__pyx_n_s_commit);
  Py_VISIT(traverse_module_state->__pyx_n_s_con);
  Py_VISIT(traverse_module_state->__pyx_n_s_concat);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_cons_stocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_history_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_concept_trade_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_concurrent_futures);
  Py_VISIT(traverse_module_state->__pyx_n_s_cons_stocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_copy);
  Py_VISIT(traverse_module_state->__pyx_n_s_create_engine_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_cumprod);
  Py_VISIT(traverse_module_state->__pyx_n_s_current_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_d);
  Py_VISIT(traverse_module_state->__pyx_n_s_daily);
  Py_VISIT(traverse_module_state->__pyx_n_s_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataAcquisition);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataManagement);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataPreprocess);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_dict);
  Py_VISIT(traverse_module_state->__pyx_kp_u_data_has_not_update_from_networ);
  Py_VISIT(traverse_module_state->__pyx_kp_u_data_is_wrong_in);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_data_to_mysql);
  Py_VISIT(traverse_module_state->__pyx_kp_u_data_wrong_in);
  Py_VISIT(traverse_module_state->__pyx_n_s_dataproc);
  Py_VISIT(traverse_module_state->__pyx_n_s_date);
  Py_VISIT(traverse_module_state->__pyx_kp_s_date_code_open_high_low_close_pr);
  Py_VISIT(traverse_module_state->__pyx_n_s_date_data_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_default_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_delete);
  Py_VISIT(traverse_module_state->__pyx_n_s_delist_stock_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_desc);
  Py_VISIT(traverse_module_state->__pyx_n_s_desc_name);
  Py_VISIT(traverse_module_state->__pyx_kp_u_detail_for_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_diff_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_disable);
  Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
  Py_VISIT(traverse_module_state->__pyx_n_s_dispose);
  Py_VISIT(traverse_module_state->__pyx_kp_u_dividend_data_failed_save_in);
  Py_VISIT(traverse_module_state->__pyx_n_s_dividend_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_dividend_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_dividend_text);
  Py_VISIT(traverse_module_state->__pyx_n_s_dividend_yield);
  Py_VISIT(traverse_module_state->__pyx_n_s_doc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_dont_need_to_update);
  Py_VISIT(traverse_module_state->__pyx_kp_u_dont_need_to_update_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_drop);
  Py_VISIT(traverse_module_state->__pyx_n_s_dt);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_dtype_mapping);
  Py_VISIT(traverse_module_state->__pyx_n_s_dumpJsonToFile);
  Py_VISIT(traverse_module_state->__pyx_n_s_dump_json_period);
  Py_VISIT(traverse_module_state->__pyx_n_s_e);
  Py_VISIT(traverse_module_state->__pyx_n_s_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_empty);
  Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
  Py_VISIT(traverse_module_state->__pyx_n_s_end);
  Py_VISIT(traverse_module_state->__pyx_n_s_end_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_end_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_engine);
  Py_VISIT(traverse_module_state->__pyx_n_s_enter);
  Py_VISIT(traverse_module_state->__pyx_n_s_eps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_err_is);
  Py_VISIT(traverse_module_state->__pyx_n_s_error);
  Py_VISIT(traverse_module_state->__pyx_kp_u_error_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_error_msg);
  Py_VISIT(traverse_module_state->__pyx_n_s_errors);
  Py_VISIT(traverse_module_state->__pyx_n_s_ex_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_exclude_future_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_exclude_future_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_executor);
  Py_VISIT(traverse_module_state->__pyx_n_s_exit);
  Py_VISIT(traverse_module_state->__pyx_n_s_extractAdministrativeRegions);
  Py_VISIT(traverse_module_state->__pyx_n_s_f_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_failed_list);
  Py_VISIT(traverse_module_state->__pyx_kp_u_failed_to_save_in_tables_err_is);
  Py_VISIT(traverse_module_state->__pyx_n_s_fhsz_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_fields);
  Py_VISIT(traverse_module_state->__pyx_n_s_fillna);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter);
  Py_VISIT(traverse_module_state->__pyx_n_s_filter_by);
  Py_VISIT(traverse_module_state->__pyx_kp_u_financial_data_failed_save_in);
  Py_VISIT(traverse_module_state->__pyx_kp_u_finished);
  Py_VISIT(traverse_module_state->__pyx_n_s_first);
  Py_VISIT(traverse_module_state->__pyx_n_s_first_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_fixTradeDayNullValue);
  Py_VISIT(traverse_module_state->__pyx_kp_u_for_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_fq_factor_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_fq_factor_origin);
  Py_VISIT(traverse_module_state->__pyx_n_s_fq_row_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_fq_row_date_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_frequency);
  Py_VISIT(traverse_module_state->__pyx_n_s_fun_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_func);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_concept);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_func_industry);
  Py_VISIT(traverse_module_state->__pyx_n_s_future);
  Py_VISIT(traverse_module_state->__pyx_kp_s_futureCodeNames_csv);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_code_name_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_future_no_silent_downcasting);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_trade_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_future_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_futures);
  Py_VISIT(traverse_module_state->__pyx_n_s_futures_main_sina);
  Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
  Py_VISIT(traverse_module_state->__pyx_n_s_getConceptStockCodes);
  Py_VISIT(traverse_module_state->__pyx_n_s_getFqFactorByDividend);
  Py_VISIT(traverse_module_state->__pyx_n_s_getFullStockCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndexCodeName);
  Py_VISIT(traverse_module_state->__pyx_n_s_getIndustryConceptConsText);
  Py_VISIT(traverse_module_state->__pyx_n_s_getSingleIndustryConceptTradeDay);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockFqfactorInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_getStockSimpleInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_getSuspendedStocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_row_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_get_table_columns);
  Py_VISIT(traverse_module_state->__pyx_n_s_getframe);
  Py_VISIT(traverse_module_state->__pyx_n_s_has_update_file);
  Py_VISIT(traverse_module_state->__pyx_kp_u_has_updated);
  Py_VISIT(traverse_module_state->__pyx_n_s_hfq_factor);
  Py_VISIT(traverse_module_state->__pyx_kp_s_hfq_factor_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_high);
  Py_VISIT(traverse_module_state->__pyx_kp_u_history);
  Py_VISIT(traverse_module_state->__pyx_n_s_how);
  Py_VISIT(traverse_module_state->__pyx_n_s_hsgt_history);
  Py_VISIT(traverse_module_state->__pyx_n_s_hsgt_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_i);
  Py_VISIT(traverse_module_state->__pyx_n_s_id);
  Py_VISIT(traverse_module_state->__pyx_n_s_if_exists);
  Py_VISIT(traverse_module_state->__pyx_n_s_ignore_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_iloc);
  Py_VISIT(traverse_module_state->__pyx_n_s_import);
  Py_VISIT(traverse_module_state->__pyx_n_s_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_code_name_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_trade_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_index_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_cons_stocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_or_concept_cons_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_or_concept_hist_em_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_industry_or_concept_name_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_inf);
  Py_VISIT(traverse_module_state->__pyx_n_s_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_init);
  Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
  Py_VISIT(traverse_module_state->__pyx_n_s_inner);
  Py_VISIT(traverse_module_state->__pyx_n_s_inplace);
  Py_VISIT(traverse_module_state->__pyx_n_s_insert);
  Py_VISIT(traverse_module_state->__pyx_n_s_ipo_time);
  Py_VISIT(traverse_module_state->__pyx_n_s_is);
  Py_VISIT(traverse_module_state->__pyx_n_s_isAPrimaryBoardStock);
  Py_VISIT(traverse_module_state->__pyx_kp_u_is_Empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_datetime64_any_dtype);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_delist);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_hsgt);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_margin);
  Py_VISIT(traverse_module_state->__pyx_kp_u_is_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_null_ex_data_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_null_ex_data_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_primary);
  Py_VISIT(traverse_module_state->__pyx_n_s_is_session);
  Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
  Py_VISIT(traverse_module_state->__pyx_n_s_isin);
  Py_VISIT(traverse_module_state->__pyx_n_s_isna);
  Py_VISIT(traverse_module_state->__pyx_kp_u_it_has_been_suspended);
  Py_VISIT(traverse_module_state->__pyx_n_s_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_items);
  Py_VISIT(traverse_module_state->__pyx_n_s_iterrows);
  Py_VISIT(traverse_module_state->__pyx_n_s_join);
  Py_VISIT(traverse_module_state->__pyx_n_s_json_file_name);
  Py_VISIT(traverse_module_state->__pyx_kp_s_k);
  Py_VISIT(traverse_module_state->__pyx_n_s_key);
  Py_VISIT(traverse_module_state->__pyx_n_s_key_products);
  Py_VISIT(traverse_module_state->__pyx_n_s_keys);
  Py_VISIT(traverse_module_state->__pyx_n_s_kzz_basic_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_kzz_basic_info_dataframe);
  Py_VISIT(traverse_module_state->__pyx_n_s_kzz_basic_info_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_latest_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_lg);
  Py_VISIT(traverse_module_state->__pyx_n_s_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadJsonData);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadTable);
  Py_VISIT(traverse_module_state->__pyx_n_s_loadTableContentByCode);
  Py_VISIT(traverse_module_state->__pyx_n_s_load_json_file);
  Py_VISIT(traverse_module_state->__pyx_n_s_loc);
  Py_VISIT(traverse_module_state->__pyx_n_s_local_engine);
  Py_VISIT(traverse_module_state->__pyx_n_s_local_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_logger);
  Py_VISIT(traverse_module_state->__pyx_n_s_login);
  Py_VISIT(traverse_module_state->__pyx_n_s_logout);
  Py_VISIT(traverse_module_state->__pyx_n_s_low);
  Py_VISIT(traverse_module_state->__pyx_n_s_main);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_business);
  Py_VISIT(traverse_module_state->__pyx_n_s_main_fina_data_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_match_index);
  Py_VISIT(traverse_module_state->__pyx_n_s_max);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_date_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_date_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_date_row_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_date_table);
  Py_VISIT(traverse_module_state->__pyx_n_s_max_workers);
  Py_VISIT(traverse_module_state->__pyx_kp_u_maybe_is_new_stock);
  Py_VISIT(traverse_module_state->__pyx_n_s_merge);
  Py_VISIT(traverse_module_state->__pyx_n_s_merged_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
  Py_VISIT(traverse_module_state->__pyx_n_s_method);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_date_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_date_em_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_date_sina);
  Py_VISIT(traverse_module_state->__pyx_n_s_min_date_sina_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_mininterval);
  Py_VISIT(traverse_module_state->__pyx_n_s_mode);
  Py_VISIT(traverse_module_state->__pyx_n_s_module);
  Py_VISIT(traverse_module_state->__pyx_n_s_mro_entries);
  Py_VISIT(traverse_module_state->__pyx_n_s_multi_thread);
  Py_VISIT(traverse_module_state->__pyx_n_s_multi_type);
  Py_VISIT(traverse_module_state->__pyx_n_s_mysql_table_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_A);
  Py_VISIT(traverse_module_state->__pyx_n_s_name_B);
  Py_VISIT(traverse_module_state->__pyx_n_s_nan);
  Py_VISIT(traverse_module_state->__pyx_kp_u_need_to_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_need_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_data_fist_date_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_order);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_record);
  Py_VISIT(traverse_module_state->__pyx_n_s_new_stocks);
  Py_VISIT(traverse_module_state->__pyx_n_s_next);
  Py_VISIT(traverse_module_state->__pyx_n_s_next_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_no_fault);
  Py_VISIT(traverse_module_state->__pyx_n_s_non_serializable_attrs);
  Py_VISIT(traverse_module_state->__pyx_kp_u_not_in_stock_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_np);
  Py_VISIT(traverse_module_state->__pyx_n_s_null_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_null_rows);
  Py_VISIT(traverse_module_state->__pyx_kp_s_null_value_row_id_d_row_date_s_r);
  Py_VISIT(traverse_module_state->__pyx_n_s_numpy);
  Py_VISIT(traverse_module_state->__pyx_n_s_object);
  Py_VISIT(traverse_module_state->__pyx_n_s_on);
  Py_VISIT(traverse_module_state->__pyx_n_s_open);
  Py_VISIT(traverse_module_state->__pyx_n_s_open_interest);
  Py_VISIT(traverse_module_state->__pyx_n_s_order_by);
  Py_VISIT(traverse_module_state->__pyx_n_s_origin_factor);
  Py_VISIT(traverse_module_state->__pyx_n_s_outstand_share);
  Py_VISIT(traverse_module_state->__pyx_n_s_pandas);
  Py_VISIT(traverse_module_state->__pyx_kp_u_pandas_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_pd);
  Py_VISIT(traverse_module_state->__pyx_n_s_period);
  Py_VISIT(traverse_module_state->__pyx_n_s_pop);
  Py_VISIT(traverse_module_state->__pyx_n_s_pre_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_pre_close_first);
  Py_VISIT(traverse_module_state->__pyx_n_s_preclose);
  Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
  Py_VISIT(traverse_module_state->__pyx_n_s_print);
  Py_VISIT(traverse_module_state->__pyx_n_s_process);
  Py_VISIT(traverse_module_state->__pyx_n_s_province);
  Py_VISIT(traverse_module_state->__pyx_n_s_qfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_qfq_close);
  Py_VISIT(traverse_module_state->__pyx_n_s_qfq_factor);
  Py_VISIT(traverse_module_state->__pyx_kp_s_qfq_factor_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
  Py_VISIT(traverse_module_state->__pyx_n_s_quarter);
  Py_VISIT(traverse_module_state->__pyx_n_s_query);
  Py_VISIT(traverse_module_state->__pyx_n_s_query_history_k_data_plus);
  Py_VISIT(traverse_module_state->__pyx_n_s_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_read_csv);
  Py_VISIT(traverse_module_state->__pyx_n_s_remove);
  Py_VISIT(traverse_module_state->__pyx_n_s_rename);
  Py_VISIT(traverse_module_state->__pyx_n_s_rename_stock_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_replace);
  Py_VISIT(traverse_module_state->__pyx_n_s_report);
  Py_VISIT(traverse_module_state->__pyx_n_s_report_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_res);
  Py_VISIT(traverse_module_state->__pyx_n_s_res_fq);
  Py_VISIT(traverse_module_state->__pyx_n_s_restoration_price_hfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_restoration_price_qfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_result);
  Py_VISIT(traverse_module_state->__pyx_n_s_result_day_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_return);
  Py_VISIT(traverse_module_state->__pyx_n_s_reversed);
  Py_VISIT(traverse_module_state->__pyx_n_s_round);
  Py_VISIT(traverse_module_state->__pyx_n_s_row);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_index1);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_index2);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_indice);
  Py_VISIT(traverse_module_state->__pyx_n_s_row_qfq_factor);
  Py_VISIT(traverse_module_state->__pyx_kp_u_row_qfq_factor_equal_zero_when);
  Py_VISIT(traverse_module_state->__pyx_n_s_rows);
  Py_VISIT(traverse_module_state->__pyx_n_s_rs);
  Py_VISIT(traverse_module_state->__pyx_n_s_rzrq);
  Py_VISIT(traverse_module_state->__pyx_n_s_rzrq_history);
  Py_VISIT(traverse_module_state->__pyx_n_s_rzrq_trade_day);
  Py_VISIT(traverse_module_state->__pyx_kp_u_s);
  Py_VISIT(traverse_module_state->__pyx_n_s_saveHistTradeDayInfoBaostock);
  Py_VISIT(traverse_module_state->__pyx_n_s_saveHistTradeDayInfoEm);
  Py_VISIT(traverse_module_state->__pyx_n_s_saveHistTradeDayInfoSina);
  Py_VISIT(traverse_module_state->__pyx_n_s_scalar);
  Py_VISIT(traverse_module_state->__pyx_n_s_sdc);
  Py_VISIT(traverse_module_state->__pyx_kp_u_sdc_stock_fhps_detail_em_return);
  Py_VISIT(traverse_module_state->__pyx_n_s_self);
  Py_VISIT(traverse_module_state->__pyx_n_s_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_setTableColumnValue);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_set_option);
  Py_VISIT(traverse_module_state->__pyx_n_s_sh_calendar);
  Py_VISIT(traverse_module_state->__pyx_n_s_shape);
  Py_VISIT(traverse_module_state->__pyx_n_s_shift);
  Py_VISIT(traverse_module_state->__pyx_n_s_shutdown);
  Py_VISIT(traverse_module_state->__pyx_n_s_simple_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_simple_stock_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_sina);
  Py_VISIT(traverse_module_state->__pyx_n_s_single);
  Py_VISIT(traverse_module_state->__pyx_n_s_size);
  Py_VISIT(traverse_module_state->__pyx_kp_u_so_execute_delete_its_all_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_sort_values);
  Py_VISIT(traverse_module_state->__pyx_n_s_spec);
  Py_VISIT(traverse_module_state->__pyx_n_s_split);
  Py_VISIT(traverse_module_state->__pyx_n_s_splitDataframeByYear);
  Py_VISIT(traverse_module_state->__pyx_n_s_split_dict);
  Py_VISIT(traverse_module_state->__pyx_n_s_start);
  Py_VISIT(traverse_module_state->__pyx_n_s_startWithDigit);
  Py_VISIT(traverse_module_state->__pyx_n_s_start_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_start_time);
  Py_VISIT(traverse_module_state->__pyx_kp_u_stock);
  Py_VISIT(traverse_module_state->__pyx_n_s_stockDataCrawler);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_basic_info_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_concept_cons_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_concept_hist_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_concept_name_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_industry_cons_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_industry_hist_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_board_industry_name_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_code_back);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_concept_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_concept_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_dividend_info);
  Py_VISIT(traverse_module_state->__pyx_kp_u_stock_dividend_info_of);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_dividend_ps);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_dividends);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_fhps_detail_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_finance_mfd_quarter_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_finance_mfd_report_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_financial_quarter);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_financial_report);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_fq_factor);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_full_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_hold_number);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_hsgt_detail);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_hsgt_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_individual_info_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_individual_info_em_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_basic_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_concept_basic);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_concept_basic_inf);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_industry_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_info_a_code_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_item);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_len);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_name_new);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_query);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_rzrq_detail);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_rzrq_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_simple_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_simple_info);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tfp_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_tfp_em_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_to_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2018);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2019);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2020);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2021);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2022);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2023);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_2024);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_trade_day_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_daily);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_gdhs);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_gdhs_detail_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist_em_bfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist_sina_bfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist_sina_fq_factor);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist_sina_hfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_a_hist_sina_qfq);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zh_index_daily_em);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zyjs_ths);
  Py_VISIT(traverse_module_state->__pyx_n_s_stock_zyjs_ths_df);
  Py_VISIT(traverse_module_state->__pyx_n_s_stocks_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_strftime);
  Py_VISIT(traverse_module_state->__pyx_n_s_strptime);
  Py_VISIT(traverse_module_state->__pyx_n_s_submit);
  Py_VISIT(traverse_module_state->__pyx_n_s_succeed);
  Py_VISIT(traverse_module_state->__pyx_kp_u_succeed_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_suffixes);
  Py_VISIT(traverse_module_state->__pyx_n_s_super);
  Py_VISIT(traverse_module_state->__pyx_n_s_suspended_stock_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_symbol);
  Py_VISIT(traverse_module_state->__pyx_n_s_synchronize_session);
  Py_VISIT(traverse_module_state->__pyx_n_s_sys);
  Py_VISIT(traverse_module_state->__pyx_n_s_tableTools);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_base_name);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_code_name_first_date_prov);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_columns);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated_by_updat);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_has_been_updated_by_updat_2);
  Py_VISIT(traverse_module_state->__pyx_kp_u_table_industry_concept_is_margi);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_max_date_str);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_name);
  Py_VISIT(traverse_module_state->__pyx_n_s_table_name_year);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataAcquisition_models);
  Py_VISIT(traverse_module_state->__pyx_kp_s_tbstock_dataAcquisition_saveData);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataAcquisition_saveData_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataAcquisition_stockDat);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_dataManagement_dataPrepr);
  Py_VISIT(traverse_module_state->__pyx_n_s_tbstock_utils);
  Py_VISIT(traverse_module_state->__pyx_n_s_temp);
  Py_VISIT(traverse_module_state->__pyx_n_s_test);
  Py_VISIT(traverse_module_state->__pyx_n_s_test_2);
  Py_VISIT(traverse_module_state->__pyx_n_s_test_simple_code);
  Py_VISIT(traverse_module_state->__pyx_n_s_thread);
  Py_VISIT(traverse_module_state->__pyx_n_s_time);
  Py_VISIT(traverse_module_state->__pyx_kp_u_time_cost);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_datetime);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_numeric);
  Py_VISIT(traverse_module_state->__pyx_n_s_to_sql);
  Py_VISIT(traverse_module_state->__pyx_n_s_today_date);
  Py_VISIT(traverse_module_state->__pyx_n_s_total);
  Py_VISIT(traverse_module_state->__pyx_n_s_tqdm);
  Py_VISIT(traverse_module_state->__pyx_kp_u_trade_data_failed_to_save_in_ta);
  Py_VISIT(traverse_module_state->__pyx_kp_u_trade_day_data_failed_save_in);
  Py_VISIT(traverse_module_state->__pyx_kp_u_trade_day_data_is_empty);
  Py_VISIT(traverse_module_state->__pyx_n_s_tradestatus);
  Py_VISIT(traverse_module_state->__pyx_n_s_turn);
  Py_VISIT(traverse_module_state->__pyx_n_s_turn_over);
  Py_VISIT(traverse_module_state->__pyx_n_s_types);
  Py_VISIT(traverse_module_state->__pyx_n_s_unassign_profit_ps);
  Py_VISIT(traverse_module_state->__pyx_kp_u_update);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateFutureTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateIndexTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateKzzBasicInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateLib);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateRzrqHsgtTradeDayToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleFutureTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleIndexTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockBasicInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockDividendInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockFinancialData);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockFqFactor);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockHoldNumber);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockRzrqHsgtData);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateSingleStockTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockBasicInfoByIndustryCo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockBasicInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockConceptInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockDividendInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockFinancialToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockFqFactorToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockHoldNumberToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockIndustryConceptBasicI);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockIndustryConceptTradeD);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockIndustryInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockRzrqHsgtTradeDayToMys);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockSimpleInfoToMysql);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockTables);
  Py_VISIT(traverse_module_state->__pyx_kp_u_updateStockTables_time_cost);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStockTradeDayInfo);
  Py_VISIT(traverse_module_state->__pyx_n_s_updateStrategyDict);
  Py_VISIT(traverse_module_state->__pyx_kp_s_update_concept);
  Py_VISIT(traverse_module_state->__pyx_kp_u_update_concept_There_exist);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_db_logs_dir);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_dict);
  Py_VISIT(traverse_module_state->__pyx_kp_s_update_industry);
  Py_VISIT(traverse_module_state->__pyx_kp_u_update_industry_This);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_update_range);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated_concept);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated_industry);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_updated_list_index);
  Py_VISIT(traverse_module_state->__pyx_kp_s_updatelog_json);
  Py_VISIT(traverse_module_state->__pyx_n_s_utils);
  Py_VISIT(traverse_module_state->__pyx_n_s_value);
  Py_VISIT(traverse_module_state->__pyx_n_s_values);
  Py_VISIT(traverse_module_state->__pyx_n_s_version);
  Py_VISIT(traverse_module_state->__pyx_n_s_volume);
  Py_VISIT(traverse_module_state->__pyx_n_s_wait);
  Py_VISIT(traverse_module_state->__pyx_n_s_warning);
  Py_VISIT(traverse_module_state->__pyx_n_s_workers);
  Py_VISIT(traverse_module_state->__pyx_n_s_x);
  Py_VISIT(traverse_module_state->__pyx_kp_s_xx);
  Py_VISIT(traverse_module_state->__pyx_n_s_year);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_list);
  Py_VISIT(traverse_module_state->__pyx_n_s_year_stock_data);
  Py_VISIT(traverse_module_state->__pyx_n_s_zip);
  Py_VISIT(traverse_module_state->__pyx_float_1_0);
  Py_VISIT(traverse_module_state->__pyx_float_0_01);
  Py_VISIT(traverse_module_state->__pyx_float_10_0);
  Py_VISIT(traverse_module_state->__pyx_float_100_0);
  Py_VISIT(traverse_module_state->__pyx_int_0);
  Py_VISIT(traverse_module_state->__pyx_int_1);
  Py_VISIT(traverse_module_state->__pyx_int_2);
  Py_VISIT(traverse_module_state->__pyx_int_4);
  Py_VISIT(traverse_module_state->__pyx_int_5);
  Py_VISIT(traverse_module_state->__pyx_int_6);
  Py_VISIT(traverse_module_state->__pyx_int_10);
  Py_VISIT(traverse_module_state->__pyx_int_12);
  Py_VISIT(traverse_module_state->__pyx_int_100);
  Py_VISIT(traverse_module_state->__pyx_int_1900);
  Py_VISIT(traverse_module_state->__pyx_int_2100);
  Py_VISIT(traverse_module_state->__pyx_int_neg_1);
  Py_VISIT(traverse_module_state->__pyx_tuple__6);
  Py_VISIT(traverse_module_state->__pyx_tuple__7);
  Py_VISIT(traverse_module_state->__pyx_slice__37);
  Py_VISIT(traverse_module_state->__pyx_slice__53);
  Py_VISIT(traverse_module_state->__pyx_slice__55);
  Py_VISIT(traverse_module_state->__pyx_slice__56);
  Py_VISIT(traverse_module_state->__pyx_slice__57);
  Py_VISIT(traverse_module_state->__pyx_tuple__12);
  Py_VISIT(traverse_module_state->__pyx_tuple__14);
  Py_VISIT(traverse_module_state->__pyx_tuple__16);
  Py_VISIT(traverse_module_state->__pyx_tuple__20);
  Py_VISIT(traverse_module_state->__pyx_tuple__23);
  Py_VISIT(traverse_module_state->__pyx_tuple__25);
  Py_VISIT(traverse_module_state->__pyx_tuple__26);
  Py_VISIT(traverse_module_state->__pyx_tuple__27);
  Py_VISIT(traverse_module_state->__pyx_tuple__28);
  Py_VISIT(traverse_module_state->__pyx_tuple__29);
  Py_VISIT(traverse_module_state->__pyx_tuple__34);
  Py_VISIT(traverse_module_state->__pyx_tuple__38);
  Py_VISIT(traverse_module_state->__pyx_tuple__40);
  Py_VISIT(traverse_module_state->__pyx_tuple__41);
  Py_VISIT(traverse_module_state->__pyx_tuple__43);
  Py_VISIT(traverse_module_state->__pyx_tuple__52);
  Py_VISIT(traverse_module_state->__pyx_tuple__58);
  Py_VISIT(traverse_module_state->__pyx_tuple__59);
  Py_VISIT(traverse_module_state->__pyx_tuple__68);
  Py_VISIT(traverse_module_state->__pyx_tuple__70);
  Py_VISIT(traverse_module_state->__pyx_tuple__73);
  Py_VISIT(traverse_module_state->__pyx_tuple__75);
  Py_VISIT(traverse_module_state->__pyx_tuple__77);
  Py_VISIT(traverse_module_state->__pyx_tuple__79);
  Py_VISIT(traverse_module_state->__pyx_tuple__81);
  Py_VISIT(traverse_module_state->__pyx_tuple__83);
  Py_VISIT(traverse_module_state->__pyx_tuple__85);
  Py_VISIT(traverse_module_state->__pyx_tuple__92);
  Py_VISIT(traverse_module_state->__pyx_tuple__95);
  Py_VISIT(traverse_module_state->__pyx_tuple__96);
  Py_VISIT(traverse_module_state->__pyx_tuple__97);
  Py_VISIT(traverse_module_state->__pyx_tuple__98);
  Py_VISIT(traverse_module_state->__pyx_tuple__99);
  Py_VISIT(traverse_module_state->__pyx_tuple__100);
  Py_VISIT(traverse_module_state->__pyx_tuple__102);
  Py_VISIT(traverse_module_state->__pyx_tuple__103);
  Py_VISIT(traverse_module_state->__pyx_tuple__105);
  Py_VISIT(traverse_module_state->__pyx_tuple__107);
  Py_VISIT(traverse_module_state->__pyx_tuple__108);
  Py_VISIT(traverse_module_state->__pyx_tuple__110);
  Py_VISIT(traverse_module_state->__pyx_tuple__111);
  Py_VISIT(traverse_module_state->__pyx_tuple__113);
  Py_VISIT(traverse_module_state->__pyx_tuple__114);
  Py_VISIT(traverse_module_state->__pyx_tuple__116);
  Py_VISIT(traverse_module_state->__pyx_tuple__118);
  Py_VISIT(traverse_module_state->__pyx_tuple__119);
  Py_VISIT(traverse_module_state->__pyx_tuple__121);
  Py_VISIT(traverse_module_state->__pyx_tuple__122);
  Py_VISIT(traverse_module_state->__pyx_tuple__124);
  Py_VISIT(traverse_module_state->__pyx_tuple__125);
  Py_VISIT(traverse_module_state->__pyx_tuple__127);
  Py_VISIT(traverse_module_state->__pyx_tuple__130);
  Py_VISIT(traverse_module_state->__pyx_tuple__132);
  Py_VISIT(traverse_module_state->__pyx_tuple__134);
  Py_VISIT(traverse_module_state->__pyx_tuple__136);
  Py_VISIT(traverse_module_state->__pyx_tuple__138);
  Py_VISIT(traverse_module_state->__pyx_tuple__140);
  Py_VISIT(traverse_module_state->__pyx_tuple__142);
  Py_VISIT(traverse_module_state->__pyx_tuple__143);
  Py_VISIT(traverse_module_state->__pyx_tuple__145);
  Py_VISIT(traverse_module_state->__pyx_tuple__146);
  Py_VISIT(traverse_module_state->__pyx_tuple__148);
  Py_VISIT(traverse_module_state->__pyx_tuple__150);
  Py_VISIT(traverse_module_state->__pyx_tuple__151);
  Py_VISIT(traverse_module_state->__pyx_tuple__153);
  Py_VISIT(traverse_module_state->__pyx_tuple__156);
  Py_VISIT(traverse_module_state->__pyx_tuple__158);
  Py_VISIT(traverse_module_state->__pyx_tuple__159);
  Py_VISIT(traverse_module_state->__pyx_tuple__161);
  Py_VISIT(traverse_module_state->__pyx_tuple__163);
  Py_VISIT(traverse_module_state->__pyx_tuple__164);
  Py_VISIT(traverse_module_state->__pyx_tuple__166);
  Py_VISIT(traverse_module_state->__pyx_tuple__167);
  Py_VISIT(traverse_module_state->__pyx_tuple__169);
  Py_VISIT(traverse_module_state->__pyx_tuple__171);
  Py_VISIT(traverse_module_state->__pyx_tuple__173);
  Py_VISIT(traverse_module_state->__pyx_tuple__175);
  Py_VISIT(traverse_module_state->__pyx_codeobj__24);
  Py_VISIT(traverse_module_state->__pyx_codeobj__69);
  Py_VISIT(traverse_module_state->__pyx_codeobj__74);
  Py_VISIT(traverse_module_state->__pyx_codeobj__78);
  Py_VISIT(traverse_module_state->__pyx_codeobj__80);
  Py_VISIT(traverse_module_state->__pyx_codeobj__82);
  Py_VISIT(traverse_module_state->__pyx_codeobj__84);
  Py_VISIT(traverse_module_state->__pyx_codeobj__86);
  Py_VISIT(traverse_module_state->__pyx_codeobj__93);
  Py_VISIT(traverse_module_state->__pyx_codeobj__101);
  Py_VISIT(traverse_module_state->__pyx_codeobj__104);
  Py_VISIT(traverse_module_state->__pyx_codeobj__106);
  Py_VISIT(traverse_module_state->__pyx_codeobj__109);
  Py_VISIT(traverse_module_state->__pyx_codeobj__112);
  Py_VISIT(traverse_module_state->__pyx_codeobj__115);
  Py_VISIT(traverse_module_state->__pyx_codeobj__117);
  Py_VISIT(traverse_module_state->__pyx_codeobj__120);
  Py_VISIT(traverse_module_state->__pyx_codeobj__123);
  Py_VISIT(traverse_module_state->__pyx_codeobj__126);
  Py_VISIT(traverse_module_state->__pyx_codeobj__128);
  Py_VISIT(traverse_module_state->__pyx_codeobj__129);
  Py_VISIT(traverse_module_state->__pyx_codeobj__131);
  Py_VISIT(traverse_module_state->__pyx_codeobj__133);
  Py_VISIT(traverse_module_state->__pyx_codeobj__135);
  Py_VISIT(traverse_module_state->__pyx_codeobj__137);
  Py_VISIT(traverse_module_state->__pyx_codeobj__139);
  Py_VISIT(traverse_module_state->__pyx_codeobj__141);
  Py_VISIT(traverse_module_state->__pyx_codeobj__144);
  Py_VISIT(traverse_module_state->__pyx_codeobj__147);
  Py_VISIT(traverse_module_state->__pyx_codeobj__149);
  Py_VISIT(traverse_module_state->__pyx_codeobj__152);
  Py_VISIT(traverse_module_state->__pyx_codeobj__154);
  Py_VISIT(traverse_module_state->__pyx_codeobj__155);
  Py_VISIT(traverse_module_state->__pyx_codeobj__157);
  Py_VISIT(traverse_module_state->__pyx_codeobj__160);
  Py_VISIT(traverse_module_state->__pyx_codeobj__162);
  Py_VISIT(traverse_module_state->__pyx_codeobj__165);
  Py_VISIT(traverse_module_state->__pyx_codeobj__168);
  Py_VISIT(traverse_module_state->__pyx_codeobj__170);
  Py_VISIT(traverse_module_state->__pyx_codeobj__172);
  Py_VISIT(traverse_module_state->__pyx_codeobj__174);
  Py_VISIT(traverse_module_state->__pyx_codeobj__176);
  return 0;
}
#endif
/* #### Code section: module_state_defines ### */
#define __pyx_d __pyx_mstate_global->__pyx_d
#define __pyx_b __pyx_mstate_global->__pyx_b
#define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
#define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
#define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
#define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
#ifdef __Pyx_CyFunction_USED
#define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
#endif
#ifdef __Pyx_FusedFunction_USED
#define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
#endif
#ifdef __Pyx_Generator_USED
#define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
#endif
#ifdef __Pyx_IterableCoroutine_USED
#define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
#endif
#ifdef __Pyx_Coroutine_USED
#define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
#endif
#if CYTHON_USE_MODULE_STATE
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql
#define __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql __pyx_mstate_global->__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql
#endif
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql
#define __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql __pyx_mstate_global->__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql
#define __pyx_kp_s_ __pyx_mstate_global->__pyx_kp_s_
#define __pyx_kp_s_0 __pyx_mstate_global->__pyx_kp_s_0
#define __pyx_kp_s_20180101 __pyx_mstate_global->__pyx_kp_s_20180101
#define __pyx_kp_s_20240503 __pyx_mstate_global->__pyx_kp_s_20240503
#define __pyx_kp_s_20240530 __pyx_mstate_global->__pyx_kp_s_20240530
#define __pyx_kp_s_20241230 __pyx_mstate_global->__pyx_kp_s_20241230
#define __pyx_kp_s_3 __pyx_mstate_global->__pyx_kp_s_3
#define __pyx_kp_s_300416 __pyx_mstate_global->__pyx_kp_s_300416
#define __pyx_kp_s_600096 __pyx_mstate_global->__pyx_kp_s_600096
#define __pyx_kp_s_689009 __pyx_mstate_global->__pyx_kp_s_689009
#define __pyx_n_s_A __pyx_mstate_global->__pyx_n_s_A
#define __pyx_n_s_B __pyx_mstate_global->__pyx_n_s_B
#define __pyx_kp_u_Beginning __pyx_mstate_global->__pyx_kp_u_Beginning
#define __pyx_kp_u_Call_ak_stock_zh_a_daily_datafra __pyx_mstate_global->__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra
#define __pyx_kp_u_Call_bs_query_history_k_data_plu __pyx_mstate_global->__pyx_kp_u_Call_bs_query_history_k_data_plu
#define __pyx_n_s_DataFrame __pyx_mstate_global->__pyx_n_s_DataFrame
#define __pyx_kp_u_DataFrame_result_day_data_is_emp __pyx_mstate_global->__pyx_kp_u_DataFrame_result_day_data_is_emp
#define __pyx_kp_s_DataToMysql __pyx_mstate_global->__pyx_kp_s_DataToMysql
#define __pyx_n_s_DataToMysql_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_2
#define __pyx_n_s_DataToMysql___init __pyx_mstate_global->__pyx_n_s_DataToMysql___init
#define __pyx_n_s_DataToMysql_dumpJsonToFile __pyx_mstate_global->__pyx_n_s_DataToMysql_dumpJsonToFile
#define __pyx_n_s_DataToMysql_fixTradeDayNullValue __pyx_mstate_global->__pyx_n_s_DataToMysql_fixTradeDayNullValue
#define __pyx_n_s_DataToMysql_func_concept __pyx_mstate_global->__pyx_n_s_DataToMysql_func_concept
#define __pyx_n_s_DataToMysql_func_industry __pyx_mstate_global->__pyx_n_s_DataToMysql_func_industry
#define __pyx_n_s_DataToMysql_getFqFactorByDividen __pyx_mstate_global->__pyx_n_s_DataToMysql_getFqFactorByDividen
#define __pyx_n_s_DataToMysql_getSuspendedStocks __pyx_mstate_global->__pyx_n_s_DataToMysql_getSuspendedStocks
#define __pyx_n_s_DataToMysql_saveHistTradeDayInfo __pyx_mstate_global->__pyx_n_s_DataToMysql_saveHistTradeDayInfo
#define __pyx_n_s_DataToMysql_saveHistTradeDayInfo_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_2
#define __pyx_n_s_DataToMysql_saveHistTradeDayInfo_3 __pyx_mstate_global->__pyx_n_s_DataToMysql_saveHistTradeDayInfo_3
#define __pyx_n_s_DataToMysql_updateFutureTradeDay __pyx_mstate_global->__pyx_n_s_DataToMysql_updateFutureTradeDay
#define __pyx_n_s_DataToMysql_updateFutureTradeDay_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateFutureTradeDay_2
#define __pyx_n_s_DataToMysql_updateIndexTradeDayT __pyx_mstate_global->__pyx_n_s_DataToMysql_updateIndexTradeDayT
#define __pyx_n_s_DataToMysql_updateIndexTradeDayT_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateIndexTradeDayT_2
#define __pyx_n_s_DataToMysql_updateKzzBasicInfoTo __pyx_mstate_global->__pyx_n_s_DataToMysql_updateKzzBasicInfoTo
#define __pyx_n_s_DataToMysql_updateRzrqHsgtTradeD __pyx_mstate_global->__pyx_n_s_DataToMysql_updateRzrqHsgtTradeD
#define __pyx_n_s_DataToMysql_updateSingleStockDiv __pyx_mstate_global->__pyx_n_s_DataToMysql_updateSingleStockDiv
#define __pyx_n_s_DataToMysql_updateSingleStockFqF __pyx_mstate_global->__pyx_n_s_DataToMysql_updateSingleStockFqF
#define __pyx_n_s_DataToMysql_updateStockBasicInfo __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockBasicInfo
#define __pyx_n_s_DataToMysql_updateStockBasicInfo_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockBasicInfo_2
#define __pyx_n_s_DataToMysql_updateStockBasicInfo_3 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockBasicInfo_3
#define __pyx_n_s_DataToMysql_updateStockConceptIn __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockConceptIn
#define __pyx_n_s_DataToMysql_updateStockDividendI __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockDividendI
#define __pyx_n_s_DataToMysql_updateStockFinancial __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockFinancial
#define __pyx_n_s_DataToMysql_updateStockFinancial_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockFinancial_2
#define __pyx_n_s_DataToMysql_updateStockFqFactorT __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockFqFactorT
#define __pyx_n_s_DataToMysql_updateStockHoldNumbe __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockHoldNumbe
#define __pyx_n_s_DataToMysql_updateStockHoldNumbe_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockHoldNumbe_2
#define __pyx_n_s_DataToMysql_updateStockIndustryC __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryC
#define __pyx_n_s_DataToMysql_updateStockIndustryC_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryC_2
#define __pyx_n_s_DataToMysql_updateStockIndustryC_3 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryC_3
#define __pyx_n_s_DataToMysql_updateStockIndustryC_4 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryC_4
#define __pyx_n_s_DataToMysql_updateStockIndustryC_5 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryC_5
#define __pyx_n_s_DataToMysql_updateStockIndustryI __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockIndustryI
#define __pyx_n_s_DataToMysql_updateStockRzrqHsgtT __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT
#define __pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2
#define __pyx_n_s_DataToMysql_updateStockSimpleInf __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockSimpleInf
#define __pyx_n_s_DataToMysql_updateStockTradeDayI __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockTradeDayI
#define __pyx_n_s_DataToMysql_updateStockTradeDayI_2 __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStockTradeDayI_2
#define __pyx_n_s_DataToMysql_updateStrategyDict __pyx_mstate_global->__pyx_n_s_DataToMysql_updateStrategyDict
#define __pyx_kp_u_Data_failed_save_in __pyx_mstate_global->__pyx_kp_u_Data_failed_save_in
#define __pyx_kp_u_Don_t_need_to_update __pyx_mstate_global->__pyx_kp_u_Don_t_need_to_update
#define __pyx_kp_u_Failed_date_is __pyx_mstate_global->__pyx_kp_u_Failed_date_is
#define __pyx_kp_u_Failed_to_call_ak_futures_main_s __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_futures_main_s
#define __pyx_kp_u_Failed_to_call_ak_stock_board_c __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_board_c
#define __pyx_kp_u_Failed_to_call_ak_stock_board_h __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_board_h
#define __pyx_kp_u_Failed_to_call_ak_stock_info_a_c __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_info_a_c
#define __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai
#define __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2 __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2
#define __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3 __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3
#define __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4 __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4
#define __pyx_kp_u_Failed_to_call_ak_stock_zh_a_his __pyx_mstate_global->__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his
#define __pyx_kp_u_Failed_to_call_bs_query_history __pyx_mstate_global->__pyx_kp_u_Failed_to_call_bs_query_history
#define __pyx_kp_u_Failed_to_call_sdc __pyx_mstate_global->__pyx_kp_u_Failed_to_call_sdc
#define __pyx_kp_u_Failed_to_call_sdc_stock __pyx_mstate_global->__pyx_kp_u_Failed_to_call_sdc_stock
#define __pyx_kp_u_Failed_to_call_sdc_stock_zh_inde __pyx_mstate_global->__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde
#define __pyx_kp_u_Failed_to_call_stock_finance_mf __pyx_mstate_global->__pyx_kp_u_Failed_to_call_stock_finance_mf
#define __pyx_kp_u_Failed_to_call_stock_finance_mfd __pyx_mstate_global->__pyx_kp_u_Failed_to_call_stock_finance_mfd
#define __pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d __pyx_mstate_global->__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d
#define __pyx_kp_u_Failed_to_updateSingleStockBasic __pyx_mstate_global->__pyx_kp_u_Failed_to_updateSingleStockBasic
#define __pyx_kp_u_Failed_update __pyx_mstate_global->__pyx_kp_u_Failed_update
#define __pyx_kp_u_Fq_factor_of __pyx_mstate_global->__pyx_kp_u_Fq_factor_of
#define __pyx_n_s_JR0 __pyx_mstate_global->__pyx_n_s_JR0
#define __pyx_n_s_LR0 __pyx_mstate_global->__pyx_n_s_LR0
#define __pyx_n_s_NaT __pyx_mstate_global->__pyx_n_s_NaT
#define __pyx_kp_u_Need_update_stock_concept_basic __pyx_mstate_global->__pyx_kp_u_Need_update_stock_concept_basic
#define __pyx_kp_u_Need_update_stock_industry_basic __pyx_mstate_global->__pyx_kp_u_Need_update_stock_industry_basic
#define __pyx_kp_u_Need_update_stock_simple_info_fi __pyx_mstate_global->__pyx_kp_u_Need_update_stock_simple_info_fi
#define __pyx_n_s_ProcessPoolExecutor __pyx_mstate_global->__pyx_n_s_ProcessPoolExecutor
#define __pyx_n_s_RI0 __pyx_mstate_global->__pyx_n_s_RI0
#define __pyx_kp_u_StockTradeDayInfo_of __pyx_mstate_global->__pyx_kp_u_StockTradeDayInfo_of
#define __pyx_kp_u_Succeed_save_in __pyx_mstate_global->__pyx_kp_u_Succeed_save_in
#define __pyx_kp_u_Succeed_to_call_getFqFactorByDiv __pyx_mstate_global->__pyx_kp_u_Succeed_to_call_getFqFactorByDiv
#define __pyx_kp_u_Succeed_update __pyx_mstate_global->__pyx_kp_u_Succeed_update
#define __pyx_kp_u_The __pyx_mstate_global->__pyx_kp_u_The
#define __pyx_kp_u_There_is_not_new_stocks_to_updat __pyx_mstate_global->__pyx_kp_u_There_is_not_new_stocks_to_updat
#define __pyx_n_s_ThreadPoolExecutor __pyx_mstate_global->__pyx_n_s_ThreadPoolExecutor
#define __pyx_kp_u_TradeDayInfo_of __pyx_mstate_global->__pyx_kp_u_TradeDayInfo_of
#define __pyx_kp_u_TradeDayInfo_of_2 __pyx_mstate_global->__pyx_kp_u_TradeDayInfo_of_2
#define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
#define __pyx_n_s_WH0 __pyx_mstate_global->__pyx_n_s_WH0
#define __pyx_kp_s_XX __pyx_mstate_global->__pyx_kp_s_XX
#define __pyx_kp_s_Y_m_d __pyx_mstate_global->__pyx_kp_s_Y_m_d
#define __pyx_kp_s__10 __pyx_mstate_global->__pyx_kp_s__10
#define __pyx_kp_s__11 __pyx_mstate_global->__pyx_kp_s__11
#define __pyx_kp_s__13 __pyx_mstate_global->__pyx_kp_s__13
#define __pyx_kp_s__15 __pyx_mstate_global->__pyx_kp_s__15
#define __pyx_kp_s__17 __pyx_mstate_global->__pyx_kp_s__17
#define __pyx_n_s__177 __pyx_mstate_global->__pyx_n_s__177
#define __pyx_kp_s__18 __pyx_mstate_global->__pyx_kp_s__18
#define __pyx_kp_s__19 __pyx_mstate_global->__pyx_kp_s__19
#define __pyx_kp_s__2 __pyx_mstate_global->__pyx_kp_s__2
#define __pyx_kp_s__21 __pyx_mstate_global->__pyx_kp_s__21
#define __pyx_kp_u__21 __pyx_mstate_global->__pyx_kp_u__21
#define __pyx_kp_u__22 __pyx_mstate_global->__pyx_kp_u__22
#define __pyx_kp_s__3 __pyx_mstate_global->__pyx_kp_s__3
#define __pyx_kp_s__30 __pyx_mstate_global->__pyx_kp_s__30
#define __pyx_kp_s__31 __pyx_mstate_global->__pyx_kp_s__31
#define __pyx_kp_s__32 __pyx_mstate_global->__pyx_kp_s__32
#define __pyx_kp_s__33 __pyx_mstate_global->__pyx_kp_s__33
#define __pyx_kp_s__35 __pyx_mstate_global->__pyx_kp_s__35
#define __pyx_kp_s__36 __pyx_mstate_global->__pyx_kp_s__36
#define __pyx_kp_s__39 __pyx_mstate_global->__pyx_kp_s__39
#define __pyx_kp_s__4 __pyx_mstate_global->__pyx_kp_s__4
#define __pyx_kp_s__42 __pyx_mstate_global->__pyx_kp_s__42
#define __pyx_kp_s__44 __pyx_mstate_global->__pyx_kp_s__44
#define __pyx_kp_s__45 __pyx_mstate_global->__pyx_kp_s__45
#define __pyx_kp_s__46 __pyx_mstate_global->__pyx_kp_s__46
#define __pyx_kp_s__47 __pyx_mstate_global->__pyx_kp_s__47
#define __pyx_kp_s__48 __pyx_mstate_global->__pyx_kp_s__48
#define __pyx_kp_s__49 __pyx_mstate_global->__pyx_kp_s__49
#define __pyx_kp_u__5 __pyx_mstate_global->__pyx_kp_u__5
#define __pyx_kp_s__50 __pyx_mstate_global->__pyx_kp_s__50
#define __pyx_kp_s__51 __pyx_mstate_global->__pyx_kp_s__51
#define __pyx_kp_s__54 __pyx_mstate_global->__pyx_kp_s__54
#define __pyx_kp_s__60 __pyx_mstate_global->__pyx_kp_s__60
#define __pyx_kp_s__61 __pyx_mstate_global->__pyx_kp_s__61
#define __pyx_kp_s__62 __pyx_mstate_global->__pyx_kp_s__62
#define __pyx_kp_s__63 __pyx_mstate_global->__pyx_kp_s__63
#define __pyx_kp_s__64 __pyx_mstate_global->__pyx_kp_s__64
#define __pyx_kp_s__65 __pyx_mstate_global->__pyx_kp_s__65
#define __pyx_kp_s__66 __pyx_mstate_global->__pyx_kp_s__66
#define __pyx_n_s__67 __pyx_mstate_global->__pyx_n_s__67
#define __pyx_kp_s__71 __pyx_mstate_global->__pyx_kp_s__71
#define __pyx_kp_s__72 __pyx_mstate_global->__pyx_kp_s__72
#define __pyx_kp_s__76 __pyx_mstate_global->__pyx_kp_s__76
#define __pyx_kp_s__8 __pyx_mstate_global->__pyx_kp_s__8
#define __pyx_kp_s__87 __pyx_mstate_global->__pyx_kp_s__87
#define __pyx_kp_s__88 __pyx_mstate_global->__pyx_kp_s__88
#define __pyx_kp_s__89 __pyx_mstate_global->__pyx_kp_s__89
#define __pyx_kp_s__9 __pyx_mstate_global->__pyx_kp_s__9
#define __pyx_kp_s__90 __pyx_mstate_global->__pyx_kp_s__90
#define __pyx_kp_s__91 __pyx_mstate_global->__pyx_kp_s__91
#define __pyx_n_s__94 __pyx_mstate_global->__pyx_n_s__94
#define __pyx_n_s_adjust __pyx_mstate_global->__pyx_n_s_adjust
#define __pyx_n_s_adjustflag __pyx_mstate_global->__pyx_n_s_adjustflag
#define __pyx_n_s_ak __pyx_mstate_global->__pyx_n_s_ak
#define __pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret __pyx_mstate_global->__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret
#define __pyx_n_s_akshare __pyx_mstate_global->__pyx_n_s_akshare
#define __pyx_kp_u_akshare_version __pyx_mstate_global->__pyx_kp_u_akshare_version
#define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
#define __pyx_n_s_all_stock_list __pyx_mstate_global->__pyx_n_s_all_stock_list
#define __pyx_n_s_all_stock_simple_info __pyx_mstate_global->__pyx_n_s_all_stock_simple_info
#define __pyx_n_s_all_succeed __pyx_mstate_global->__pyx_n_s_all_succeed
#define __pyx_n_s_amount __pyx_mstate_global->__pyx_n_s_amount
#define __pyx_n_s_api __pyx_mstate_global->__pyx_n_s_api
#define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
#define __pyx_n_s_apply __pyx_mstate_global->__pyx_n_s_apply
#define __pyx_n_s_as_completed __pyx_mstate_global->__pyx_n_s_as_completed
#define __pyx_n_s_ascending __pyx_mstate_global->__pyx_n_s_ascending
#define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
#define __pyx_n_s_axis __pyx_mstate_global->__pyx_n_s_axis
#define __pyx_n_s_baostock __pyx_mstate_global->__pyx_n_s_baostock
#define __pyx_kp_s_baostock_login_respond_error_cod __pyx_mstate_global->__pyx_kp_s_baostock_login_respond_error_cod
#define __pyx_kp_s_baostock_login_respond_error_msg __pyx_mstate_global->__pyx_kp_s_baostock_login_respond_error_msg
#define __pyx_kp_u_baostock_version __pyx_mstate_global->__pyx_kp_u_baostock_version
#define __pyx_n_s_basic_info_df __pyx_mstate_global->__pyx_n_s_basic_info_df
#define __pyx_n_s_basic_info_table_name __pyx_mstate_global->__pyx_n_s_basic_info_table_name
#define __pyx_n_s_bool __pyx_mstate_global->__pyx_n_s_bool
#define __pyx_kp_s_bool_str __pyx_mstate_global->__pyx_kp_s_bool_str
#define __pyx_n_s_bs __pyx_mstate_global->__pyx_n_s_bs
#define __pyx_n_s_by __pyx_mstate_global->__pyx_n_s_by
#define __pyx_n_s_capital_reserve_ps __pyx_mstate_global->__pyx_n_s_capital_reserve_ps
#define __pyx_n_s_cash_dividend_ps __pyx_mstate_global->__pyx_n_s_cash_dividend_ps
#define __pyx_n_s_cash_dividends __pyx_mstate_global->__pyx_n_s_cash_dividends
#define __pyx_n_s_check_serializability __pyx_mstate_global->__pyx_n_s_check_serializability
#define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
#define __pyx_n_s_clearTableContent __pyx_mstate_global->__pyx_n_s_clearTableContent
#define __pyx_n_s_clearTableContentByCode __pyx_mstate_global->__pyx_n_s_clearTableContentByCode
#define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
#define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
#define __pyx_n_s_co_name __pyx_mstate_global->__pyx_n_s_co_name
#define __pyx_n_s_cocept_name __pyx_mstate_global->__pyx_n_s_cocept_name
#define __pyx_n_s_code __pyx_mstate_global->__pyx_n_s_code
#define __pyx_kp_u_code_2 __pyx_mstate_global->__pyx_kp_u_code_2
#define __pyx_kp_u_code_is __pyx_mstate_global->__pyx_kp_u_code_is
#define __pyx_n_s_code_str __pyx_mstate_global->__pyx_n_s_code_str
#define __pyx_n_s_coerce __pyx_mstate_global->__pyx_n_s_coerce
#define __pyx_n_s_cols __pyx_mstate_global->__pyx_n_s_cols
#define __pyx_n_s_cols_to_convert __pyx_mstate_global->__pyx_n_s_cols_to_convert
#define __pyx_n_s_columns __pyx_mstate_global->__pyx_n_s_columns
#define __pyx_n_s_combined_codes __pyx_mstate_global->__pyx_n_s_combined_codes
#define __pyx_n_s_commit __pyx_mstate_global->__pyx_n_s_commit
#define __pyx_n_s_con __pyx_mstate_global->__pyx_n_s_con
#define __pyx_n_s_concat __pyx_mstate_global->__pyx_n_s_concat
#define __pyx_n_s_concept __pyx_mstate_global->__pyx_n_s_concept
#define __pyx_n_s_concept_cons_stocks __pyx_mstate_global->__pyx_n_s_concept_cons_stocks
#define __pyx_n_s_concept_history_df __pyx_mstate_global->__pyx_n_s_concept_history_df
#define __pyx_n_s_concept_name __pyx_mstate_global->__pyx_n_s_concept_name
#define __pyx_n_s_concept_trade_data_df __pyx_mstate_global->__pyx_n_s_concept_trade_data_df
#define __pyx_n_s_concurrent_futures __pyx_mstate_global->__pyx_n_s_concurrent_futures
#define __pyx_n_s_cons_stocks __pyx_mstate_global->__pyx_n_s_cons_stocks
#define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
#define __pyx_n_s_create_engine_session __pyx_mstate_global->__pyx_n_s_create_engine_session
#define __pyx_n_s_cumprod __pyx_mstate_global->__pyx_n_s_cumprod
#define __pyx_n_s_current_time __pyx_mstate_global->__pyx_n_s_current_time
#define __pyx_n_s_d __pyx_mstate_global->__pyx_n_s_d
#define __pyx_n_s_daily __pyx_mstate_global->__pyx_n_s_daily
#define __pyx_n_s_data __pyx_mstate_global->__pyx_n_s_data
#define __pyx_n_s_dataAcquisition __pyx_mstate_global->__pyx_n_s_dataAcquisition
#define __pyx_n_s_dataManagement __pyx_mstate_global->__pyx_n_s_dataManagement
#define __pyx_n_s_dataPreprocess __pyx_mstate_global->__pyx_n_s_dataPreprocess
#define __pyx_n_s_data_dict __pyx_mstate_global->__pyx_n_s_data_dict
#define __pyx_kp_u_data_has_not_update_from_networ __pyx_mstate_global->__pyx_kp_u_data_has_not_update_from_networ
#define __pyx_kp_u_data_is_wrong_in __pyx_mstate_global->__pyx_kp_u_data_is_wrong_in
#define __pyx_n_s_data_list __pyx_mstate_global->__pyx_n_s_data_list
#define __pyx_n_s_data_to_mysql __pyx_mstate_global->__pyx_n_s_data_to_mysql
#define __pyx_kp_u_data_wrong_in __pyx_mstate_global->__pyx_kp_u_data_wrong_in
#define __pyx_n_s_dataproc __pyx_mstate_global->__pyx_n_s_dataproc
#define __pyx_n_s_date __pyx_mstate_global->__pyx_n_s_date
#define __pyx_kp_s_date_code_open_high_low_close_pr __pyx_mstate_global->__pyx_kp_s_date_code_open_high_low_close_pr
#define __pyx_n_s_date_data_type __pyx_mstate_global->__pyx_n_s_date_data_type
#define __pyx_n_s_datetime __pyx_mstate_global->__pyx_n_s_datetime
#define __pyx_n_s_default_date __pyx_mstate_global->__pyx_n_s_default_date
#define __pyx_n_s_delete __pyx_mstate_global->__pyx_n_s_delete
#define __pyx_n_s_delist_stock_df __pyx_mstate_global->__pyx_n_s_delist_stock_df
#define __pyx_n_s_desc __pyx_mstate_global->__pyx_n_s_desc
#define __pyx_n_s_desc_name __pyx_mstate_global->__pyx_n_s_desc_name
#define __pyx_kp_u_detail_for_code __pyx_mstate_global->__pyx_kp_u_detail_for_code
#define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
#define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
#define __pyx_n_s_diff_code __pyx_mstate_global->__pyx_n_s_diff_code
#define __pyx_n_s_disable __pyx_mstate_global->__pyx_n_s_disable
#define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
#define __pyx_n_s_dispose __pyx_mstate_global->__pyx_n_s_dispose
#define __pyx_kp_u_dividend_data_failed_save_in __pyx_mstate_global->__pyx_kp_u_dividend_data_failed_save_in
#define __pyx_n_s_dividend_df __pyx_mstate_global->__pyx_n_s_dividend_df
#define __pyx_n_s_dividend_table __pyx_mstate_global->__pyx_n_s_dividend_table
#define __pyx_n_s_dividend_text __pyx_mstate_global->__pyx_n_s_dividend_text
#define __pyx_n_s_dividend_yield __pyx_mstate_global->__pyx_n_s_dividend_yield
#define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
#define __pyx_kp_u_dont_need_to_update __pyx_mstate_global->__pyx_kp_u_dont_need_to_update
#define __pyx_kp_u_dont_need_to_update_2 __pyx_mstate_global->__pyx_kp_u_dont_need_to_update_2
#define __pyx_n_s_drop __pyx_mstate_global->__pyx_n_s_drop
#define __pyx_n_s_dt __pyx_mstate_global->__pyx_n_s_dt
#define __pyx_n_s_dtype __pyx_mstate_global->__pyx_n_s_dtype
#define __pyx_n_s_dtype_mapping __pyx_mstate_global->__pyx_n_s_dtype_mapping
#define __pyx_n_s_dumpJsonToFile __pyx_mstate_global->__pyx_n_s_dumpJsonToFile
#define __pyx_n_s_dump_json_period __pyx_mstate_global->__pyx_n_s_dump_json_period
#define __pyx_n_s_e __pyx_mstate_global->__pyx_n_s_e
#define __pyx_n_s_em __pyx_mstate_global->__pyx_n_s_em
#define __pyx_n_s_empty __pyx_mstate_global->__pyx_n_s_empty
#define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
#define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
#define __pyx_n_s_end_date __pyx_mstate_global->__pyx_n_s_end_date
#define __pyx_n_s_end_time __pyx_mstate_global->__pyx_n_s_end_time
#define __pyx_n_s_engine __pyx_mstate_global->__pyx_n_s_engine
#define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
#define __pyx_n_s_eps __pyx_mstate_global->__pyx_n_s_eps
#define __pyx_kp_u_err_is __pyx_mstate_global->__pyx_kp_u_err_is
#define __pyx_n_s_error __pyx_mstate_global->__pyx_n_s_error
#define __pyx_kp_u_error_2 __pyx_mstate_global->__pyx_kp_u_error_2
#define __pyx_n_s_error_code __pyx_mstate_global->__pyx_n_s_error_code
#define __pyx_n_s_error_msg __pyx_mstate_global->__pyx_n_s_error_msg
#define __pyx_n_s_errors __pyx_mstate_global->__pyx_n_s_errors
#define __pyx_n_s_ex_date __pyx_mstate_global->__pyx_n_s_ex_date
#define __pyx_n_s_exclude_future_dict __pyx_mstate_global->__pyx_n_s_exclude_future_dict
#define __pyx_n_s_exclude_future_list __pyx_mstate_global->__pyx_n_s_exclude_future_list
#define __pyx_n_s_executor __pyx_mstate_global->__pyx_n_s_executor
#define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
#define __pyx_n_s_extractAdministrativeRegions __pyx_mstate_global->__pyx_n_s_extractAdministrativeRegions
#define __pyx_n_s_f_code __pyx_mstate_global->__pyx_n_s_f_code
#define __pyx_n_s_failed_list __pyx_mstate_global->__pyx_n_s_failed_list
#define __pyx_kp_u_failed_to_save_in_tables_err_is __pyx_mstate_global->__pyx_kp_u_failed_to_save_in_tables_err_is
#define __pyx_n_s_fhsz_em __pyx_mstate_global->__pyx_n_s_fhsz_em
#define __pyx_n_s_fields __pyx_mstate_global->__pyx_n_s_fields
#define __pyx_n_s_fillna __pyx_mstate_global->__pyx_n_s_fillna
#define __pyx_n_s_filter __pyx_mstate_global->__pyx_n_s_filter
#define __pyx_n_s_filter_by __pyx_mstate_global->__pyx_n_s_filter_by
#define __pyx_kp_u_financial_data_failed_save_in __pyx_mstate_global->__pyx_kp_u_financial_data_failed_save_in
#define __pyx_kp_u_finished __pyx_mstate_global->__pyx_kp_u_finished
#define __pyx_n_s_first __pyx_mstate_global->__pyx_n_s_first
#define __pyx_n_s_first_date __pyx_mstate_global->__pyx_n_s_first_date
#define __pyx_n_s_fixTradeDayNullValue __pyx_mstate_global->__pyx_n_s_fixTradeDayNullValue
#define __pyx_kp_u_for_code __pyx_mstate_global->__pyx_kp_u_for_code
#define __pyx_n_s_fq_factor_df __pyx_mstate_global->__pyx_n_s_fq_factor_df
#define __pyx_n_s_fq_factor_origin __pyx_mstate_global->__pyx_n_s_fq_factor_origin
#define __pyx_n_s_fq_row_date __pyx_mstate_global->__pyx_n_s_fq_row_date
#define __pyx_n_s_fq_row_date_str __pyx_mstate_global->__pyx_n_s_fq_row_date_str
#define __pyx_n_s_frequency __pyx_mstate_global->__pyx_n_s_frequency
#define __pyx_n_s_fun_name __pyx_mstate_global->__pyx_n_s_fun_name
#define __pyx_n_s_func __pyx_mstate_global->__pyx_n_s_func
#define __pyx_n_s_func_concept __pyx_mstate_global->__pyx_n_s_func_concept
#define __pyx_n_s_func_index __pyx_mstate_global->__pyx_n_s_func_index
#define __pyx_n_s_func_industry __pyx_mstate_global->__pyx_n_s_func_industry
#define __pyx_n_s_future __pyx_mstate_global->__pyx_n_s_future
#define __pyx_kp_s_futureCodeNames_csv __pyx_mstate_global->__pyx_kp_s_futureCodeNames_csv
#define __pyx_n_s_future_code __pyx_mstate_global->__pyx_n_s_future_code
#define __pyx_n_s_future_code_name_df __pyx_mstate_global->__pyx_n_s_future_code_name_df
#define __pyx_n_s_future_name __pyx_mstate_global->__pyx_n_s_future_name
#define __pyx_kp_s_future_no_silent_downcasting __pyx_mstate_global->__pyx_kp_s_future_no_silent_downcasting
#define __pyx_n_s_future_trade_data_df __pyx_mstate_global->__pyx_n_s_future_trade_data_df
#define __pyx_n_s_future_trade_day __pyx_mstate_global->__pyx_n_s_future_trade_day
#define __pyx_n_s_futures __pyx_mstate_global->__pyx_n_s_futures
#define __pyx_n_s_futures_main_sina __pyx_mstate_global->__pyx_n_s_futures_main_sina
#define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
#define __pyx_n_s_getConceptStockCodes __pyx_mstate_global->__pyx_n_s_getConceptStockCodes
#define __pyx_n_s_getFqFactorByDividend __pyx_mstate_global->__pyx_n_s_getFqFactorByDividend
#define __pyx_n_s_getFullStockCode __pyx_mstate_global->__pyx_n_s_getFullStockCode
#define __pyx_n_s_getIndexCodeName __pyx_mstate_global->__pyx_n_s_getIndexCodeName
#define __pyx_n_s_getIndustryConceptConsText __pyx_mstate_global->__pyx_n_s_getIndustryConceptConsText
#define __pyx_n_s_getSingleIndustryConceptTradeDay __pyx_mstate_global->__pyx_n_s_getSingleIndustryConceptTradeDay
#define __pyx_n_s_getStockFqfactorInfo __pyx_mstate_global->__pyx_n_s_getStockFqfactorInfo
#define __pyx_n_s_getStockSimpleInfo __pyx_mstate_global->__pyx_n_s_getStockSimpleInfo
#define __pyx_n_s_getSuspendedStocks __pyx_mstate_global->__pyx_n_s_getSuspendedStocks
#define __pyx_n_s_get_row_data __pyx_mstate_global->__pyx_n_s_get_row_data
#define __pyx_n_s_get_table_columns __pyx_mstate_global->__pyx_n_s_get_table_columns
#define __pyx_n_s_getframe __pyx_mstate_global->__pyx_n_s_getframe
#define __pyx_n_s_has_update_file __pyx_mstate_global->__pyx_n_s_has_update_file
#define __pyx_kp_u_has_updated __pyx_mstate_global->__pyx_kp_u_has_updated
#define __pyx_n_s_hfq_factor __pyx_mstate_global->__pyx_n_s_hfq_factor
#define __pyx_kp_s_hfq_factor_2 __pyx_mstate_global->__pyx_kp_s_hfq_factor_2
#define __pyx_n_s_high __pyx_mstate_global->__pyx_n_s_high
#define __pyx_kp_u_history __pyx_mstate_global->__pyx_kp_u_history
#define __pyx_n_s_how __pyx_mstate_global->__pyx_n_s_how
#define __pyx_n_s_hsgt_history __pyx_mstate_global->__pyx_n_s_hsgt_history
#define __pyx_n_s_hsgt_trade_day __pyx_mstate_global->__pyx_n_s_hsgt_trade_day
#define __pyx_n_s_i __pyx_mstate_global->__pyx_n_s_i
#define __pyx_n_s_id __pyx_mstate_global->__pyx_n_s_id
#define __pyx_n_s_if_exists __pyx_mstate_global->__pyx_n_s_if_exists
#define __pyx_n_s_ignore_index __pyx_mstate_global->__pyx_n_s_ignore_index
#define __pyx_n_s_iloc __pyx_mstate_global->__pyx_n_s_iloc
#define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
#define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
#define __pyx_n_s_index_code __pyx_mstate_global->__pyx_n_s_index_code
#define __pyx_n_s_index_code_name_dict __pyx_mstate_global->__pyx_n_s_index_code_name_dict
#define __pyx_n_s_index_name __pyx_mstate_global->__pyx_n_s_index_name
#define __pyx_n_s_index_trade_data_df __pyx_mstate_global->__pyx_n_s_index_trade_data_df
#define __pyx_n_s_index_trade_day __pyx_mstate_global->__pyx_n_s_index_trade_day
#define __pyx_n_s_industry __pyx_mstate_global->__pyx_n_s_industry
#define __pyx_n_s_industry_cons_stocks __pyx_mstate_global->__pyx_n_s_industry_cons_stocks
#define __pyx_n_s_industry_name __pyx_mstate_global->__pyx_n_s_industry_name
#define __pyx_n_s_industry_or_concept_cons_df __pyx_mstate_global->__pyx_n_s_industry_or_concept_cons_df
#define __pyx_n_s_industry_or_concept_hist_em_df __pyx_mstate_global->__pyx_n_s_industry_or_concept_hist_em_df
#define __pyx_n_s_industry_or_concept_name_df __pyx_mstate_global->__pyx_n_s_industry_or_concept_name_df
#define __pyx_n_s_inf __pyx_mstate_global->__pyx_n_s_inf
#define __pyx_n_s_info __pyx_mstate_global->__pyx_n_s_info
#define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
#define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
#define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
#define __pyx_n_s_inner __pyx_mstate_global->__pyx_n_s_inner
#define __pyx_n_s_inplace __pyx_mstate_global->__pyx_n_s_inplace
#define __pyx_n_s_insert __pyx_mstate_global->__pyx_n_s_insert
#define __pyx_n_s_ipo_time __pyx_mstate_global->__pyx_n_s_ipo_time
#define __pyx_n_s_is __pyx_mstate_global->__pyx_n_s_is
#define __pyx_n_s_isAPrimaryBoardStock __pyx_mstate_global->__pyx_n_s_isAPrimaryBoardStock
#define __pyx_kp_u_is_Empty __pyx_mstate_global->__pyx_kp_u_is_Empty
#define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
#define __pyx_n_s_is_datetime __pyx_mstate_global->__pyx_n_s_is_datetime
#define __pyx_n_s_is_datetime64_any_dtype __pyx_mstate_global->__pyx_n_s_is_datetime64_any_dtype
#define __pyx_n_s_is_delist __pyx_mstate_global->__pyx_n_s_is_delist
#define __pyx_n_s_is_hsgt __pyx_mstate_global->__pyx_n_s_is_hsgt
#define __pyx_n_s_is_margin __pyx_mstate_global->__pyx_n_s_is_margin
#define __pyx_kp_u_is_new __pyx_mstate_global->__pyx_kp_u_is_new
#define __pyx_n_s_is_null_ex_data_em __pyx_mstate_global->__pyx_n_s_is_null_ex_data_em
#define __pyx_n_s_is_null_ex_data_table __pyx_mstate_global->__pyx_n_s_is_null_ex_data_table
#define __pyx_n_s_is_primary __pyx_mstate_global->__pyx_n_s_is_primary
#define __pyx_n_s_is_session __pyx_mstate_global->__pyx_n_s_is_session
#define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
#define __pyx_n_s_isin __pyx_mstate_global->__pyx_n_s_isin
#define __pyx_n_s_isna __pyx_mstate_global->__pyx_n_s_isna
#define __pyx_kp_u_it_has_been_suspended __pyx_mstate_global->__pyx_kp_u_it_has_been_suspended
#define __pyx_n_s_item __pyx_mstate_global->__pyx_n_s_item
#define __pyx_n_s_items __pyx_mstate_global->__pyx_n_s_items
#define __pyx_n_s_iterrows __pyx_mstate_global->__pyx_n_s_iterrows
#define __pyx_n_s_join __pyx_mstate_global->__pyx_n_s_join
#define __pyx_n_s_json_file_name __pyx_mstate_global->__pyx_n_s_json_file_name
#define __pyx_kp_s_k __pyx_mstate_global->__pyx_kp_s_k
#define __pyx_n_s_key __pyx_mstate_global->__pyx_n_s_key
#define __pyx_n_s_key_products __pyx_mstate_global->__pyx_n_s_key_products
#define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
#define __pyx_n_s_kzz_basic_info __pyx_mstate_global->__pyx_n_s_kzz_basic_info
#define __pyx_kp_u_kzz_basic_info_dataframe __pyx_mstate_global->__pyx_kp_u_kzz_basic_info_dataframe
#define __pyx_n_s_kzz_basic_info_em __pyx_mstate_global->__pyx_n_s_kzz_basic_info_em
#define __pyx_n_s_latest_trade_day __pyx_mstate_global->__pyx_n_s_latest_trade_day
#define __pyx_n_s_lg __pyx_mstate_global->__pyx_n_s_lg
#define __pyx_n_s_list __pyx_mstate_global->__pyx_n_s_list
#define __pyx_n_s_loadJsonData __pyx_mstate_global->__pyx_n_s_loadJsonData
#define __pyx_n_s_loadTable __pyx_mstate_global->__pyx_n_s_loadTable
#define __pyx_n_s_loadTableContentByCode __pyx_mstate_global->__pyx_n_s_loadTableContentByCode
#define __pyx_n_s_load_json_file __pyx_mstate_global->__pyx_n_s_load_json_file
#define __pyx_n_s_loc __pyx_mstate_global->__pyx_n_s_loc
#define __pyx_n_s_local_engine __pyx_mstate_global->__pyx_n_s_local_engine
#define __pyx_n_s_local_session __pyx_mstate_global->__pyx_n_s_local_session
#define __pyx_n_s_logger __pyx_mstate_global->__pyx_n_s_logger
#define __pyx_n_s_login __pyx_mstate_global->__pyx_n_s_login
#define __pyx_n_s_logout __pyx_mstate_global->__pyx_n_s_logout
#define __pyx_n_s_low __pyx_mstate_global->__pyx_n_s_low
#define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
#define __pyx_n_s_main_business __pyx_mstate_global->__pyx_n_s_main_business
#define __pyx_n_s_main_fina_data_df __pyx_mstate_global->__pyx_n_s_main_fina_data_df
#define __pyx_n_s_match_index __pyx_mstate_global->__pyx_n_s_match_index
#define __pyx_n_s_max __pyx_mstate_global->__pyx_n_s_max
#define __pyx_n_s_max_date __pyx_mstate_global->__pyx_n_s_max_date
#define __pyx_n_s_max_date_em __pyx_mstate_global->__pyx_n_s_max_date_em
#define __pyx_n_s_max_date_row __pyx_mstate_global->__pyx_n_s_max_date_row
#define __pyx_n_s_max_date_row_table __pyx_mstate_global->__pyx_n_s_max_date_row_table
#define __pyx_n_s_max_date_table __pyx_mstate_global->__pyx_n_s_max_date_table
#define __pyx_n_s_max_workers __pyx_mstate_global->__pyx_n_s_max_workers
#define __pyx_kp_u_maybe_is_new_stock __pyx_mstate_global->__pyx_kp_u_maybe_is_new_stock
#define __pyx_n_s_merge __pyx_mstate_global->__pyx_n_s_merge
#define __pyx_n_s_merged_df __pyx_mstate_global->__pyx_n_s_merged_df
#define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
#define __pyx_n_s_method __pyx_mstate_global->__pyx_n_s_method
#define __pyx_n_s_min_date_em __pyx_mstate_global->__pyx_n_s_min_date_em
#define __pyx_n_s_min_date_em_str __pyx_mstate_global->__pyx_n_s_min_date_em_str
#define __pyx_n_s_min_date_sina __pyx_mstate_global->__pyx_n_s_min_date_sina
#define __pyx_n_s_min_date_sina_str __pyx_mstate_global->__pyx_n_s_min_date_sina_str
#define __pyx_n_s_mininterval __pyx_mstate_global->__pyx_n_s_mininterval
#define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
#define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
#define __pyx_n_s_mro_entries __pyx_mstate_global->__pyx_n_s_mro_entries
#define __pyx_n_s_multi_thread __pyx_mstate_global->__pyx_n_s_multi_thread
#define __pyx_n_s_multi_type __pyx_mstate_global->__pyx_n_s_multi_type
#define __pyx_n_s_mysql_table_name __pyx_mstate_global->__pyx_n_s_mysql_table_name
#define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
#define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
#define __pyx_n_s_name_A __pyx_mstate_global->__pyx_n_s_name_A
#define __pyx_n_s_name_B __pyx_mstate_global->__pyx_n_s_name_B
#define __pyx_n_s_nan __pyx_mstate_global->__pyx_n_s_nan
#define __pyx_kp_u_need_to_update __pyx_mstate_global->__pyx_kp_u_need_to_update
#define __pyx_n_s_need_update __pyx_mstate_global->__pyx_n_s_need_update
#define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
#define __pyx_n_s_new_data_fist_date_str __pyx_mstate_global->__pyx_n_s_new_data_fist_date_str
#define __pyx_n_s_new_order __pyx_mstate_global->__pyx_n_s_new_order
#define __pyx_n_s_new_record __pyx_mstate_global->__pyx_n_s_new_record
#define __pyx_n_s_new_stocks __pyx_mstate_global->__pyx_n_s_new_stocks
#define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
#define __pyx_n_s_next_session __pyx_mstate_global->__pyx_n_s_next_session
#define __pyx_n_s_no_fault __pyx_mstate_global->__pyx_n_s_no_fault
#define __pyx_n_s_non_serializable_attrs __pyx_mstate_global->__pyx_n_s_non_serializable_attrs
#define __pyx_kp_u_not_in_stock_basic_info __pyx_mstate_global->__pyx_kp_u_not_in_stock_basic_info
#define __pyx_n_s_np __pyx_mstate_global->__pyx_n_s_np
#define __pyx_n_s_null_list __pyx_mstate_global->__pyx_n_s_null_list
#define __pyx_n_s_null_rows __pyx_mstate_global->__pyx_n_s_null_rows
#define __pyx_kp_s_null_value_row_id_d_row_date_s_r __pyx_mstate_global->__pyx_kp_s_null_value_row_id_d_row_date_s_r
#define __pyx_n_s_numpy __pyx_mstate_global->__pyx_n_s_numpy
#define __pyx_n_s_object __pyx_mstate_global->__pyx_n_s_object
#define __pyx_n_s_on __pyx_mstate_global->__pyx_n_s_on
#define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
#define __pyx_n_s_open_interest __pyx_mstate_global->__pyx_n_s_open_interest
#define __pyx_n_s_order_by __pyx_mstate_global->__pyx_n_s_order_by
#define __pyx_n_s_origin_factor __pyx_mstate_global->__pyx_n_s_origin_factor
#define __pyx_n_s_outstand_share __pyx_mstate_global->__pyx_n_s_outstand_share
#define __pyx_n_s_pandas __pyx_mstate_global->__pyx_n_s_pandas
#define __pyx_kp_u_pandas_version __pyx_mstate_global->__pyx_kp_u_pandas_version
#define __pyx_n_s_pd __pyx_mstate_global->__pyx_n_s_pd
#define __pyx_n_s_period __pyx_mstate_global->__pyx_n_s_period
#define __pyx_n_s_pop __pyx_mstate_global->__pyx_n_s_pop
#define __pyx_n_s_pre_close __pyx_mstate_global->__pyx_n_s_pre_close
#define __pyx_n_s_pre_close_first __pyx_mstate_global->__pyx_n_s_pre_close_first
#define __pyx_n_s_preclose __pyx_mstate_global->__pyx_n_s_preclose
#define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
#define __pyx_n_s_print __pyx_mstate_global->__pyx_n_s_print
#define __pyx_n_s_process __pyx_mstate_global->__pyx_n_s_process
#define __pyx_n_s_province __pyx_mstate_global->__pyx_n_s_province
#define __pyx_n_s_qfq __pyx_mstate_global->__pyx_n_s_qfq
#define __pyx_n_s_qfq_close __pyx_mstate_global->__pyx_n_s_qfq_close
#define __pyx_n_s_qfq_factor __pyx_mstate_global->__pyx_n_s_qfq_factor
#define __pyx_kp_s_qfq_factor_2 __pyx_mstate_global->__pyx_kp_s_qfq_factor_2
#define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
#define __pyx_n_s_quarter __pyx_mstate_global->__pyx_n_s_quarter
#define __pyx_n_s_query __pyx_mstate_global->__pyx_n_s_query
#define __pyx_n_s_query_history_k_data_plus __pyx_mstate_global->__pyx_n_s_query_history_k_data_plus
#define __pyx_n_s_range __pyx_mstate_global->__pyx_n_s_range
#define __pyx_n_s_read_csv __pyx_mstate_global->__pyx_n_s_read_csv
#define __pyx_n_s_remove __pyx_mstate_global->__pyx_n_s_remove
#define __pyx_n_s_rename __pyx_mstate_global->__pyx_n_s_rename
#define __pyx_n_s_rename_stock_df __pyx_mstate_global->__pyx_n_s_rename_stock_df
#define __pyx_n_s_replace __pyx_mstate_global->__pyx_n_s_replace
#define __pyx_n_s_report __pyx_mstate_global->__pyx_n_s_report
#define __pyx_n_s_report_date __pyx_mstate_global->__pyx_n_s_report_date
#define __pyx_n_s_res __pyx_mstate_global->__pyx_n_s_res
#define __pyx_n_s_res_fq __pyx_mstate_global->__pyx_n_s_res_fq
#define __pyx_n_s_restoration_price_hfq __pyx_mstate_global->__pyx_n_s_restoration_price_hfq
#define __pyx_n_s_restoration_price_qfq __pyx_mstate_global->__pyx_n_s_restoration_price_qfq
#define __pyx_n_s_result __pyx_mstate_global->__pyx_n_s_result
#define __pyx_n_s_result_day_data __pyx_mstate_global->__pyx_n_s_result_day_data
#define __pyx_n_s_return __pyx_mstate_global->__pyx_n_s_return
#define __pyx_n_s_reversed __pyx_mstate_global->__pyx_n_s_reversed
#define __pyx_n_s_round __pyx_mstate_global->__pyx_n_s_round
#define __pyx_n_s_row __pyx_mstate_global->__pyx_n_s_row
#define __pyx_n_s_row_code __pyx_mstate_global->__pyx_n_s_row_code
#define __pyx_n_s_row_date __pyx_mstate_global->__pyx_n_s_row_date
#define __pyx_n_s_row_index1 __pyx_mstate_global->__pyx_n_s_row_index1
#define __pyx_n_s_row_index2 __pyx_mstate_global->__pyx_n_s_row_index2
#define __pyx_n_s_row_indice __pyx_mstate_global->__pyx_n_s_row_indice
#define __pyx_n_s_row_qfq_factor __pyx_mstate_global->__pyx_n_s_row_qfq_factor
#define __pyx_kp_u_row_qfq_factor_equal_zero_when __pyx_mstate_global->__pyx_kp_u_row_qfq_factor_equal_zero_when
#define __pyx_n_s_rows __pyx_mstate_global->__pyx_n_s_rows
#define __pyx_n_s_rs __pyx_mstate_global->__pyx_n_s_rs
#define __pyx_n_s_rzrq __pyx_mstate_global->__pyx_n_s_rzrq
#define __pyx_n_s_rzrq_history __pyx_mstate_global->__pyx_n_s_rzrq_history
#define __pyx_n_s_rzrq_trade_day __pyx_mstate_global->__pyx_n_s_rzrq_trade_day
#define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s
#define __pyx_n_s_saveHistTradeDayInfoBaostock __pyx_mstate_global->__pyx_n_s_saveHistTradeDayInfoBaostock
#define __pyx_n_s_saveHistTradeDayInfoEm __pyx_mstate_global->__pyx_n_s_saveHistTradeDayInfoEm
#define __pyx_n_s_saveHistTradeDayInfoSina __pyx_mstate_global->__pyx_n_s_saveHistTradeDayInfoSina
#define __pyx_n_s_scalar __pyx_mstate_global->__pyx_n_s_scalar
#define __pyx_n_s_sdc __pyx_mstate_global->__pyx_n_s_sdc
#define __pyx_kp_u_sdc_stock_fhps_detail_em_return __pyx_mstate_global->__pyx_kp_u_sdc_stock_fhps_detail_em_return
#define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
#define __pyx_n_s_session __pyx_mstate_global->__pyx_n_s_session
#define __pyx_n_s_setTableColumnValue __pyx_mstate_global->__pyx_n_s_setTableColumnValue
#define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
#define __pyx_n_s_set_option __pyx_mstate_global->__pyx_n_s_set_option
#define __pyx_n_s_sh_calendar __pyx_mstate_global->__pyx_n_s_sh_calendar
#define __pyx_n_s_shape __pyx_mstate_global->__pyx_n_s_shape
#define __pyx_n_s_shift __pyx_mstate_global->__pyx_n_s_shift
#define __pyx_n_s_shutdown __pyx_mstate_global->__pyx_n_s_shutdown
#define __pyx_n_s_simple_info __pyx_mstate_global->__pyx_n_s_simple_info
#define __pyx_n_s_simple_stock_code __pyx_mstate_global->__pyx_n_s_simple_stock_code
#define __pyx_n_s_sina __pyx_mstate_global->__pyx_n_s_sina
#define __pyx_n_s_single __pyx_mstate_global->__pyx_n_s_single
#define __pyx_n_s_size __pyx_mstate_global->__pyx_n_s_size
#define __pyx_kp_u_so_execute_delete_its_all_data __pyx_mstate_global->__pyx_kp_u_so_execute_delete_its_all_data
#define __pyx_n_s_sort_values __pyx_mstate_global->__pyx_n_s_sort_values
#define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
#define __pyx_n_s_split __pyx_mstate_global->__pyx_n_s_split
#define __pyx_n_s_splitDataframeByYear __pyx_mstate_global->__pyx_n_s_splitDataframeByYear
#define __pyx_n_s_split_dict __pyx_mstate_global->__pyx_n_s_split_dict
#define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
#define __pyx_n_s_startWithDigit __pyx_mstate_global->__pyx_n_s_startWithDigit
#define __pyx_n_s_start_date __pyx_mstate_global->__pyx_n_s_start_date
#define __pyx_n_s_start_time __pyx_mstate_global->__pyx_n_s_start_time
#define __pyx_kp_u_stock __pyx_mstate_global->__pyx_kp_u_stock
#define __pyx_n_s_stockDataCrawler __pyx_mstate_global->__pyx_n_s_stockDataCrawler
#define __pyx_n_s_stock_basic_info __pyx_mstate_global->__pyx_n_s_stock_basic_info
#define __pyx_n_s_stock_basic_info_df __pyx_mstate_global->__pyx_n_s_stock_basic_info_df
#define __pyx_n_s_stock_board_concept_cons_em __pyx_mstate_global->__pyx_n_s_stock_board_concept_cons_em
#define __pyx_n_s_stock_board_concept_hist_em __pyx_mstate_global->__pyx_n_s_stock_board_concept_hist_em
#define __pyx_n_s_stock_board_concept_name_em __pyx_mstate_global->__pyx_n_s_stock_board_concept_name_em
#define __pyx_n_s_stock_board_industry_cons_em __pyx_mstate_global->__pyx_n_s_stock_board_industry_cons_em
#define __pyx_n_s_stock_board_industry_hist_em __pyx_mstate_global->__pyx_n_s_stock_board_industry_hist_em
#define __pyx_n_s_stock_board_industry_name_em __pyx_mstate_global->__pyx_n_s_stock_board_industry_name_em
#define __pyx_n_s_stock_code __pyx_mstate_global->__pyx_n_s_stock_code
#define __pyx_n_s_stock_code_back __pyx_mstate_global->__pyx_n_s_stock_code_back
#define __pyx_n_s_stock_concept_basic_info __pyx_mstate_global->__pyx_n_s_stock_concept_basic_info
#define __pyx_n_s_stock_concept_trade_day __pyx_mstate_global->__pyx_n_s_stock_concept_trade_day
#define __pyx_n_s_stock_dividend_info __pyx_mstate_global->__pyx_n_s_stock_dividend_info
#define __pyx_kp_u_stock_dividend_info_of __pyx_mstate_global->__pyx_kp_u_stock_dividend_info_of
#define __pyx_n_s_stock_dividend_ps __pyx_mstate_global->__pyx_n_s_stock_dividend_ps
#define __pyx_n_s_stock_dividends __pyx_mstate_global->__pyx_n_s_stock_dividends
#define __pyx_n_s_stock_fhps_detail_em __pyx_mstate_global->__pyx_n_s_stock_fhps_detail_em
#define __pyx_n_s_stock_finance_mfd_quarter_em __pyx_mstate_global->__pyx_n_s_stock_finance_mfd_quarter_em
#define __pyx_n_s_stock_finance_mfd_report_em __pyx_mstate_global->__pyx_n_s_stock_finance_mfd_report_em
#define __pyx_n_s_stock_financial_quarter __pyx_mstate_global->__pyx_n_s_stock_financial_quarter
#define __pyx_n_s_stock_financial_report __pyx_mstate_global->__pyx_n_s_stock_financial_report
#define __pyx_n_s_stock_fq_factor __pyx_mstate_global->__pyx_n_s_stock_fq_factor
#define __pyx_n_s_stock_full_code __pyx_mstate_global->__pyx_n_s_stock_full_code
#define __pyx_n_s_stock_hold_number __pyx_mstate_global->__pyx_n_s_stock_hold_number
#define __pyx_n_s_stock_hsgt_detail __pyx_mstate_global->__pyx_n_s_stock_hsgt_detail
#define __pyx_n_s_stock_hsgt_trade_day __pyx_mstate_global->__pyx_n_s_stock_hsgt_trade_day
#define __pyx_n_s_stock_individual_info_em __pyx_mstate_global->__pyx_n_s_stock_individual_info_em
#define __pyx_n_s_stock_individual_info_em_df __pyx_mstate_global->__pyx_n_s_stock_individual_info_em_df
#define __pyx_n_s_stock_industry_basic_info __pyx_mstate_global->__pyx_n_s_stock_industry_basic_info
#define __pyx_n_s_stock_industry_concept_basic __pyx_mstate_global->__pyx_n_s_stock_industry_concept_basic
#define __pyx_n_s_stock_industry_concept_basic_inf __pyx_mstate_global->__pyx_n_s_stock_industry_concept_basic_inf
#define __pyx_n_s_stock_industry_trade_day __pyx_mstate_global->__pyx_n_s_stock_industry_trade_day
#define __pyx_n_s_stock_info_a_code_name __pyx_mstate_global->__pyx_n_s_stock_info_a_code_name
#define __pyx_n_s_stock_item __pyx_mstate_global->__pyx_n_s_stock_item
#define __pyx_n_s_stock_len __pyx_mstate_global->__pyx_n_s_stock_len
#define __pyx_n_s_stock_name __pyx_mstate_global->__pyx_n_s_stock_name
#define __pyx_n_s_stock_name_new __pyx_mstate_global->__pyx_n_s_stock_name_new
#define __pyx_n_s_stock_query __pyx_mstate_global->__pyx_n_s_stock_query
#define __pyx_n_s_stock_rzrq_detail __pyx_mstate_global->__pyx_n_s_stock_rzrq_detail
#define __pyx_n_s_stock_rzrq_trade_day __pyx_mstate_global->__pyx_n_s_stock_rzrq_trade_day
#define __pyx_n_s_stock_simple_code __pyx_mstate_global->__pyx_n_s_stock_simple_code
#define __pyx_n_s_stock_simple_info __pyx_mstate_global->__pyx_n_s_stock_simple_info
#define __pyx_n_s_stock_tfp_em __pyx_mstate_global->__pyx_n_s_stock_tfp_em
#define __pyx_n_s_stock_tfp_em_df __pyx_mstate_global->__pyx_n_s_stock_tfp_em_df
#define __pyx_n_s_stock_to_update __pyx_mstate_global->__pyx_n_s_stock_to_update
#define __pyx_n_s_stock_trade_day __pyx_mstate_global->__pyx_n_s_stock_trade_day
#define __pyx_n_s_stock_trade_day_2 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2
#define __pyx_n_s_stock_trade_day_2018 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2018
#define __pyx_n_s_stock_trade_day_2019 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2019
#define __pyx_n_s_stock_trade_day_2020 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2020
#define __pyx_n_s_stock_trade_day_2021 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2021
#define __pyx_n_s_stock_trade_day_2022 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2022
#define __pyx_n_s_stock_trade_day_2023 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2023
#define __pyx_n_s_stock_trade_day_2024 __pyx_mstate_global->__pyx_n_s_stock_trade_day_2024
#define __pyx_n_s_stock_trade_day_df __pyx_mstate_global->__pyx_n_s_stock_trade_day_df
#define __pyx_n_s_stock_zh_a_daily __pyx_mstate_global->__pyx_n_s_stock_zh_a_daily
#define __pyx_n_s_stock_zh_a_gdhs __pyx_mstate_global->__pyx_n_s_stock_zh_a_gdhs
#define __pyx_n_s_stock_zh_a_gdhs_detail_em __pyx_mstate_global->__pyx_n_s_stock_zh_a_gdhs_detail_em
#define __pyx_n_s_stock_zh_a_hist __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist
#define __pyx_n_s_stock_zh_a_hist_em_bfq __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist_em_bfq
#define __pyx_n_s_stock_zh_a_hist_sina_bfq __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist_sina_bfq
#define __pyx_n_s_stock_zh_a_hist_sina_fq_factor __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist_sina_fq_factor
#define __pyx_n_s_stock_zh_a_hist_sina_hfq __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist_sina_hfq
#define __pyx_n_s_stock_zh_a_hist_sina_qfq __pyx_mstate_global->__pyx_n_s_stock_zh_a_hist_sina_qfq
#define __pyx_n_s_stock_zh_index_daily_em __pyx_mstate_global->__pyx_n_s_stock_zh_index_daily_em
#define __pyx_n_s_stock_zyjs_ths __pyx_mstate_global->__pyx_n_s_stock_zyjs_ths
#define __pyx_n_s_stock_zyjs_ths_df __pyx_mstate_global->__pyx_n_s_stock_zyjs_ths_df
#define __pyx_n_s_stocks_list __pyx_mstate_global->__pyx_n_s_stocks_list
#define __pyx_n_s_str __pyx_mstate_global->__pyx_n_s_str
#define __pyx_n_s_strftime __pyx_mstate_global->__pyx_n_s_strftime
#define __pyx_n_s_strptime __pyx_mstate_global->__pyx_n_s_strptime
#define __pyx_n_s_submit __pyx_mstate_global->__pyx_n_s_submit
#define __pyx_n_s_succeed __pyx_mstate_global->__pyx_n_s_succeed
#define __pyx_kp_u_succeed_2 __pyx_mstate_global->__pyx_kp_u_succeed_2
#define __pyx_n_s_suffixes __pyx_mstate_global->__pyx_n_s_suffixes
#define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
#define __pyx_n_s_suspended_stock_list __pyx_mstate_global->__pyx_n_s_suspended_stock_list
#define __pyx_n_s_symbol __pyx_mstate_global->__pyx_n_s_symbol
#define __pyx_n_s_synchronize_session __pyx_mstate_global->__pyx_n_s_synchronize_session
#define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
#define __pyx_n_s_tableTools __pyx_mstate_global->__pyx_n_s_tableTools
#define __pyx_n_s_table_base_name __pyx_mstate_global->__pyx_n_s_table_base_name
#define __pyx_kp_u_table_code_name_first_date_prov __pyx_mstate_global->__pyx_kp_u_table_code_name_first_date_prov
#define __pyx_n_s_table_columns __pyx_mstate_global->__pyx_n_s_table_columns
#define __pyx_kp_u_table_has_been_updated __pyx_mstate_global->__pyx_kp_u_table_has_been_updated
#define __pyx_kp_u_table_has_been_updated_2 __pyx_mstate_global->__pyx_kp_u_table_has_been_updated_2
#define __pyx_kp_u_table_has_been_updated_by_updat __pyx_mstate_global->__pyx_kp_u_table_has_been_updated_by_updat
#define __pyx_kp_u_table_has_been_updated_by_updat_2 __pyx_mstate_global->__pyx_kp_u_table_has_been_updated_by_updat_2
#define __pyx_kp_u_table_industry_concept_is_margi __pyx_mstate_global->__pyx_kp_u_table_industry_concept_is_margi
#define __pyx_n_s_table_max_date_str __pyx_mstate_global->__pyx_n_s_table_max_date_str
#define __pyx_n_s_table_name __pyx_mstate_global->__pyx_n_s_table_name
#define __pyx_n_s_table_name_year __pyx_mstate_global->__pyx_n_s_table_name_year
#define __pyx_n_s_tbstock __pyx_mstate_global->__pyx_n_s_tbstock
#define __pyx_n_s_tbstock_dataAcquisition_models __pyx_mstate_global->__pyx_n_s_tbstock_dataAcquisition_models
#define __pyx_kp_s_tbstock_dataAcquisition_saveData __pyx_mstate_global->__pyx_kp_s_tbstock_dataAcquisition_saveData
#define __pyx_n_s_tbstock_dataAcquisition_saveData_2 __pyx_mstate_global->__pyx_n_s_tbstock_dataAcquisition_saveData_2
#define __pyx_n_s_tbstock_dataAcquisition_stockDat __pyx_mstate_global->__pyx_n_s_tbstock_dataAcquisition_stockDat
#define __pyx_n_s_tbstock_dataManagement_dataPrepr __pyx_mstate_global->__pyx_n_s_tbstock_dataManagement_dataPrepr
#define __pyx_n_s_tbstock_utils __pyx_mstate_global->__pyx_n_s_tbstock_utils
#define __pyx_n_s_temp __pyx_mstate_global->__pyx_n_s_temp
#define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
#define __pyx_n_s_test_2 __pyx_mstate_global->__pyx_n_s_test_2
#define __pyx_n_s_test_simple_code __pyx_mstate_global->__pyx_n_s_test_simple_code
#define __pyx_n_s_thread __pyx_mstate_global->__pyx_n_s_thread
#define __pyx_n_s_time __pyx_mstate_global->__pyx_n_s_time
#define __pyx_kp_u_time_cost __pyx_mstate_global->__pyx_kp_u_time_cost
#define __pyx_n_s_to_datetime __pyx_mstate_global->__pyx_n_s_to_datetime
#define __pyx_n_s_to_list __pyx_mstate_global->__pyx_n_s_to_list
#define __pyx_n_s_to_numeric __pyx_mstate_global->__pyx_n_s_to_numeric
#define __pyx_n_s_to_sql __pyx_mstate_global->__pyx_n_s_to_sql
#define __pyx_n_s_today_date __pyx_mstate_global->__pyx_n_s_today_date
#define __pyx_n_s_total __pyx_mstate_global->__pyx_n_s_total
#define __pyx_n_s_tqdm __pyx_mstate_global->__pyx_n_s_tqdm
#define __pyx_kp_u_trade_data_failed_to_save_in_ta __pyx_mstate_global->__pyx_kp_u_trade_data_failed_to_save_in_ta
#define __pyx_kp_u_trade_day_data_failed_save_in __pyx_mstate_global->__pyx_kp_u_trade_day_data_failed_save_in
#define __pyx_kp_u_trade_day_data_is_empty __pyx_mstate_global->__pyx_kp_u_trade_day_data_is_empty
#define __pyx_n_s_tradestatus __pyx_mstate_global->__pyx_n_s_tradestatus
#define __pyx_n_s_turn __pyx_mstate_global->__pyx_n_s_turn
#define __pyx_n_s_turn_over __pyx_mstate_global->__pyx_n_s_turn_over
#define __pyx_n_s_types __pyx_mstate_global->__pyx_n_s_types
#define __pyx_n_s_unassign_profit_ps __pyx_mstate_global->__pyx_n_s_unassign_profit_ps
#define __pyx_kp_u_update __pyx_mstate_global->__pyx_kp_u_update
#define __pyx_n_s_updateFutureTradeDayToMysql __pyx_mstate_global->__pyx_n_s_updateFutureTradeDayToMysql
#define __pyx_n_s_updateIndexTradeDayToMysql __pyx_mstate_global->__pyx_n_s_updateIndexTradeDayToMysql
#define __pyx_n_s_updateKzzBasicInfoToMysql __pyx_mstate_global->__pyx_n_s_updateKzzBasicInfoToMysql
#define __pyx_n_s_updateLib __pyx_mstate_global->__pyx_n_s_updateLib
#define __pyx_n_s_updateRzrqHsgtTradeDayToMysql __pyx_mstate_global->__pyx_n_s_updateRzrqHsgtTradeDayToMysql
#define __pyx_n_s_updateSingleFutureTradeDayInfo __pyx_mstate_global->__pyx_n_s_updateSingleFutureTradeDayInfo
#define __pyx_n_s_updateSingleIndexTradeDayInfo __pyx_mstate_global->__pyx_n_s_updateSingleIndexTradeDayInfo
#define __pyx_n_s_updateSingleStockBasicInfo __pyx_mstate_global->__pyx_n_s_updateSingleStockBasicInfo
#define __pyx_n_s_updateSingleStockDividendInfo __pyx_mstate_global->__pyx_n_s_updateSingleStockDividendInfo
#define __pyx_n_s_updateSingleStockFinancialData __pyx_mstate_global->__pyx_n_s_updateSingleStockFinancialData
#define __pyx_n_s_updateSingleStockFqFactor __pyx_mstate_global->__pyx_n_s_updateSingleStockFqFactor
#define __pyx_n_s_updateSingleStockHoldNumber __pyx_mstate_global->__pyx_n_s_updateSingleStockHoldNumber
#define __pyx_n_s_updateSingleStockRzrqHsgtData __pyx_mstate_global->__pyx_n_s_updateSingleStockRzrqHsgtData
#define __pyx_n_s_updateSingleStockTradeDayInfo __pyx_mstate_global->__pyx_n_s_updateSingleStockTradeDayInfo
#define __pyx_n_s_updateStockBasicInfoByIndustryCo __pyx_mstate_global->__pyx_n_s_updateStockBasicInfoByIndustryCo
#define __pyx_n_s_updateStockBasicInfoToMysql __pyx_mstate_global->__pyx_n_s_updateStockBasicInfoToMysql
#define __pyx_n_s_updateStockConceptInfo __pyx_mstate_global->__pyx_n_s_updateStockConceptInfo
#define __pyx_n_s_updateStockDividendInfoToMysql __pyx_mstate_global->__pyx_n_s_updateStockDividendInfoToMysql
#define __pyx_n_s_updateStockFinancialToMysql __pyx_mstate_global->__pyx_n_s_updateStockFinancialToMysql
#define __pyx_n_s_updateStockFqFactorToMysql __pyx_mstate_global->__pyx_n_s_updateStockFqFactorToMysql
#define __pyx_n_s_updateStockHoldNumberToMysql __pyx_mstate_global->__pyx_n_s_updateStockHoldNumberToMysql
#define __pyx_n_s_updateStockIndustryConceptBasicI __pyx_mstate_global->__pyx_n_s_updateStockIndustryConceptBasicI
#define __pyx_n_s_updateStockIndustryConceptTradeD __pyx_mstate_global->__pyx_n_s_updateStockIndustryConceptTradeD
#define __pyx_n_s_updateStockIndustryInfo __pyx_mstate_global->__pyx_n_s_updateStockIndustryInfo
#define __pyx_n_s_updateStockRzrqHsgtTradeDayToMys __pyx_mstate_global->__pyx_n_s_updateStockRzrqHsgtTradeDayToMys
#define __pyx_n_s_updateStockSimpleInfoToMysql __pyx_mstate_global->__pyx_n_s_updateStockSimpleInfoToMysql
#define __pyx_n_s_updateStockTables __pyx_mstate_global->__pyx_n_s_updateStockTables
#define __pyx_kp_u_updateStockTables_time_cost __pyx_mstate_global->__pyx_kp_u_updateStockTables_time_cost
#define __pyx_n_s_updateStockTradeDayInfo __pyx_mstate_global->__pyx_n_s_updateStockTradeDayInfo
#define __pyx_n_s_updateStrategyDict __pyx_mstate_global->__pyx_n_s_updateStrategyDict
#define __pyx_kp_s_update_concept __pyx_mstate_global->__pyx_kp_s_update_concept
#define __pyx_kp_u_update_concept_There_exist __pyx_mstate_global->__pyx_kp_u_update_concept_There_exist
#define __pyx_n_s_update_db_logs_dir __pyx_mstate_global->__pyx_n_s_update_db_logs_dir
#define __pyx_n_s_update_dict __pyx_mstate_global->__pyx_n_s_update_dict
#define __pyx_kp_s_update_industry __pyx_mstate_global->__pyx_kp_s_update_industry
#define __pyx_kp_u_update_industry_This __pyx_mstate_global->__pyx_kp_u_update_industry_This
#define __pyx_n_s_update_json __pyx_mstate_global->__pyx_n_s_update_json
#define __pyx_n_s_update_list __pyx_mstate_global->__pyx_n_s_update_list
#define __pyx_n_s_update_range __pyx_mstate_global->__pyx_n_s_update_range
#define __pyx_n_s_updated __pyx_mstate_global->__pyx_n_s_updated
#define __pyx_n_s_updated_concept __pyx_mstate_global->__pyx_n_s_updated_concept
#define __pyx_n_s_updated_industry __pyx_mstate_global->__pyx_n_s_updated_industry
#define __pyx_n_s_updated_list __pyx_mstate_global->__pyx_n_s_updated_list
#define __pyx_n_s_updated_list_index __pyx_mstate_global->__pyx_n_s_updated_list_index
#define __pyx_kp_s_updatelog_json __pyx_mstate_global->__pyx_kp_s_updatelog_json
#define __pyx_n_s_utils __pyx_mstate_global->__pyx_n_s_utils
#define __pyx_n_s_value __pyx_mstate_global->__pyx_n_s_value
#define __pyx_n_s_values __pyx_mstate_global->__pyx_n_s_values
#define __pyx_n_s_version __pyx_mstate_global->__pyx_n_s_version
#define __pyx_n_s_volume __pyx_mstate_global->__pyx_n_s_volume
#define __pyx_n_s_wait __pyx_mstate_global->__pyx_n_s_wait
#define __pyx_n_s_warning __pyx_mstate_global->__pyx_n_s_warning
#define __pyx_n_s_workers __pyx_mstate_global->__pyx_n_s_workers
#define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
#define __pyx_kp_s_xx __pyx_mstate_global->__pyx_kp_s_xx
#define __pyx_n_s_year __pyx_mstate_global->__pyx_n_s_year
#define __pyx_n_s_year_list __pyx_mstate_global->__pyx_n_s_year_list
#define __pyx_n_s_year_stock_data __pyx_mstate_global->__pyx_n_s_year_stock_data
#define __pyx_n_s_zip __pyx_mstate_global->__pyx_n_s_zip
#define __pyx_float_1_0 __pyx_mstate_global->__pyx_float_1_0
#define __pyx_float_0_01 __pyx_mstate_global->__pyx_float_0_01
#define __pyx_float_10_0 __pyx_mstate_global->__pyx_float_10_0
#define __pyx_float_100_0 __pyx_mstate_global->__pyx_float_100_0
#define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
#define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
#define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
#define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
#define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
#define __pyx_int_6 __pyx_mstate_global->__pyx_int_6
#define __pyx_int_10 __pyx_mstate_global->__pyx_int_10
#define __pyx_int_12 __pyx_mstate_global->__pyx_int_12
#define __pyx_int_100 __pyx_mstate_global->__pyx_int_100
#define __pyx_int_1900 __pyx_mstate_global->__pyx_int_1900
#define __pyx_int_2100 __pyx_mstate_global->__pyx_int_2100
#define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
#define __pyx_tuple__6 __pyx_mstate_global->__pyx_tuple__6
#define __pyx_tuple__7 __pyx_mstate_global->__pyx_tuple__7
#define __pyx_slice__37 __pyx_mstate_global->__pyx_slice__37
#define __pyx_slice__53 __pyx_mstate_global->__pyx_slice__53
#define __pyx_slice__55 __pyx_mstate_global->__pyx_slice__55
#define __pyx_slice__56 __pyx_mstate_global->__pyx_slice__56
#define __pyx_slice__57 __pyx_mstate_global->__pyx_slice__57
#define __pyx_tuple__12 __pyx_mstate_global->__pyx_tuple__12
#define __pyx_tuple__14 __pyx_mstate_global->__pyx_tuple__14
#define __pyx_tuple__16 __pyx_mstate_global->__pyx_tuple__16
#define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
#define __pyx_tuple__23 __pyx_mstate_global->__pyx_tuple__23
#define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
#define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
#define __pyx_tuple__27 __pyx_mstate_global->__pyx_tuple__27
#define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
#define __pyx_tuple__29 __pyx_mstate_global->__pyx_tuple__29
#define __pyx_tuple__34 __pyx_mstate_global->__pyx_tuple__34
#define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
#define __pyx_tuple__40 __pyx_mstate_global->__pyx_tuple__40
#define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
#define __pyx_tuple__43 __pyx_mstate_global->__pyx_tuple__43
#define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
#define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
#define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
#define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
#define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
#define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
#define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
#define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
#define __pyx_tuple__79 __pyx_mstate_global->__pyx_tuple__79
#define __pyx_tuple__81 __pyx_mstate_global->__pyx_tuple__81
#define __pyx_tuple__83 __pyx_mstate_global->__pyx_tuple__83
#define __pyx_tuple__85 __pyx_mstate_global->__pyx_tuple__85
#define __pyx_tuple__92 __pyx_mstate_global->__pyx_tuple__92
#define __pyx_tuple__95 __pyx_mstate_global->__pyx_tuple__95
#define __pyx_tuple__96 __pyx_mstate_global->__pyx_tuple__96
#define __pyx_tuple__97 __pyx_mstate_global->__pyx_tuple__97
#define __pyx_tuple__98 __pyx_mstate_global->__pyx_tuple__98
#define __pyx_tuple__99 __pyx_mstate_global->__pyx_tuple__99
#define __pyx_tuple__100 __pyx_mstate_global->__pyx_tuple__100
#define __pyx_tuple__102 __pyx_mstate_global->__pyx_tuple__102
#define __pyx_tuple__103 __pyx_mstate_global->__pyx_tuple__103
#define __pyx_tuple__105 __pyx_mstate_global->__pyx_tuple__105
#define __pyx_tuple__107 __pyx_mstate_global->__pyx_tuple__107
#define __pyx_tuple__108 __pyx_mstate_global->__pyx_tuple__108
#define __pyx_tuple__110 __pyx_mstate_global->__pyx_tuple__110
#define __pyx_tuple__111 __pyx_mstate_global->__pyx_tuple__111
#define __pyx_tuple__113 __pyx_mstate_global->__pyx_tuple__113
#define __pyx_tuple__114 __pyx_mstate_global->__pyx_tuple__114
#define __pyx_tuple__116 __pyx_mstate_global->__pyx_tuple__116
#define __pyx_tuple__118 __pyx_mstate_global->__pyx_tuple__118
#define __pyx_tuple__119 __pyx_mstate_global->__pyx_tuple__119
#define __pyx_tuple__121 __pyx_mstate_global->__pyx_tuple__121
#define __pyx_tuple__122 __pyx_mstate_global->__pyx_tuple__122
#define __pyx_tuple__124 __pyx_mstate_global->__pyx_tuple__124
#define __pyx_tuple__125 __pyx_mstate_global->__pyx_tuple__125
#define __pyx_tuple__127 __pyx_mstate_global->__pyx_tuple__127
#define __pyx_tuple__130 __pyx_mstate_global->__pyx_tuple__130
#define __pyx_tuple__132 __pyx_mstate_global->__pyx_tuple__132
#define __pyx_tuple__134 __pyx_mstate_global->__pyx_tuple__134
#define __pyx_tuple__136 __pyx_mstate_global->__pyx_tuple__136
#define __pyx_tuple__138 __pyx_mstate_global->__pyx_tuple__138
#define __pyx_tuple__140 __pyx_mstate_global->__pyx_tuple__140
#define __pyx_tuple__142 __pyx_mstate_global->__pyx_tuple__142
#define __pyx_tuple__143 __pyx_mstate_global->__pyx_tuple__143
#define __pyx_tuple__145 __pyx_mstate_global->__pyx_tuple__145
#define __pyx_tuple__146 __pyx_mstate_global->__pyx_tuple__146
#define __pyx_tuple__148 __pyx_mstate_global->__pyx_tuple__148
#define __pyx_tuple__150 __pyx_mstate_global->__pyx_tuple__150
#define __pyx_tuple__151 __pyx_mstate_global->__pyx_tuple__151
#define __pyx_tuple__153 __pyx_mstate_global->__pyx_tuple__153
#define __pyx_tuple__156 __pyx_mstate_global->__pyx_tuple__156
#define __pyx_tuple__158 __pyx_mstate_global->__pyx_tuple__158
#define __pyx_tuple__159 __pyx_mstate_global->__pyx_tuple__159
#define __pyx_tuple__161 __pyx_mstate_global->__pyx_tuple__161
#define __pyx_tuple__163 __pyx_mstate_global->__pyx_tuple__163
#define __pyx_tuple__164 __pyx_mstate_global->__pyx_tuple__164
#define __pyx_tuple__166 __pyx_mstate_global->__pyx_tuple__166
#define __pyx_tuple__167 __pyx_mstate_global->__pyx_tuple__167
#define __pyx_tuple__169 __pyx_mstate_global->__pyx_tuple__169
#define __pyx_tuple__171 __pyx_mstate_global->__pyx_tuple__171
#define __pyx_tuple__173 __pyx_mstate_global->__pyx_tuple__173
#define __pyx_tuple__175 __pyx_mstate_global->__pyx_tuple__175
#define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
#define __pyx_codeobj__69 __pyx_mstate_global->__pyx_codeobj__69
#define __pyx_codeobj__74 __pyx_mstate_global->__pyx_codeobj__74
#define __pyx_codeobj__78 __pyx_mstate_global->__pyx_codeobj__78
#define __pyx_codeobj__80 __pyx_mstate_global->__pyx_codeobj__80
#define __pyx_codeobj__82 __pyx_mstate_global->__pyx_codeobj__82
#define __pyx_codeobj__84 __pyx_mstate_global->__pyx_codeobj__84
#define __pyx_codeobj__86 __pyx_mstate_global->__pyx_codeobj__86
#define __pyx_codeobj__93 __pyx_mstate_global->__pyx_codeobj__93
#define __pyx_codeobj__101 __pyx_mstate_global->__pyx_codeobj__101
#define __pyx_codeobj__104 __pyx_mstate_global->__pyx_codeobj__104
#define __pyx_codeobj__106 __pyx_mstate_global->__pyx_codeobj__106
#define __pyx_codeobj__109 __pyx_mstate_global->__pyx_codeobj__109
#define __pyx_codeobj__112 __pyx_mstate_global->__pyx_codeobj__112
#define __pyx_codeobj__115 __pyx_mstate_global->__pyx_codeobj__115
#define __pyx_codeobj__117 __pyx_mstate_global->__pyx_codeobj__117
#define __pyx_codeobj__120 __pyx_mstate_global->__pyx_codeobj__120
#define __pyx_codeobj__123 __pyx_mstate_global->__pyx_codeobj__123
#define __pyx_codeobj__126 __pyx_mstate_global->__pyx_codeobj__126
#define __pyx_codeobj__128 __pyx_mstate_global->__pyx_codeobj__128
#define __pyx_codeobj__129 __pyx_mstate_global->__pyx_codeobj__129
#define __pyx_codeobj__131 __pyx_mstate_global->__pyx_codeobj__131
#define __pyx_codeobj__133 __pyx_mstate_global->__pyx_codeobj__133
#define __pyx_codeobj__135 __pyx_mstate_global->__pyx_codeobj__135
#define __pyx_codeobj__137 __pyx_mstate_global->__pyx_codeobj__137
#define __pyx_codeobj__139 __pyx_mstate_global->__pyx_codeobj__139
#define __pyx_codeobj__141 __pyx_mstate_global->__pyx_codeobj__141
#define __pyx_codeobj__144 __pyx_mstate_global->__pyx_codeobj__144
#define __pyx_codeobj__147 __pyx_mstate_global->__pyx_codeobj__147
#define __pyx_codeobj__149 __pyx_mstate_global->__pyx_codeobj__149
#define __pyx_codeobj__152 __pyx_mstate_global->__pyx_codeobj__152
#define __pyx_codeobj__154 __pyx_mstate_global->__pyx_codeobj__154
#define __pyx_codeobj__155 __pyx_mstate_global->__pyx_codeobj__155
#define __pyx_codeobj__157 __pyx_mstate_global->__pyx_codeobj__157
#define __pyx_codeobj__160 __pyx_mstate_global->__pyx_codeobj__160
#define __pyx_codeobj__162 __pyx_mstate_global->__pyx_codeobj__162
#define __pyx_codeobj__165 __pyx_mstate_global->__pyx_codeobj__165
#define __pyx_codeobj__168 __pyx_mstate_global->__pyx_codeobj__168
#define __pyx_codeobj__170 __pyx_mstate_global->__pyx_codeobj__170
#define __pyx_codeobj__172 __pyx_mstate_global->__pyx_codeobj__172
#define __pyx_codeobj__174 __pyx_mstate_global->__pyx_codeobj__174
#define __pyx_codeobj__176 __pyx_mstate_global->__pyx_codeobj__176
/* #### Code section: module_code ### */

/* "tbstock/dataAcquisition/saveDataToMysql.py":27
 * 
 * class DataToMysql(object):
 *     def __init__(self, dump_json_period=10):             # <<<<<<<<<<<<<<
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_1__init__ = {"__init__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_1__init__, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_1__init__(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_dump_json_period = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_dump_json_period,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_10)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dump_json_period);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 27, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 27, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_dump_json_period = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 27, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql___init__(__pyx_self, __pyx_v_self, __pyx_v_dump_json_period);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_dump_json_period) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":28
 * class DataToMysql(object):
 *     def __init__(self, dump_json_period=10):
 *         self.start_date = utils.start_date             # <<<<<<<<<<<<<<
 *         self.today_date = utils.today_date
 *         self.latest_trade_day = utils.latest_trade_day
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_start_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_start_date, __pyx_t_2) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":29
 *     def __init__(self, dump_json_period=10):
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date             # <<<<<<<<<<<<<<
 *         self.latest_trade_day = utils.latest_trade_day
 *         self.year_list = utils.year_list
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_today_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_today_date, __pyx_t_1) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":30
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date
 *         self.latest_trade_day = utils.latest_trade_day             # <<<<<<<<<<<<<<
 *         self.year_list = utils.year_list
 *         self.dump_json_period = dump_json_period
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_latest_trade_day, __pyx_t_2) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":31
 *         self.today_date = utils.today_date
 *         self.latest_trade_day = utils.latest_trade_day
 *         self.year_list = utils.year_list             # <<<<<<<<<<<<<<
 *         self.dump_json_period = dump_json_period
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_year_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_year_list, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":32
 *         self.latest_trade_day = utils.latest_trade_day
 *         self.year_list = utils.year_list
 *         self.dump_json_period = dump_json_period             # <<<<<<<<<<<<<<
 * 
 *         self.dataproc = dataproc.dataPreprocess()
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period, __pyx_v_dump_json_period) < 0) __PYX_ERR(0, 32, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":34
 *         self.dump_json_period = dump_json_period
 * 
 *         self.dataproc = dataproc.dataPreprocess()             # <<<<<<<<<<<<<<
 *         # get suspended stocks
 *         self.suspended_stock_list = self.getSuspendedStocks()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dataPreprocess); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_dataproc, __pyx_t_1) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":36
 *         self.dataproc = dataproc.dataPreprocess()
 *         # get suspended stocks
 *         self.suspended_stock_list = self.getSuspendedStocks()             # <<<<<<<<<<<<<<
 * 
 *         self.exclude_future_dict = {'JR0': '', 'RI0': '', 'LR0': '', 'WH0': ''}
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getSuspendedStocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list, __pyx_t_1) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":38
 *         self.suspended_stock_list = self.getSuspendedStocks()
 * 
 *         self.exclude_future_dict = {'JR0': '', 'RI0': '', 'LR0': '', 'WH0': ''}             # <<<<<<<<<<<<<<
 * 
 *         # init update json log
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_JR0, __pyx_kp_s_) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_RI0, __pyx_kp_s__2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_LR0, __pyx_kp_s__3) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_WH0, __pyx_kp_s__4) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_exclude_future_dict, __pyx_t_1) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":41
 * 
 *         # init update json log
 *         self.json_file_name = self.latest_trade_day + '_updatelog.json'             # <<<<<<<<<<<<<<
 *         self.load_json_file = utils.update_db_logs_dir + self.json_file_name
 *         self.update_json = {}
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s_updatelog_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":42
 *         # init update json log
 *         self.json_file_name = self.latest_trade_day + '_updatelog.json'
 *         self.load_json_file = utils.update_db_logs_dir + self.json_file_name             # <<<<<<<<<<<<<<
 *         self.update_json = {}
 *         self.has_update_file = False
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update_db_logs_dir); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Add(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":43
 *         self.json_file_name = self.latest_trade_day + '_updatelog.json'
 *         self.load_json_file = utils.update_db_logs_dir + self.json_file_name
 *         self.update_json = {}             # <<<<<<<<<<<<<<
 *         self.has_update_file = False
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_update_json, __pyx_t_2) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":44
 *         self.load_json_file = utils.update_db_logs_dir + self.json_file_name
 *         self.update_json = {}
 *         self.has_update_file = False             # <<<<<<<<<<<<<<
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *         if 'updated' not in self.update_json:
 */
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file, Py_False) < 0) __PYX_ERR(0, 44, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":45
 *         self.update_json = {}
 *         self.has_update_file = False
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)             # <<<<<<<<<<<<<<
 *         if 'updated' not in self.update_json:
 *             self.update_json['updated'] = False
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadJsonData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
    PyObject* sequence = __pyx_t_2;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 45, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_5);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    #endif
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 45, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3);
    index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L3_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_5);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_3), 2) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
    __pyx_t_7 = NULL;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L4_unpacking_done;
    __pyx_L3_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 45, __pyx_L1_error)
    __pyx_L4_unpacking_done:;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_update_json, __pyx_t_5) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":46
 *         self.has_update_file = False
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *         if 'updated' not in self.update_json:             # <<<<<<<<<<<<<<
 *             self.update_json['updated'] = False
 *         if 'updateLib' not in self.update_json:
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_updated, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 46, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":47
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *         if 'updated' not in self.update_json:
 *             self.update_json['updated'] = False             # <<<<<<<<<<<<<<
 *         if 'updateLib' not in self.update_json:
 *             self.update_json['updateLib'] = False
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 47, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":46
 *         self.has_update_file = False
 *         self.has_update_file, self.update_json = utils.loadJsonData(self.load_json_file, self.json_file_name)
 *         if 'updated' not in self.update_json:             # <<<<<<<<<<<<<<
 *             self.update_json['updated'] = False
 *         if 'updateLib' not in self.update_json:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":48
 *         if 'updated' not in self.update_json:
 *             self.update_json['updated'] = False
 *         if 'updateLib' not in self.update_json:             # <<<<<<<<<<<<<<
 *             self.update_json['updateLib'] = False
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_updateLib, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 48, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":49
 *             self.update_json['updated'] = False
 *         if 'updateLib' not in self.update_json:
 *             self.update_json['updateLib'] = False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_n_s_updateLib, Py_False) < 0))) __PYX_ERR(0, 49, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":48
 *         if 'updated' not in self.update_json:
 *             self.update_json['updated'] = False
 *         if 'updateLib' not in self.update_json:             # <<<<<<<<<<<<<<
 *             self.update_json['updateLib'] = False
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":52
 * 
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)             # <<<<<<<<<<<<<<
 *         if self.non_serializable_attrs:
 *             print("DataToMysql :", self.non_serializable_attrs)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_check_serializability); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs, __pyx_t_2) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":53
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 53, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":54
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:
 *             print("DataToMysql :", self.non_serializable_attrs)             # <<<<<<<<<<<<<<
 * 
 *     def dumpJsonToFile(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_non_serializable_attrs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s_DataToMysql);
    __Pyx_GIVEREF(__pyx_kp_s_DataToMysql);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s_DataToMysql)) __PYX_ERR(0, 54, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":53
 *         #
 *         self.non_serializable_attrs = utils.check_serializability(self)
 *         if self.non_serializable_attrs:             # <<<<<<<<<<<<<<
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":27
 * 
 * class DataToMysql(object):
 *     def __init__(self, dump_json_period=10):             # <<<<<<<<<<<<<<
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":56
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_3dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_3dumpJsonToFile = {"dumpJsonToFile", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_3dumpJsonToFile, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_3dumpJsonToFile(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("dumpJsonToFile (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 56, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "dumpJsonToFile") < 0)) __PYX_ERR(0, 56, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("dumpJsonToFile", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 56, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_2dumpJsonToFile(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_2dumpJsonToFile(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("dumpJsonToFile", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":58
 *     def dumpJsonToFile(self):
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)             # <<<<<<<<<<<<<<
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_load_json_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_json_file_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 58, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_6, __pyx_t_2, __pyx_t_4, __pyx_t_5};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_7, 3+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":56
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.dumpJsonToFile", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":60
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_5updateKzzBasicInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_5updateKzzBasicInfoToMysql = {"updateKzzBasicInfoToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_5updateKzzBasicInfoToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_5updateKzzBasicInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateKzzBasicInfoToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_name,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_kzz_basic_info)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 60, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateKzzBasicInfoToMysql") < 0)) __PYX_ERR(0, 60, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_table_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateKzzBasicInfoToMysql", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 60, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateKzzBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_4updateKzzBasicInfoToMysql(__pyx_self, __pyx_v_self, __pyx_v_table_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_4updateKzzBasicInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_simple_info = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateKzzBasicInfoToMysql", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":61
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":63
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 63, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":64
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 64, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":65
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 65, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":66
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":64
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":63
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":68
 *                 return True
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 *         update_dict = {'updated': False, 'size': 0}
 *         try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":69
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0}             # <<<<<<<<<<<<<<
 *         try:
 *             #  A
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_int_0) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
  __pyx_v_update_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":70
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":72
 *         try:
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sdc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_kzz_basic_info_em); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_simple_info = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":70
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()
 */
    }
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":73
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 *             return False
 */
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateKzzBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 73, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":74
 *             simple_info = sdc.kzz_basic_info_em()
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_utils); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        __pyx_t_7 += 42;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_7 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u__5);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 74, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 74, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":75
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L17_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":73
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 *             return False
 */
      /*finally:*/ {
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_13 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L9_except_error;
        }
        __pyx_L17_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L10_except_return;
        }
      }
    }
    goto __pyx_L9_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":70
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = sdc.kzz_basic_info_em()
 */
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L1_error;
    __pyx_L10_except_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L0;
    __pyx_L12_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":78
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 78, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 78, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":79
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 79, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":80
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         # to_sqldtype
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 80, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 80, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":79
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":83
 * 
 *         # to_sqldtype
 *         if not simple_info.empty:             # <<<<<<<<<<<<<<
 *             self.dataproc.clearTableContent(table_name)  #
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_simple_info, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 83, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":84
 *         # to_sqldtype
 *         if not simple_info.empty:
 *             self.dataproc.clearTableContent(table_name)  #             # <<<<<<<<<<<<<<
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 84, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_table_name};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 84, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":85
 *         if not simple_info.empty:
 *             self.dataproc.clearTableContent(table_name)  #
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             utils.logger.info(f"Succeed update {table_name}.")
 *             update_dict['updated'] = True
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_simple_info, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_name, __pyx_v_table_name) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_engine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_con, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":86
 *             self.dataproc.clearTableContent(table_name)  #
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         else:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_Succeed_update);
    __pyx_t_7 += 15;
    __Pyx_GIVEREF(__pyx_kp_u_Succeed_update);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Succeed_update);
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
    __Pyx_GIVEREF(__pyx_t_1);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__5);
    __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":87
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         else:
 *             utils.logger.error(f"kzz_basic_info dataframe {table_name} is Empty.")
 */
    if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 87, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":83
 * 
 *         # to_sqldtype
 *         if not simple_info.empty:             # <<<<<<<<<<<<<<
 *             self.dataproc.clearTableContent(table_name)  #
 *             simple_info.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    goto __pyx_L25;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":89
 *             update_dict['updated'] = True
 *         else:
 *             utils.logger.error(f"kzz_basic_info dataframe {table_name} is Empty.")             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = False
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_kzz_basic_info_dataframe);
    __pyx_t_7 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_kzz_basic_info_dataframe);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_kzz_basic_info_dataframe);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_is_Empty);
    __pyx_t_7 += 10;
    __Pyx_GIVEREF(__pyx_kp_u_is_Empty);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_is_Empty);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 89, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":90
 *         else:
 *             utils.logger.error(f"kzz_basic_info dataframe {table_name} is Empty.")
 *             update_dict['updated'] = False             # <<<<<<<<<<<<<<
 * 
 *         # updatejson
 */
    if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 90, __pyx_L1_error)
  }
  __pyx_L25:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":93
 * 
 *         # updatejson
 *         update_dict['size'] = simple_info.shape[0]             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_simple_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_size, __pyx_t_9) < 0))) __PYX_ERR(0, 93, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":94
 *         # updatejson
 *         update_dict['size'] = simple_info.shape[0]
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 *         return True
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 94, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":95
 *         update_dict['size'] = simple_info.shape[0]
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 95, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":96
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":60
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateKzzBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_simple_info);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":98
 *         return True
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_7updateStockSimpleInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_7updateStockSimpleInfoToMysql = {"updateStockSimpleInfoToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_7updateStockSimpleInfoToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_7updateStockSimpleInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_table_name = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockSimpleInfoToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_table_name,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_stock_simple_info)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_table_name);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockSimpleInfoToMysql") < 0)) __PYX_ERR(0, 98, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_table_name = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockSimpleInfoToMysql", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 98, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockSimpleInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_6updateStockSimpleInfoToMysql(__pyx_self, __pyx_v_self, __pyx_v_table_name);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_6updateStockSimpleInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_table_name) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_simple_info = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_diff_code = NULL;
  PyObject *__pyx_v_merged_df = NULL;
  PyObject *__pyx_v_rename_stock_df = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name_new = NULL;
  PyObject *__pyx_v_stock_to_update = NULL;
  PyObject *__pyx_v_delist_stock_df = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *(*__pyx_t_25)(PyObject *);
  PyObject *(*__pyx_t_26)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockSimpleInfoToMysql", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":99
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 99, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":101
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":102
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 102, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":103
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":104
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":102
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":101
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":106
 *                 return True
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 *         update_dict = {'updated': False, 'size': 0, 'new_stocks': []}
 *         try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":107
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0, 'new_stocks': []}             # <<<<<<<<<<<<<<
 *         try:
 *             #  A
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_int_0) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_new_stocks, __pyx_t_3) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":108
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0, 'new_stocks': []}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_10);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":110
 *         try:
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ak); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stock_info_a_code_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L7_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L7_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_simple_info = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":108
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0, 'new_stocks': []}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()
 */
    }
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    goto __pyx_L12_try_end;
    __pyx_L7_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":111
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockSimpleInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 111, __pyx_L9_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":112
 *             simple_info = ak.stock_info_a_code_name()
 *         except Exception as e:
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 112, __pyx_L18_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":113
 *         except Exception as e:
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 *             return False
 */
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 113, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":114
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_utils); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        __pyx_t_7 += 42;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Failed_to_call_ak_stock_info_a_c);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_7 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u__5);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 114, __pyx_L18_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 114, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":115
 *             self.dumpJsonToFile()
 *             utils.logger.error(f"Failed to call ak.stock_info_a_code_name: {e}.")
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L17_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":111
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
      /*finally:*/ {
        __pyx_L18_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_13 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L9_except_error;
        }
        __pyx_L17_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L10_except_return;
        }
      }
    }
    goto __pyx_L9_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":108
 *         utils.logger.info(f"Beginning {fun_name}")
 *         update_dict = {'updated': False, 'size': 0, 'new_stocks': []}
 *         try:             # <<<<<<<<<<<<<<
 *             #  A
 *             simple_info = ak.stock_info_a_code_name()
 */
    __pyx_L9_except_error:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L1_error;
    __pyx_L10_except_return:;
    __Pyx_XGIVEREF(__pyx_t_10);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
    goto __pyx_L0;
    __pyx_L12_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":118
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 118, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 118, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":119
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 119, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":120
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 120, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":119
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":123
 * 
 *         #
 *         simple_info['is_primary'] = simple_info['code'].apply(utils.isAPrimaryBoardStock)             # <<<<<<<<<<<<<<
 *         simple_info = simple_info[simple_info['is_primary']]
 *         simple_info = simple_info.drop('is_primary', axis=1)
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_apply); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isAPrimaryBoardStock); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 123, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_simple_info, __pyx_n_s_is_primary, __pyx_t_3) < 0))) __PYX_ERR(0, 123, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":124
 *         #
 *         simple_info['is_primary'] = simple_info['code'].apply(utils.isAPrimaryBoardStock)
 *         simple_info = simple_info[simple_info['is_primary']]             # <<<<<<<<<<<<<<
 *         simple_info = simple_info.drop('is_primary', axis=1)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_simple_info, __pyx_n_s_is_primary); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_simple_info, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_simple_info, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":125
 *         simple_info['is_primary'] = simple_info['code'].apply(utils.isAPrimaryBoardStock)
 *         simple_info = simple_info[simple_info['is_primary']]
 *         simple_info = simple_info.drop('is_primary', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_simple_info, __pyx_n_s_drop); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_tuple__6, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_simple_info, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":128
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo(mode='all')             # <<<<<<<<<<<<<<
 *         diff_code = simple_info[~simple_info['code'].isin(all_stock_simple_info['code'])]
 *         diff_code['is_delist'] = False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mode, __pyx_n_s_all) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
  __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_all_stock_simple_info = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":129
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo(mode='all')
 *         diff_code = simple_info[~simple_info['code'].isin(all_stock_simple_info['code'])]             # <<<<<<<<<<<<<<
 *         diff_code['is_delist'] = False
 *         diff_code = diff_code[list(dtype_mapping.keys())]
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isin); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyNumber_Invert(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_simple_info, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 129, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_diff_code = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":130
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo(mode='all')
 *         diff_code = simple_info[~simple_info['code'].isin(all_stock_simple_info['code'])]
 *         diff_code['is_delist'] = False             # <<<<<<<<<<<<<<
 *         diff_code = diff_code[list(dtype_mapping.keys())]
 * 
 */
  if (unlikely((PyObject_SetItem(__pyx_v_diff_code, __pyx_n_s_is_delist, Py_False) < 0))) __PYX_ERR(0, 130, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":131
 *         diff_code = simple_info[~simple_info['code'].isin(all_stock_simple_info['code'])]
 *         diff_code['is_delist'] = False
 *         diff_code = diff_code[list(dtype_mapping.keys())]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_diff_code, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_diff_code, __pyx_t_9);
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":134
 * 
 *         #
 *         merged_df = pd.merge(simple_info, all_stock_simple_info, on='code', how='inner', suffixes=('_A', '_B'))             # <<<<<<<<<<<<<<
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]
 *         for index, row in rename_stock_df.iterrows():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_pd); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_merge); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_INCREF(__pyx_v_simple_info);
  __Pyx_GIVEREF(__pyx_v_simple_info);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_simple_info)) __PYX_ERR(0, 134, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_all_stock_simple_info);
  __Pyx_GIVEREF(__pyx_v_all_stock_simple_info);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_all_stock_simple_info)) __PYX_ERR(0, 134, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_on, __pyx_n_s_code) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_how, __pyx_n_s_inner) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_suffixes, __pyx_tuple__7) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_merged_df = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":135
 *         #
 *         merged_df = pd.merge(simple_info, all_stock_simple_info, on='code', how='inner', suffixes=('_A', '_B'))
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]             # <<<<<<<<<<<<<<
 *         for index, row in rename_stock_df.iterrows():
 *             stock_code = row['code']
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_merged_df, __pyx_n_s_name_A); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_merged_df, __pyx_n_s_name_B); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_NE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_merged_df, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 135, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_v_rename_stock_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":136
 *         merged_df = pd.merge(simple_info, all_stock_simple_info, on='code', how='inner', suffixes=('_A', '_B'))
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]
 *         for index, row in rename_stock_df.iterrows():             # <<<<<<<<<<<<<<
 *             stock_code = row['code']
 *             stock_name_new = row['name_A']
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_rename_stock_df, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9);
    __pyx_t_7 = 0;
    __pyx_t_25 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 136, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 136, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_25)) {
      if (likely(PyList_CheckExact(__pyx_t_9))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 136, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 136, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 136, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 136, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_25(__pyx_t_9);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 136, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 136, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_14 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 136, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_26 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14);
      index = 0; __pyx_t_2 = __pyx_t_26(__pyx_t_14); if (unlikely(!__pyx_t_2)) goto __pyx_L27_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      index = 1; __pyx_t_3 = __pyx_t_26(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L27_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_14), 2) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
      __pyx_t_26 = NULL;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L28_unpacking_done;
      __pyx_L27_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_26 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 136, __pyx_L1_error)
      __pyx_L28_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":137
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]
 *         for index, row in rename_stock_df.iterrows():
 *             stock_code = row['code']             # <<<<<<<<<<<<<<
 *             stock_name_new = row['name_A']
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":138
 *         for index, row in rename_stock_df.iterrows():
 *             stock_code = row['code']
 *             stock_name_new = row['name_A']             # <<<<<<<<<<<<<<
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name_A); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_stock_name_new, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":139
 *             stock_code = row['code']
 *             stock_name_new = row['name_A']
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()             # <<<<<<<<<<<<<<
 *             if stock_to_update:
 *                 stock_to_update.name = stock_name_new
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_query); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_16 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_table_name); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_16};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_filter_by); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 139, __pyx_L1_error)
    __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 139, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_stock_to_update, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":140
 *             stock_name_new = row['name_A']
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:             # <<<<<<<<<<<<<<
 *                 stock_to_update.name = stock_name_new
 *                 session.commit()
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_stock_to_update); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 140, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":141
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:
 *                 stock_to_update.name = stock_name_new             # <<<<<<<<<<<<<<
 *                 session.commit()
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_stock_to_update, __pyx_n_s_name, __pyx_v_stock_name_new) < 0) __PYX_ERR(0, 141, __pyx_L1_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":142
 *             if stock_to_update:
 *                 stock_to_update.name = stock_name_new
 *                 session.commit()             # <<<<<<<<<<<<<<
 * 
 *         #  is_delist
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_commit); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 142, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_16);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_16))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_16, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":140
 *             stock_name_new = row['name_A']
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:             # <<<<<<<<<<<<<<
 *                 stock_to_update.name = stock_name_new
 *                 session.commit()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":136
 *         merged_df = pd.merge(simple_info, all_stock_simple_info, on='code', how='inner', suffixes=('_A', '_B'))
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]
 *         for index, row in rename_stock_df.iterrows():             # <<<<<<<<<<<<<<
 *             stock_code = row['code']
 *             stock_name_new = row['name_A']
 */
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":145
 * 
 *         #  is_delist
 *         delist_stock_df = all_stock_simple_info[~all_stock_simple_info['code'].isin(simple_info['code'])]             # <<<<<<<<<<<<<<
 *         for index, row in delist_stock_df.iterrows():
 *             stock_code = row['code']
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isin); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_1};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  __pyx_t_16 = PyNumber_Invert(__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_v_all_stock_simple_info, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 145, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_v_delist_stock_df = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":146
 *         #  is_delist
 *         delist_stock_df = all_stock_simple_info[~all_stock_simple_info['code'].isin(simple_info['code'])]
 *         for index, row in delist_stock_df.iterrows():             # <<<<<<<<<<<<<<
 *             stock_code = row['code']
 *             if row['is_delist']:
 */
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_delist_stock_df, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_16))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_16);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_16, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  }
  if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
    __pyx_t_16 = __pyx_t_9; __Pyx_INCREF(__pyx_t_16);
    __pyx_t_7 = 0;
    __pyx_t_25 = NULL;
  } else {
    __pyx_t_7 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 146, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_16); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 146, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  for (;;) {
    if (likely(!__pyx_t_25)) {
      if (likely(PyList_CheckExact(__pyx_t_16))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_16);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
        #else
        __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_16);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
          #endif
          if (__pyx_t_7 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 146, __pyx_L1_error)
        #else
        __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_16, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 146, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        #endif
      }
    } else {
      __pyx_t_9 = __pyx_t_25(__pyx_t_16);
      if (unlikely(!__pyx_t_9)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 146, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_9);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_9))) || (PyList_CheckExact(__pyx_t_9))) {
      PyObject* sequence = __pyx_t_9;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 146, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      #else
      __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      #endif
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_14 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_26 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14);
      index = 0; __pyx_t_1 = __pyx_t_26(__pyx_t_14); if (unlikely(!__pyx_t_1)) goto __pyx_L33_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_3 = __pyx_t_26(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L33_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_14), 2) < 0) __PYX_ERR(0, 146, __pyx_L1_error)
      __pyx_t_26 = NULL;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L34_unpacking_done;
      __pyx_L33_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_26 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 146, __pyx_L1_error)
      __pyx_L34_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
    __pyx_t_1 = 0;
    __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":147
 *         delist_stock_df = all_stock_simple_info[~all_stock_simple_info['code'].isin(simple_info['code'])]
 *         for index, row in delist_stock_df.iterrows():
 *             stock_code = row['code']             # <<<<<<<<<<<<<<
 *             if row['is_delist']:
 *                 continue
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 147, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":148
 *         for index, row in delist_stock_df.iterrows():
 *             stock_code = row['code']
 *             if row['is_delist']:             # <<<<<<<<<<<<<<
 *                 continue
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 */
    __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_is_delist); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 148, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":149
 *             stock_code = row['code']
 *             if row['is_delist']:
 *                 continue             # <<<<<<<<<<<<<<
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:
 */
      goto __pyx_L31_continue;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":148
 *         for index, row in delist_stock_df.iterrows():
 *             stock_code = row['code']
 *             if row['is_delist']:             # <<<<<<<<<<<<<<
 *                 continue
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":150
 *             if row['is_delist']:
 *                 continue
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()             # <<<<<<<<<<<<<<
 *             if stock_to_update:
 *                 stock_to_update.is_delist = True
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_query); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_14))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_14, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    }
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_filter_by); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 150, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_first); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 150, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_stock_to_update, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":151
 *                 continue
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:             # <<<<<<<<<<<<<<
 *                 stock_to_update.is_delist = True
 *                 session.commit()
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_stock_to_update); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 151, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":152
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:
 *                 stock_to_update.is_delist = True             # <<<<<<<<<<<<<<
 *                 session.commit()
 * 
 */
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_stock_to_update, __pyx_n_s_is_delist, Py_True) < 0) __PYX_ERR(0, 152, __pyx_L1_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":153
 *             if stock_to_update:
 *                 stock_to_update.is_delist = True
 *                 session.commit()             # <<<<<<<<<<<<<<
 * 
 *         # , to_sqldtype
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_commit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 153, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":151
 *                 continue
 *             stock_to_update = session.query(globals()[table_name]).filter_by(code=stock_code).first()
 *             if stock_to_update:             # <<<<<<<<<<<<<<
 *                 stock_to_update.is_delist = True
 *                 session.commit()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":146
 *         #  is_delist
 *         delist_stock_df = all_stock_simple_info[~all_stock_simple_info['code'].isin(simple_info['code'])]
 *         for index, row in delist_stock_df.iterrows():             # <<<<<<<<<<<<<<
 *             stock_code = row['code']
 *             if row['is_delist']:
 */
    __pyx_L31_continue:;
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":157
 *         # , to_sqldtype
 *         # self.dataproc.clearTableContent(table_name)  #
 *         if not diff_code.empty:             # <<<<<<<<<<<<<<
 *             diff_code.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 */
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_diff_code, __pyx_n_s_empty); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_16); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 157, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":158
 *         # self.dataproc.clearTableContent(table_name)  #
 *         if not diff_code.empty:
 *             diff_code.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             utils.logger.info(f"Succeed update {table_name}.")
 *         else:
 */
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_diff_code, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_name, __pyx_v_table_name) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_engine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_con, __pyx_t_2) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
    if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_16, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":159
 *         if not diff_code.empty:
 *             diff_code.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")             # <<<<<<<<<<<<<<
 *         else:
 *             utils.logger.info(f"Don't need to update {table_name}.")
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = PyTuple_New(3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_Succeed_update);
    __pyx_t_7 += 15;
    __Pyx_GIVEREF(__pyx_kp_u_Succeed_update);
    PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_kp_u_Succeed_update);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_kp_u__5);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_16, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 159, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    __pyx_t_16 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_16)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_16);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 159, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":157
 *         # , to_sqldtype
 *         # self.dataproc.clearTableContent(table_name)  #
 *         if not diff_code.empty:             # <<<<<<<<<<<<<<
 *             diff_code.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 */
    goto __pyx_L38;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":161
 *             utils.logger.info(f"Succeed update {table_name}.")
 *         else:
 *             utils.logger.info(f"Don't need to update {table_name}.")             # <<<<<<<<<<<<<<
 * 
 *         # updatejson
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 0;
    __pyx_t_8 = 127;
    __Pyx_INCREF(__pyx_kp_u_Don_t_need_to_update);
    __pyx_t_7 += 21;
    __Pyx_GIVEREF(__pyx_kp_u_Don_t_need_to_update);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Don_t_need_to_update);
    __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_8;
    __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
    __Pyx_GIVEREF(__pyx_t_16);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_16);
    __pyx_t_16 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_7 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__5);
    __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 161, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_16};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 161, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_L38:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":164
 * 
 *         # updatejson
 *         update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         update_dict['size'] = diff_code.shape[0] + all_stock_simple_info.shape[0]
 *         update_dict['new_stocks'] = list(diff_code['code'])
 */
  if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 164, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":165
 *         # updatejson
 *         update_dict['updated'] = True
 *         update_dict['size'] = diff_code.shape[0] + all_stock_simple_info.shape[0]             # <<<<<<<<<<<<<<
 *         update_dict['new_stocks'] = list(diff_code['code'])
 *         self.update_json[table_name] = update_dict
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_diff_code, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyNumber_Add(__pyx_t_9, __pyx_t_16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_size, __pyx_t_2) < 0))) __PYX_ERR(0, 165, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":166
 *         update_dict['updated'] = True
 *         update_dict['size'] = diff_code.shape[0] + all_stock_simple_info.shape[0]
 *         update_dict['new_stocks'] = list(diff_code['code'])             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_diff_code, __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = __Pyx_PySequence_ListKeepNew(__pyx_t_2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_new_stocks, __pyx_t_16) < 0))) __PYX_ERR(0, 166, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":167
 *         update_dict['size'] = diff_code.shape[0] + all_stock_simple_info.shape[0]
 *         update_dict['new_stocks'] = list(diff_code['code'])
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 *         return True
 */
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (unlikely((PyObject_SetItem(__pyx_t_16, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":168
 *         update_dict['new_stocks'] = list(diff_code['code'])
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 168, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":169
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":98
 *         return True
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockSimpleInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_simple_info);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_diff_code);
  __Pyx_XDECREF(__pyx_v_merged_df);
  __Pyx_XDECREF(__pyx_v_rename_stock_df);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name_new);
  __Pyx_XDECREF(__pyx_v_stock_to_update);
  __Pyx_XDECREF(__pyx_v_delist_stock_df);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":171
 *         return True
 * 
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_9func_industry(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_9func_industry = {"func_industry", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_9func_industry, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_9func_industry(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_industry_name = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func_industry (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_industry_name,&__pyx_n_s_multi_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("func_industry", 0, 3, 4, 1); __PYX_ERR(0, 171, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_industry_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("func_industry", 0, 3, 4, 2); __PYX_ERR(0, 171, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "func_industry") < 0)) __PYX_ERR(0, 171, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_industry_name = values[2];
    __pyx_v_multi_type = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func_industry", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 171, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.func_industry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_8func_industry(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_industry_name, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_8func_industry(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_industry_name, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_local_engine = NULL;
  PyObject *__pyx_v_local_session = NULL;
  PyObject *__pyx_v_stock_query = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_UCS4 __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func_industry", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":173
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isAPrimaryBoardStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 173, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":174
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         # engin,session
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":173
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":177
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 177, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":178
 *         # engin,session
 *         if multi_type == 'process':
 *             local_engine, local_session = create_engine_session()             # <<<<<<<<<<<<<<
 *         else:
 *             local_engine, local_session = engine, session
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 178, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 178, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 178, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_local_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":177
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
    goto __pyx_L4;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":180
 *             local_engine, local_session = create_engine_session()
 *         else:
 *             local_engine, local_session = engine, session             # <<<<<<<<<<<<<<
 * 
 *         # industry
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_engine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_local_engine = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":183
 * 
 *         # industry
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()             # <<<<<<<<<<<<<<
 *         if not stock_query:
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_stock_query = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":184
 *         # industry
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_stock_query); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 184, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_6);
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":185
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")             # <<<<<<<<<<<<<<
 *             if multi_type == 'process':
 *                 local_session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = 0;
    __pyx_t_12 = 127;
    __Pyx_INCREF(__pyx_kp_u_update_industry_This);
    __pyx_t_11 += 22;
    __Pyx_GIVEREF(__pyx_kp_u_update_industry_This);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_update_industry_This);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_12;
    __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_not_in_stock_basic_info);
    __pyx_t_11 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_not_in_stock_basic_info);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_not_in_stock_basic_info);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 185, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":186
 *         if not stock_query:
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 186, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":187
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 *             return False
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 187, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":188
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 *             return False
 *         if stock_query[0].industry == '0':
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 188, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":186
 *         if not stock_query:
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":189
 *                 local_session.remove()
 *                 local_engine.dispose()
 *             return False             # <<<<<<<<<<<<<<
 *         if stock_query[0].industry == '0':
 *             stock_query[0].industry = industry_name
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":184
 *         # industry
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"update_industry: This {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":190
 *                 local_engine.dispose()
 *             return False
 *         if stock_query[0].industry == '0':             # <<<<<<<<<<<<<<
 *             stock_query[0].industry = industry_name
 *         elif industry_name not in stock_query[0].industry:
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_industry); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_0, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":191
 *             return False
 *         if stock_query[0].industry == '0':
 *             stock_query[0].industry = industry_name             # <<<<<<<<<<<<<<
 *         elif industry_name not in stock_query[0].industry:
 *             stock_query[0].industry += (',' + industry_name)
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_industry, __pyx_v_industry_name) < 0) __PYX_ERR(0, 191, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":190
 *                 local_engine.dispose()
 *             return False
 *         if stock_query[0].industry == '0':             # <<<<<<<<<<<<<<
 *             stock_query[0].industry = industry_name
 *         elif industry_name not in stock_query[0].industry:
 */
    goto __pyx_L9;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":192
 *         if stock_query[0].industry == '0':
 *             stock_query[0].industry = industry_name
 *         elif industry_name not in stock_query[0].industry:             # <<<<<<<<<<<<<<
 *             stock_query[0].industry += (',' + industry_name)
 *         local_session.commit()
 */
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_industry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_industry_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 192, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":193
 *             stock_query[0].industry = industry_name
 *         elif industry_name not in stock_query[0].industry:
 *             stock_query[0].industry += (',' + industry_name)             # <<<<<<<<<<<<<<
 *         local_session.commit()
 * 
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_industry); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyNumber_Add(__pyx_kp_s__8, __pyx_v_industry_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_industry, __pyx_t_1) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":192
 *         if stock_query[0].industry == '0':
 *             stock_query[0].industry = industry_name
 *         elif industry_name not in stock_query[0].industry:             # <<<<<<<<<<<<<<
 *             stock_query[0].industry += (',' + industry_name)
 *         local_session.commit()
 */
  }
  __pyx_L9:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":194
 *         elif industry_name not in stock_query[0].industry:
 *             stock_query[0].industry += (',' + industry_name)
 *         local_session.commit()             # <<<<<<<<<<<<<<
 * 
 *         if multi_type == 'process':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_commit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":196
 *         local_session.commit()
 * 
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_session.remove()
 *             local_engine.dispose()
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 196, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":197
 * 
 *         if multi_type == 'process':
 *             local_session.remove()             # <<<<<<<<<<<<<<
 *             local_engine.dispose()
 *         return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 197, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 197, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":198
 *         if multi_type == 'process':
 *             local_session.remove()
 *             local_engine.dispose()             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":196
 *         local_session.commit()
 * 
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_session.remove()
 *             local_engine.dispose()
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":199
 *             local_session.remove()
 *             local_engine.dispose()
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":171
 *         return True
 * 
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.func_industry", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_local_engine);
  __Pyx_XDECREF(__pyx_v_local_session);
  __Pyx_XDECREF(__pyx_v_stock_query);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":201
 *         return True
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_11func_concept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_11func_concept = {"func_concept", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_11func_concept, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_11func_concept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_concept_name = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("func_concept (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_concept_name,&__pyx_n_s_multi_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("func_concept", 0, 3, 4, 1); __PYX_ERR(0, 201, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_concept_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("func_concept", 0, 3, 4, 2); __PYX_ERR(0, 201, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 201, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "func_concept") < 0)) __PYX_ERR(0, 201, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
    __pyx_v_concept_name = values[2];
    __pyx_v_multi_type = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("func_concept", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 201, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.func_concept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_10func_concept(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_concept_name, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_10func_concept(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_concept_name, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_local_engine = NULL;
  PyObject *__pyx_v_local_session = NULL;
  PyObject *__pyx_v_stock_query = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  Py_ssize_t __pyx_t_11;
  Py_UCS4 __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("func_concept", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":202
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):
 *         if not utils.isAPrimaryBoardStock(stock_code):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isAPrimaryBoardStock); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 202, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 202, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":203
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         # engin,session
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":202
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):
 *         if not utils.isAPrimaryBoardStock(stock_code):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":206
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 206, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":207
 *         # engin,session
 *         if multi_type == 'process':
 *             local_engine, local_session = create_engine_session()             # <<<<<<<<<<<<<<
 *         else:
 *             local_engine, local_session = engine, session
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 207, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 207, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_7);
      index = 0; __pyx_t_3 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_3)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_2)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
      __pyx_t_8 = NULL;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_8 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 207, __pyx_L1_error)
      __pyx_L6_unpacking_done:;
    }
    __pyx_v_local_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":206
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
    goto __pyx_L4;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":209
 *             local_engine, local_session = create_engine_session()
 *         else:
 *             local_engine, local_session = engine, session             # <<<<<<<<<<<<<<
 * 
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_engine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_local_engine = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L4:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":211
 *             local_engine, local_session = engine, session
 * 
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()             # <<<<<<<<<<<<<<
 *         if not stock_query:
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_filter); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_all); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 211, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_v_stock_query = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":212
 * 
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 */
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_stock_query); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 212, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_6);
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":213
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")             # <<<<<<<<<<<<<<
 *             if multi_type == 'process':
 *                 local_session.remove()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_11 = 0;
    __pyx_t_12 = 127;
    __Pyx_INCREF(__pyx_kp_u_update_concept_There_exist);
    __pyx_t_11 += 28;
    __Pyx_GIVEREF(__pyx_kp_u_update_concept_There_exist);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_update_concept_There_exist);
    __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_12;
    __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_INCREF(__pyx_kp_u_not_in_stock_basic_info);
    __pyx_t_11 += 25;
    __Pyx_GIVEREF(__pyx_kp_u_not_in_stock_basic_info);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_not_in_stock_basic_info);
    __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":214
 *         if not stock_query:
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
    __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 214, __pyx_L1_error)
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":215
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 *             return False
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 215, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":216
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 *             return False
 *         if concept_name == '':
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 216, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":214
 *         if not stock_query:
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":217
 *                 local_session.remove()
 *                 local_engine.dispose()
 *             return False             # <<<<<<<<<<<<<<
 *         if concept_name == '':
 *             stock_query[0].is_margin = 1
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":212
 * 
 *         stock_query = local_session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).all()
 *         if not stock_query:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"update_concept: There exist {stock_code} not in stock_basic_info.")
 *             if multi_type == 'process':
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":218
 *                 local_engine.dispose()
 *             return False
 *         if concept_name == '':             # <<<<<<<<<<<<<<
 *             stock_query[0].is_margin = 1
 *         if concept_name in ['', '']:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_concept_name, __pyx_kp_s__9, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 218, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":219
 *             return False
 *         if concept_name == '':
 *             stock_query[0].is_margin = 1             # <<<<<<<<<<<<<<
 *         if concept_name in ['', '']:
 *             stock_query[0].is_hsgt = 1
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_is_margin, __pyx_int_1) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":218
 *                 local_engine.dispose()
 *             return False
 *         if concept_name == '':             # <<<<<<<<<<<<<<
 *             stock_query[0].is_margin = 1
 *         if concept_name in ['', '']:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":220
 *         if concept_name == '':
 *             stock_query[0].is_margin = 1
 *         if concept_name in ['', '']:             # <<<<<<<<<<<<<<
 *             stock_query[0].is_hsgt = 1
 *         if stock_query[0].concept == '0':
 */
  __Pyx_INCREF(__pyx_v_concept_name);
  __pyx_t_2 = __pyx_v_concept_name;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__10, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 220, __pyx_L1_error)
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L11_bool_binop_done;
  }
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__11, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 220, __pyx_L1_error)
  __pyx_t_5 = __pyx_t_6;
  __pyx_L11_bool_binop_done:;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = __pyx_t_5;
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":221
 *             stock_query[0].is_margin = 1
 *         if concept_name in ['', '']:
 *             stock_query[0].is_hsgt = 1             # <<<<<<<<<<<<<<
 *         if stock_query[0].concept == '0':
 *             stock_query[0].concept = concept_name
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_is_hsgt, __pyx_int_1) < 0) __PYX_ERR(0, 221, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":220
 *         if concept_name == '':
 *             stock_query[0].is_margin = 1
 *         if concept_name in ['', '']:             # <<<<<<<<<<<<<<
 *             stock_query[0].is_hsgt = 1
 *         if stock_query[0].concept == '0':
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":222
 *         if concept_name in ['', '']:
 *             stock_query[0].is_hsgt = 1
 *         if stock_query[0].concept == '0':             # <<<<<<<<<<<<<<
 *             stock_query[0].concept = concept_name
 *         elif concept_name not in stock_query[0].concept:
 */
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_concept); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_7, __pyx_kp_s_0, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 222, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":223
 *             stock_query[0].is_hsgt = 1
 *         if stock_query[0].concept == '0':
 *             stock_query[0].concept = concept_name             # <<<<<<<<<<<<<<
 *         elif concept_name not in stock_query[0].concept:
 *             stock_query[0].concept += (',' + concept_name)
 */
    __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_7, __pyx_n_s_concept, __pyx_v_concept_name) < 0) __PYX_ERR(0, 223, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":222
 *         if concept_name in ['', '']:
 *             stock_query[0].is_hsgt = 1
 *         if stock_query[0].concept == '0':             # <<<<<<<<<<<<<<
 *             stock_query[0].concept = concept_name
 *         elif concept_name not in stock_query[0].concept:
 */
    goto __pyx_L13;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":224
 *         if stock_query[0].concept == '0':
 *             stock_query[0].concept = concept_name
 *         elif concept_name not in stock_query[0].concept:             # <<<<<<<<<<<<<<
 *             stock_query[0].concept += (',' + concept_name)
 *         local_session.commit()
 */
  __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_concept); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_concept_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 224, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":225
 *             stock_query[0].concept = concept_name
 *         elif concept_name not in stock_query[0].concept:
 *             stock_query[0].concept += (',' + concept_name)             # <<<<<<<<<<<<<<
 *         local_session.commit()
 *         if multi_type == 'process':
 */
    __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_stock_query, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_concept); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_3 = PyNumber_Add(__pyx_kp_s__8, __pyx_v_concept_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_concept, __pyx_t_1) < 0) __PYX_ERR(0, 225, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":224
 *         if stock_query[0].concept == '0':
 *             stock_query[0].concept = concept_name
 *         elif concept_name not in stock_query[0].concept:             # <<<<<<<<<<<<<<
 *             stock_query[0].concept += (',' + concept_name)
 *         local_session.commit()
 */
  }
  __pyx_L13:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":226
 *         elif concept_name not in stock_query[0].concept:
 *             stock_query[0].concept += (',' + concept_name)
 *         local_session.commit()             # <<<<<<<<<<<<<<
 *         if multi_type == 'process':
 *             local_session.remove()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_commit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":227
 *             stock_query[0].concept += (',' + concept_name)
 *         local_session.commit()
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_session.remove()
 *             local_engine.dispose()
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 227, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":228
 *         local_session.commit()
 *         if multi_type == 'process':
 *             local_session.remove()             # <<<<<<<<<<<<<<
 *             local_engine.dispose()
 *         return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 228, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":229
 *         if multi_type == 'process':
 *             local_session.remove()
 *             local_engine.dispose()             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":227
 *             stock_query[0].concept += (',' + concept_name)
 *         local_session.commit()
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_session.remove()
 *             local_engine.dispose()
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":230
 *             local_session.remove()
 *             local_engine.dispose()
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def updateStockBasicInfoByIndustryConcept(self, multi_type='single', workers=12):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":201
 *         return True
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.func_concept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_local_engine);
  __Pyx_XDECREF(__pyx_v_local_session);
  __Pyx_XDECREF(__pyx_v_stock_query);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":232
 *         return True
 * 
 *     def updateStockBasicInfoByIndustryConcept(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_industry_basic_infostock_concept_basic_infostock_basic_info
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_13updateStockBasicInfoByIndustryConcept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_12updateStockBasicInfoByIndustryConcept, "\n        \344\273\216stock_industry_basic_info\350\241\250\345\222\214stock_concept_basic_info\350\241\250\346\233\264\346\226\260stock_basic_info\350\241\250\344\270\255\347\232\204\n        industry\343\200\201concept\343\200\201is_margin\343\200\201is_hsgt\345\210\227\n        \346\211\200\344\273\245\351\234\200\350\246\201\344\276\235\350\265\226\345\272\223\346\217\220\345\211\215\346\233\264\346\226\260\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_13updateStockBasicInfoByIndustryConcept = {"updateStockBasicInfoByIndustryConcept", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_13updateStockBasicInfoByIndustryConcept, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_12updateStockBasicInfoByIndustryConcept};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_13updateStockBasicInfoByIndustryConcept(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockBasicInfoByIndustryConcept (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_type,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 232, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockBasicInfoByIndustryConcept") < 0)) __PYX_ERR(0, 232, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_type = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockBasicInfoByIndustryConcept", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 232, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_12updateStockBasicInfoByIndustryConcept(__pyx_self, __pyx_v_self, __pyx_v_multi_type, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_12updateStockBasicInfoByIndustryConcept(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers) {
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  int __pyx_v_all_succeed;
  PyObject *__pyx_v_stock_industry_basic_info = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_industry_name = NULL;
  PyObject *__pyx_v_industry_cons_stocks = NULL;
  PyObject *__pyx_v_stocks_list = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_stock_concept_basic_info = NULL;
  PyObject *__pyx_v_concept_name = NULL;
  PyObject *__pyx_v_concept_cons_stocks = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  Py_ssize_t __pyx_t_18;
  PyObject *(*__pyx_t_19)(PyObject *);
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  PyObject *__pyx_t_22 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockBasicInfoByIndustryConcept", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":239
 *         :return:
 *         '''
 *         table_name = 'stock_basic_info'             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_basic_info);
  __pyx_v_table_name = __pyx_n_s_stock_basic_info;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":240
 *         '''
 *         table_name = 'stock_basic_info'
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":243
 * 
 *         #
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}             # <<<<<<<<<<<<<<
 * 
 *         if 'stock_industry_basic_info' not in self.update_json or not self.update_json['stock_industry_basic_info']['updated']:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated_industry, Py_False) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated_concept, Py_False) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":245
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}
 * 
 *         if 'stock_industry_basic_info' not in self.update_json or not self.update_json['stock_industry_basic_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')
 *             return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_stock_industry_basic_info, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_stock_industry_basic_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 245, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":246
 * 
 *         if 'stock_industry_basic_info' not in self.update_json or not self.update_json['stock_industry_basic_info']['updated']:
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')             # <<<<<<<<<<<<<<
 *             return False
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_Need_update_stock_industry_basic};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 246, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":247
 *         if 'stock_industry_basic_info' not in self.update_json or not self.update_json['stock_industry_basic_info']['updated']:
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')
 *             return False             # <<<<<<<<<<<<<<
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:
 *             utils.logger.info(f'Need update stock_concept_basic_info first.')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":245
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}
 * 
 *         if 'stock_industry_basic_info' not in self.update_json or not self.update_json['stock_industry_basic_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')
 *             return False
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":248
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')
 *             return False
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'Need update stock_concept_basic_info first.')
 *             return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_stock_concept_basic_info, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_7) {
  } else {
    __pyx_t_5 = __pyx_t_7;
    goto __pyx_L6_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_stock_concept_basic_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 248, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_7);
  __pyx_t_5 = __pyx_t_6;
  __pyx_L6_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":249
 *             return False
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:
 *             utils.logger.info(f'Need update stock_concept_basic_info first.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_Need_update_stock_concept_basic};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":250
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:
 *             utils.logger.info(f'Need update stock_concept_basic_info first.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         if table_name in self.update_json:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":248
 *             utils.logger.info(f'Need update stock_industry_basic_info first.')
 *             return False
 *         elif 'stock_concept_basic_info' not in self.update_json or not self.update_json['stock_concept_basic_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'Need update stock_concept_basic_info first.')
 *             return False
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":252
 *             return False
 * 
 *         if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":253
 * 
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated_industry); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_6) {
    } else {
      __pyx_t_5 = __pyx_t_6;
      goto __pyx_L10_bool_binop_done;
    }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated_concept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 253, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __pyx_t_6;
    __pyx_L10_bool_binop_done:;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":254
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_8 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
      __Pyx_GIVEREF(__pyx_t_10);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10);
      __pyx_t_10 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_industry_concept_is_margi);
      __pyx_t_8 += 70;
      __Pyx_GIVEREF(__pyx_kp_u_table_industry_concept_is_margi);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_industry_concept_is_margi);
      __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 254, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":255
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":253
 * 
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":257
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":252
 *             return False
 * 
 *         if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated_industry'] and self.update_json[table_name]['updated_concept']:
 *                 utils.logger.info(f'The {table_name} table industry, concept, is_margin, is_hsgt columns has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":259
 *                 update_dict = self.update_json[table_name]
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":262
 * 
 *         #
 *         if not update_dict["updated_industry"]:             # <<<<<<<<<<<<<<
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_updated_industry); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 262, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":263
 *         #
 *         if not update_dict["updated_industry"]:
 *             all_succeed = True             # <<<<<<<<<<<<<<
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 */
    __pyx_v_all_succeed = 1;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":264
 *         if not update_dict["updated_industry"]:
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')             # <<<<<<<<<<<<<<
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_setTableColumnValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 264, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_table_name, __pyx_n_s_industry, __pyx_kp_s_0};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":265
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')             # <<<<<<<<<<<<<<
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,
 *                                    total=stock_industry_basic_info.shape[0]):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_industry_basic_info};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_stock_industry_basic_info = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":266
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_industry_basic_info.shape[0]):
 *                 industry_name = row['name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_basic_info, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_1);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error);
    __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s_update_industry); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_11 = PyNumber_Add(__pyx_t_10, __pyx_v_multi_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_t_11) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":267
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,
 *                                    total=stock_industry_basic_info.shape[0]):             # <<<<<<<<<<<<<<
 *                 industry_name = row['name']
 *                 industry_cons_stocks = row['cons_stocks']
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_basic_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 267, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total, __pyx_t_10) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":266
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_industry_basic_info.shape[0]):
 *                 industry_name = row['name']
 */
    __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 266, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
      __pyx_t_1 = __pyx_t_10; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_8 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 266, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 266, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 266, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 266, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 266, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 266, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 266, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_12(__pyx_t_1);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 266, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
        PyObject* sequence = __pyx_t_10;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 266, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        #endif
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 266, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_11), 2) < 0) __PYX_ERR(0, 266, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L16_unpacking_done;
        __pyx_L15_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 266, __pyx_L1_error)
        __pyx_L16_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":268
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,
 *                                    total=stock_industry_basic_info.shape[0]):
 *                 industry_name = row['name']             # <<<<<<<<<<<<<<
 *                 industry_cons_stocks = row['cons_stocks']
 *                 stocks_list = industry_cons_stocks.split(',')
 */
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 268, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_industry_name, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":269
 *                                    total=stock_industry_basic_info.shape[0]):
 *                 industry_name = row['name']
 *                 industry_cons_stocks = row['cons_stocks']             # <<<<<<<<<<<<<<
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 */
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_cons_stocks); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_industry_cons_stocks, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":270
 *                 industry_name = row['name']
 *                 industry_cons_stocks = row['cons_stocks']
 *                 stocks_list = industry_cons_stocks.split(',')             # <<<<<<<<<<<<<<
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_industry_cons_stocks, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 270, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s__8};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 270, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_stocks_list, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":271
 *                 industry_cons_stocks = row['cons_stocks']
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 271, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":272
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
        /*with:*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 272, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_14 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 272, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 272, __pyx_L18_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 272, __pyx_L18_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          __pyx_t_10 = __pyx_t_3;
          __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_17);
              /*try:*/ {
                __Pyx_XDECREF_SET(__pyx_v_executor, __pyx_t_10);
                __pyx_t_10 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":273
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []             # <<<<<<<<<<<<<<
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 */
                __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 273, __pyx_L24_error)
                __Pyx_GOTREF(__pyx_t_10);
                __Pyx_XDECREF_SET(__pyx_v_futures, ((PyObject*)__pyx_t_10));
                __pyx_t_10 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":274
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)
 */
                if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
                  __pyx_t_10 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_10);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 274, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 274, __pyx_L24_error)
                }
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_10))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L24_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 274, __pyx_L24_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L24_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 274, __pyx_L24_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 274, __pyx_L24_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 274, __pyx_L24_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    }
                  } else {
                    __pyx_t_2 = __pyx_t_19(__pyx_t_10);
                    if (unlikely(!__pyx_t_2)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 274, __pyx_L24_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":275
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)             # <<<<<<<<<<<<<<
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 */
                  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_industry); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 275, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_20 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_3))) {
                    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_3);
                    if (likely(__pyx_t_20)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_20);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_3, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[5] = {__pyx_t_20, __pyx_t_11, __pyx_v_stock_code, __pyx_v_industry_name, __pyx_v_multi_type};
                    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 275, __pyx_L24_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":276
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)             # <<<<<<<<<<<<<<
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 */
                  __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 276, __pyx_L24_error)

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":274
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)
 */
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":278
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L24_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_3 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_futures};
                  __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
                  __pyx_t_2 = __pyx_t_10; __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 278, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 278, __pyx_L24_error)
                }
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_2))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 278, __pyx_L24_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_10 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 278, __pyx_L24_error)
                      #else
                      __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L24_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 278, __pyx_L24_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 278, __pyx_L24_error)
                      #else
                      __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 278, __pyx_L24_error)
                      __Pyx_GOTREF(__pyx_t_10);
                      #endif
                    }
                  } else {
                    __pyx_t_10 = __pyx_t_19(__pyx_t_2);
                    if (unlikely(!__pyx_t_10)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 278, __pyx_L24_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_10);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_10);
                  __pyx_t_10 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":279
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 */
                  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 279, __pyx_L24_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_11 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_3))) {
                    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
                    if (likely(__pyx_t_11)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_11);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_3, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
                    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 279, __pyx_L24_error)
                    __Pyx_GOTREF(__pyx_t_10);
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  }
                  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 279, __pyx_L24_error)
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __pyx_t_5 = (!__pyx_t_6);
                  if (__pyx_t_5) {

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":280
 *                         for future in as_completed(futures):
 *                             if not future.result():
 *                                 all_succeed = False             # <<<<<<<<<<<<<<
 *                 elif multi_type == 'process':
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                    __pyx_v_all_succeed = 0;

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":279
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 */
                  }

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":278
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":272
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
              }
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              goto __pyx_L31_try_end;
              __pyx_L24_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_10, &__pyx_t_3) < 0) __PYX_ERR(0, 272, __pyx_L26_except_error)
                __Pyx_XGOTREF(__pyx_t_2);
                __Pyx_XGOTREF(__pyx_t_10);
                __Pyx_XGOTREF(__pyx_t_3);
                __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 272, __pyx_L26_except_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 272, __pyx_L26_except_error)
                __Pyx_GOTREF(__pyx_t_22);
                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                if (__pyx_t_5 < 0) __PYX_ERR(0, 272, __pyx_L26_except_error)
                __pyx_t_6 = (!__pyx_t_5);
                if (unlikely(__pyx_t_6)) {
                  __Pyx_GIVEREF(__pyx_t_2);
                  __Pyx_GIVEREF(__pyx_t_10);
                  __Pyx_XGIVEREF(__pyx_t_3);
                  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_10, __pyx_t_3);
                  __pyx_t_2 = 0; __pyx_t_10 = 0; __pyx_t_3 = 0; 
                  __PYX_ERR(0, 272, __pyx_L26_except_error)
                }
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L25_exception_handled;
              }
              __pyx_L26_except_error:;
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              goto __pyx_L1_error;
              __pyx_L25_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              __pyx_L31_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_14) {
                __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__12, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 272, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_17);
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              }
              goto __pyx_L23;
            }
            __pyx_L23:;
          }
          goto __pyx_L42;
          __pyx_L18_error:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L1_error;
          __pyx_L42:;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":271
 *                 industry_cons_stocks = row['cons_stocks']
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
        goto __pyx_L17;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":281
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 281, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":282
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
        /*with:*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 282, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_14 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 282, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 282, __pyx_L43_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
            __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 282, __pyx_L43_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __pyx_t_3 = __pyx_t_10;
          __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              /*try:*/ {
                __Pyx_XDECREF_SET(__pyx_v_executor, __pyx_t_3);
                __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":283
 *                 elif multi_type == 'process':
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 *                         futures = []             # <<<<<<<<<<<<<<
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 */
                __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 283, __pyx_L49_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_XDECREF_SET(__pyx_v_futures, ((PyObject*)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":284
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)
 */
                if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
                  __pyx_t_3 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_3);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 284, __pyx_L49_error)
                }
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_3))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 284, __pyx_L49_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 284, __pyx_L49_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L49_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 284, __pyx_L49_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 284, __pyx_L49_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L49_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    }
                  } else {
                    __pyx_t_2 = __pyx_t_19(__pyx_t_3);
                    if (unlikely(!__pyx_t_2)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 284, __pyx_L49_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":285
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)             # <<<<<<<<<<<<<<
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 */
                  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 285, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_industry); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 285, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_20 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_10))) {
                    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_10);
                    if (likely(__pyx_t_20)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                      __Pyx_INCREF(__pyx_t_20);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_10, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[5] = {__pyx_t_20, __pyx_t_11, __pyx_v_stock_code, __pyx_v_industry_name, __pyx_v_multi_type};
                    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L49_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":286
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)             # <<<<<<<<<<<<<<
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 */
                  __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 286, __pyx_L49_error)

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":284
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_industry, stock_code, industry_name, multi_type)
 *                             futures.append(future)
 */
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":288
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L49_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_10 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_10)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_10);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_v_futures};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 288, __pyx_L49_error)
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_2))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 288, __pyx_L49_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 288, __pyx_L49_error)
                      #else
                      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L49_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 288, __pyx_L49_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 288, __pyx_L49_error)
                      #else
                      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L49_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    }
                  } else {
                    __pyx_t_3 = __pyx_t_19(__pyx_t_2);
                    if (unlikely(!__pyx_t_3)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 288, __pyx_L49_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
                  __pyx_t_3 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":289
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 */
                  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 289, __pyx_L49_error)
                  __Pyx_GOTREF(__pyx_t_10);
                  __pyx_t_11 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_10))) {
                    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
                    if (likely(__pyx_t_11)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                      __Pyx_INCREF(__pyx_t_11);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_10, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
                    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 289, __pyx_L49_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                  }
                  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 289, __pyx_L49_error)
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_5 = (!__pyx_t_6);
                  if (__pyx_t_5) {

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":290
 *                         for future in as_completed(futures):
 *                             if not future.result():
 *                                 all_succeed = False             # <<<<<<<<<<<<<<
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 */
                    __pyx_v_all_succeed = 0;

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":289
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 */
                  }

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":288
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_industry', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":282
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
              }
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L56_try_end;
              __pyx_L49_error:;
              __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_10) < 0) __PYX_ERR(0, 282, __pyx_L51_except_error)
                __Pyx_XGOTREF(__pyx_t_2);
                __Pyx_XGOTREF(__pyx_t_3);
                __Pyx_XGOTREF(__pyx_t_10);
                __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 282, __pyx_L51_except_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 282, __pyx_L51_except_error)
                __Pyx_GOTREF(__pyx_t_22);
                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                if (__pyx_t_5 < 0) __PYX_ERR(0, 282, __pyx_L51_except_error)
                __pyx_t_6 = (!__pyx_t_5);
                if (unlikely(__pyx_t_6)) {
                  __Pyx_GIVEREF(__pyx_t_2);
                  __Pyx_GIVEREF(__pyx_t_3);
                  __Pyx_XGIVEREF(__pyx_t_10);
                  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_10);
                  __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_10 = 0; 
                  __PYX_ERR(0, 282, __pyx_L51_except_error)
                }
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                goto __pyx_L50_exception_handled;
              }
              __pyx_L51_except_error:;
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              goto __pyx_L1_error;
              __pyx_L50_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              __pyx_L56_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_14) {
                __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__12, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 282, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              }
              goto __pyx_L48;
            }
            __pyx_L48:;
          }
          goto __pyx_L67;
          __pyx_L43_error:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L1_error;
          __pyx_L67:;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":281
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     with ProcessPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
        goto __pyx_L17;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":291
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'single':             # <<<<<<<<<<<<<<
 *                     for stock_code in stocks_list:
 *                         if not self.func_industry(stock_code, industry_name, multi_type):
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 291, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":292
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:             # <<<<<<<<<<<<<<
 *                         if not self.func_industry(stock_code, industry_name, multi_type):
 *                             all_succeed = False
 */
        if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
          __pyx_t_10 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_10);
          __pyx_t_18 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_18 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 292, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 292, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_10))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 292, __pyx_L1_error)
                #endif
                if (__pyx_t_18 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 292, __pyx_L1_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 292, __pyx_L1_error)
                #endif
                if (__pyx_t_18 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 292, __pyx_L1_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 292, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
            }
          } else {
            __pyx_t_3 = __pyx_t_19(__pyx_t_10);
            if (unlikely(!__pyx_t_3)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 292, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_3);
          }
          __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
          __pyx_t_3 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":293
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 *                         if not self.func_industry(stock_code, industry_name, multi_type):             # <<<<<<<<<<<<<<
 *                             all_succeed = False
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_industry); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_v_stock_code, __pyx_v_industry_name, __pyx_v_multi_type};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 293, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_5 = (!__pyx_t_6);
          if (__pyx_t_5) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":294
 *                     for stock_code in stocks_list:
 *                         if not self.func_industry(stock_code, industry_name, multi_type):
 *                             all_succeed = False             # <<<<<<<<<<<<<<
 * 
 *             if all_succeed:
 */
            __pyx_v_all_succeed = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":293
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 *                         if not self.func_industry(stock_code, industry_name, multi_type):             # <<<<<<<<<<<<<<
 *                             all_succeed = False
 * 
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":292
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:             # <<<<<<<<<<<<<<
 *                         if not self.func_industry(stock_code, industry_name, multi_type):
 *                             all_succeed = False
 */
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":291
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'single':             # <<<<<<<<<<<<<<
 *                     for stock_code in stocks_list:
 *                         if not self.func_industry(stock_code, industry_name, multi_type):
 */
      }
      __pyx_L17:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":266
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 *             stock_industry_basic_info = self.dataproc.loadTable('stock_industry_basic_info')
 *             for index, row in tqdm(stock_industry_basic_info.iterrows(), desc=fun_name + ' : update industry : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_industry_basic_info.shape[0]):
 *                 industry_name = row['name']
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":296
 *                             all_succeed = False
 * 
 *             if all_succeed:             # <<<<<<<<<<<<<<
 *                 update_dict["updated_industry"] = True
 *             self.update_json[table_name] = update_dict
 */
    if (__pyx_v_all_succeed) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":297
 * 
 *             if all_succeed:
 *                 update_dict["updated_industry"] = True             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
      if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated_industry, Py_True) < 0))) __PYX_ERR(0, 297, __pyx_L1_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":296
 *                             all_succeed = False
 * 
 *             if all_succeed:             # <<<<<<<<<<<<<<
 *                 update_dict["updated_industry"] = True
 *             self.update_json[table_name] = update_dict
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":298
 *             if all_succeed:
 *                 update_dict["updated_industry"] = True
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 298, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":299
 *                 update_dict["updated_industry"] = True
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         else:
 *             utils.logger.info(f'The {table_name} table has been updated by update_industry.')
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":262
 * 
 *         #
 *         if not update_dict["updated_industry"]:             # <<<<<<<<<<<<<<
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'industry', '0')
 */
    goto __pyx_L12;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":301
 *             self.dumpJsonToFile()
 *         else:
 *             utils.logger.info(f'The {table_name} table has been updated by update_industry.')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_8 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_by_updat);
    __pyx_t_8 += 43;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_by_updat);
    PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_table_has_been_updated_by_updat);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_L12:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":304
 * 
 *         #
 *         if not update_dict["updated_concept"]:             # <<<<<<<<<<<<<<
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_updated_concept); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 304, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":305
 *         #
 *         if not update_dict["updated_concept"]:
 *             all_succeed = True             # <<<<<<<<<<<<<<
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')
 *             self.dataproc.setTableColumnValue(table_name, 'is_margin', 0)
 */
    __pyx_v_all_succeed = 1;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":306
 *         if not update_dict["updated_concept"]:
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')             # <<<<<<<<<<<<<<
 *             self.dataproc.setTableColumnValue(table_name, 'is_margin', 0)
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_setTableColumnValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_v_table_name, __pyx_n_s_concept, __pyx_kp_s_0};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":307
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')
 *             self.dataproc.setTableColumnValue(table_name, 'is_margin', 0)             # <<<<<<<<<<<<<<
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_setTableColumnValue); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 307, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_table_name, __pyx_n_s_is_margin, __pyx_int_0};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":308
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')
 *             self.dataproc.setTableColumnValue(table_name, 'is_margin', 0)
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)             # <<<<<<<<<<<<<<
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_setTableColumnValue); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_10, __pyx_v_table_name, __pyx_n_s_is_hsgt, __pyx_int_0};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":309
 *             self.dataproc.setTableColumnValue(table_name, 'is_margin', 0)
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')             # <<<<<<<<<<<<<<
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,
 *                                    total=stock_concept_basic_info.shape[0]):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 309, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_concept_basic_info};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 309, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_v_stock_concept_basic_info = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":310
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_concept_basic_info.shape[0]):
 *                 concept_name = row['name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_concept_basic_info, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_10);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10)) __PYX_ERR(0, 310, __pyx_L1_error);
    __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s_update_concept); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_11 = PyNumber_Add(__pyx_t_3, __pyx_v_multi_type); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_desc, __pyx_t_11) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":311
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,
 *                                    total=stock_concept_basic_info.shape[0]):             # <<<<<<<<<<<<<<
 *                 concept_name = row['name']
 *                 concept_cons_stocks = row['cons_stocks']
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_concept_basic_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_total, __pyx_t_3) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":310
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_concept_basic_info.shape[0]):
 *                 concept_name = row['name']
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_10 = __pyx_t_3; __Pyx_INCREF(__pyx_t_10);
      __pyx_t_8 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 310, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_10); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 310, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_10))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 310, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 310, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_10);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 310, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 310, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 310, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_12(__pyx_t_10);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 310, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
        PyObject* sequence = __pyx_t_3;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 310, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 310, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_2 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_2)) goto __pyx_L77_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        index = 1; __pyx_t_1 = __pyx_t_13(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L77_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_11), 2) < 0) __PYX_ERR(0, 310, __pyx_L1_error)
        __pyx_t_13 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L78_unpacking_done;
        __pyx_L77_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_13 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 310, __pyx_L1_error)
        __pyx_L78_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":312
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,
 *                                    total=stock_concept_basic_info.shape[0]):
 *                 concept_name = row['name']             # <<<<<<<<<<<<<<
 *                 concept_cons_stocks = row['cons_stocks']
 *                 stocks_list = concept_cons_stocks.split(',')
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 312, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_concept_name, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":313
 *                                    total=stock_concept_basic_info.shape[0]):
 *                 concept_name = row['name']
 *                 concept_cons_stocks = row['cons_stocks']             # <<<<<<<<<<<<<<
 *                 stocks_list = concept_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_cons_stocks); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 313, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_XDECREF_SET(__pyx_v_concept_cons_stocks, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":314
 *                 concept_name = row['name']
 *                 concept_cons_stocks = row['cons_stocks']
 *                 stocks_list = concept_cons_stocks.split(',')             # <<<<<<<<<<<<<<
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_concept_cons_stocks, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s__8};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_stocks_list, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":315
 *                 concept_cons_stocks = row['cons_stocks']
 *                 stocks_list = concept_cons_stocks.split(',')
 *                 if multi_type == 'thread':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 315, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":316
 *                 stocks_list = concept_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
        /*with:*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 316, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_14 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 316, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 316, __pyx_L80_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L80_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __pyx_t_3 = __pyx_t_1;
          __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_17);
              /*try:*/ {
                __Pyx_XDECREF_SET(__pyx_v_executor, __pyx_t_3);
                __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":317
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []             # <<<<<<<<<<<<<<
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 */
                __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L86_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_XDECREF_SET(__pyx_v_futures, ((PyObject*)__pyx_t_3));
                __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":318
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)
 */
                if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
                  __pyx_t_3 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_3);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 318, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 318, __pyx_L86_error)
                }
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_3))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 318, __pyx_L86_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 318, __pyx_L86_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L86_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 318, __pyx_L86_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 318, __pyx_L86_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L86_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    }
                  } else {
                    __pyx_t_2 = __pyx_t_19(__pyx_t_3);
                    if (unlikely(!__pyx_t_2)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 318, __pyx_L86_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":319
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)             # <<<<<<<<<<<<<<
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 */
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_concept); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 319, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_20 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_1))) {
                    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_1);
                    if (likely(__pyx_t_20)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                      __Pyx_INCREF(__pyx_t_20);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_1, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[5] = {__pyx_t_20, __pyx_t_11, __pyx_v_stock_code, __pyx_v_concept_name, __pyx_v_multi_type};
                    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L86_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":320
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)             # <<<<<<<<<<<<<<
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 */
                  __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 320, __pyx_L86_error)

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":318
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)
 */
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":322
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L86_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_1 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_futures};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
                  __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 322, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 322, __pyx_L86_error)
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_2))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L86_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L86_error)
                      #else
                      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L86_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 322, __pyx_L86_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 322, __pyx_L86_error)
                      #else
                      __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 322, __pyx_L86_error)
                      __Pyx_GOTREF(__pyx_t_3);
                      #endif
                    }
                  } else {
                    __pyx_t_3 = __pyx_t_19(__pyx_t_2);
                    if (unlikely(!__pyx_t_3)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 322, __pyx_L86_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_3);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
                  __pyx_t_3 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":323
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 */
                  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L86_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_11 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_1))) {
                    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
                    if (likely(__pyx_t_11)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                      __Pyx_INCREF(__pyx_t_11);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_1, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
                    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L86_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  }
                  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 323, __pyx_L86_error)
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __pyx_t_5 = (!__pyx_t_6);
                  if (__pyx_t_5) {

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":324
 *                         for future in as_completed(futures):
 *                             if not future.result():
 *                                 all_succeed = False             # <<<<<<<<<<<<<<
 *                 elif multi_type == 'process':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 */
                    __pyx_v_all_succeed = 0;

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":323
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 */
                  }

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":322
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":316
 *                 stocks_list = concept_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
              }
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              goto __pyx_L93_try_end;
              __pyx_L86_error:;
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 316, __pyx_L88_except_error)
                __Pyx_XGOTREF(__pyx_t_2);
                __Pyx_XGOTREF(__pyx_t_3);
                __Pyx_XGOTREF(__pyx_t_1);
                __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 316, __pyx_L88_except_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 316, __pyx_L88_except_error)
                __Pyx_GOTREF(__pyx_t_22);
                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                if (__pyx_t_5 < 0) __PYX_ERR(0, 316, __pyx_L88_except_error)
                __pyx_t_6 = (!__pyx_t_5);
                if (unlikely(__pyx_t_6)) {
                  __Pyx_GIVEREF(__pyx_t_2);
                  __Pyx_GIVEREF(__pyx_t_3);
                  __Pyx_XGIVEREF(__pyx_t_1);
                  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_3, __pyx_t_1);
                  __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; 
                  __PYX_ERR(0, 316, __pyx_L88_except_error)
                }
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                goto __pyx_L87_exception_handled;
              }
              __pyx_L88_except_error:;
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              goto __pyx_L1_error;
              __pyx_L87_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
              __pyx_L93_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_14) {
                __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__12, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 316, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_17);
                __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              }
              goto __pyx_L85;
            }
            __pyx_L85:;
          }
          goto __pyx_L104;
          __pyx_L80_error:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L1_error;
          __pyx_L104:;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":315
 *                 concept_cons_stocks = row['cons_stocks']
 *                 stocks_list = concept_cons_stocks.split(',')
 *                 if multi_type == 'thread':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
        goto __pyx_L79;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":325
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 325, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":326
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
        /*with:*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 326, __pyx_L1_error)
          __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_14 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 326, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L105_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L105_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __pyx_t_1 = __pyx_t_3;
          __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          /*try:*/ {
            {
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __Pyx_ExceptionSave(&__pyx_t_17, &__pyx_t_16, &__pyx_t_15);
              __Pyx_XGOTREF(__pyx_t_17);
              __Pyx_XGOTREF(__pyx_t_16);
              __Pyx_XGOTREF(__pyx_t_15);
              /*try:*/ {
                __Pyx_XDECREF_SET(__pyx_v_executor, __pyx_t_1);
                __pyx_t_1 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":327
 *                 elif multi_type == 'process':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []             # <<<<<<<<<<<<<<
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 */
                __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L111_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_XDECREF_SET(__pyx_v_futures, ((PyObject*)__pyx_t_1));
                __pyx_t_1 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":328
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)
 */
                if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
                  __pyx_t_1 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_1);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 328, __pyx_L111_error)
                }
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_1))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 328, __pyx_L111_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 328, __pyx_L111_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L111_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 328, __pyx_L111_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_2); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 328, __pyx_L111_error)
                      #else
                      __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L111_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      #endif
                    }
                  } else {
                    __pyx_t_2 = __pyx_t_19(__pyx_t_1);
                    if (unlikely(!__pyx_t_2)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 328, __pyx_L111_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_2);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":329
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)             # <<<<<<<<<<<<<<
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 */
                  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 329, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_concept); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 329, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_11);
                  __pyx_t_20 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_3))) {
                    __pyx_t_20 = PyMethod_GET_SELF(__pyx_t_3);
                    if (likely(__pyx_t_20)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_20);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_3, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[5] = {__pyx_t_20, __pyx_t_11, __pyx_v_stock_code, __pyx_v_concept_name, __pyx_v_multi_type};
                    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
                    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L111_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
                  __pyx_t_2 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":330
 *                         for stock_code in stocks_list:  #
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)             # <<<<<<<<<<<<<<
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 */
                  __pyx_t_21 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_21 == ((int)-1))) __PYX_ERR(0, 330, __pyx_L111_error)

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":328
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 *                         for stock_code in stocks_list:  #             # <<<<<<<<<<<<<<
 *                             future = executor.submit(self.func_concept, stock_code, concept_name, multi_type)
 *                             futures.append(future)
 */
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":332
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L111_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_3 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (unlikely(PyMethod_Check(__pyx_t_2))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_2, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_futures};
                  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                }
                if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
                  __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
                  __pyx_t_18 = 0;
                  __pyx_t_19 = NULL;
                } else {
                  __pyx_t_18 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 332, __pyx_L111_error)
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                for (;;) {
                  if (likely(!__pyx_t_19)) {
                    if (likely(PyList_CheckExact(__pyx_t_2))) {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 332, __pyx_L111_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_1); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 332, __pyx_L111_error)
                      #else
                      __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L111_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      #endif
                    } else {
                      {
                        Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                        #if !CYTHON_ASSUME_SAFE_MACROS
                        if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 332, __pyx_L111_error)
                        #endif
                        if (__pyx_t_18 >= __pyx_temp) break;
                      }
                      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_18); __Pyx_INCREF(__pyx_t_1); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 332, __pyx_L111_error)
                      #else
                      __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L111_error)
                      __Pyx_GOTREF(__pyx_t_1);
                      #endif
                    }
                  } else {
                    __pyx_t_1 = __pyx_t_19(__pyx_t_2);
                    if (unlikely(!__pyx_t_1)) {
                      PyObject* exc_type = PyErr_Occurred();
                      if (exc_type) {
                        if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                        else __PYX_ERR(0, 332, __pyx_L111_error)
                      }
                      break;
                    }
                    __Pyx_GOTREF(__pyx_t_1);
                  }
                  __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
                  __pyx_t_1 = 0;

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":333
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 */
                  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L111_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __pyx_t_11 = NULL;
                  __pyx_t_4 = 0;
                  #if CYTHON_UNPACK_METHODS
                  if (likely(PyMethod_Check(__pyx_t_3))) {
                    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
                    if (likely(__pyx_t_11)) {
                      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                      __Pyx_INCREF(__pyx_t_11);
                      __Pyx_INCREF(function);
                      __Pyx_DECREF_SET(__pyx_t_3, function);
                      __pyx_t_4 = 1;
                    }
                  }
                  #endif
                  {
                    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
                    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L111_error)
                    __Pyx_GOTREF(__pyx_t_1);
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  }
                  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 333, __pyx_L111_error)
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                  __pyx_t_5 = (!__pyx_t_6);
                  if (__pyx_t_5) {

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":334
 *                         for future in as_completed(futures):
 *                             if not future.result():
 *                                 all_succeed = False             # <<<<<<<<<<<<<<
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 */
                    __pyx_v_all_succeed = 0;

                    /* "tbstock/dataAcquisition/saveDataToMysql.py":333
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):
 *                             if not future.result():             # <<<<<<<<<<<<<<
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 */
                  }

                  /* "tbstock/dataAcquisition/saveDataToMysql.py":332
 *                             futures.append(future)
 *                         # for future in tqdm(as_completed(futures), desc='update_concept', total=len(futures)):
 *                         for future in as_completed(futures):             # <<<<<<<<<<<<<<
 *                             if not future.result():
 *                                 all_succeed = False
 */
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":326
 *                                 all_succeed = False
 *                 elif multi_type == 'process':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
              }
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
              goto __pyx_L118_try_end;
              __pyx_L111_error:;
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              /*except:*/ {
                __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
                if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 326, __pyx_L113_except_error)
                __Pyx_XGOTREF(__pyx_t_2);
                __Pyx_XGOTREF(__pyx_t_1);
                __Pyx_XGOTREF(__pyx_t_3);
                __pyx_t_11 = PyTuple_Pack(3, __pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 326, __pyx_L113_except_error)
                __Pyx_GOTREF(__pyx_t_11);
                __pyx_t_22 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_11, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                if (unlikely(!__pyx_t_22)) __PYX_ERR(0, 326, __pyx_L113_except_error)
                __Pyx_GOTREF(__pyx_t_22);
                __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_22);
                __Pyx_DECREF(__pyx_t_22); __pyx_t_22 = 0;
                if (__pyx_t_5 < 0) __PYX_ERR(0, 326, __pyx_L113_except_error)
                __pyx_t_6 = (!__pyx_t_5);
                if (unlikely(__pyx_t_6)) {
                  __Pyx_GIVEREF(__pyx_t_2);
                  __Pyx_GIVEREF(__pyx_t_1);
                  __Pyx_XGIVEREF(__pyx_t_3);
                  __Pyx_ErrRestoreWithState(__pyx_t_2, __pyx_t_1, __pyx_t_3);
                  __pyx_t_2 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
                  __PYX_ERR(0, 326, __pyx_L113_except_error)
                }
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L112_exception_handled;
              }
              __pyx_L113_except_error:;
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              goto __pyx_L1_error;
              __pyx_L112_exception_handled:;
              __Pyx_XGIVEREF(__pyx_t_17);
              __Pyx_XGIVEREF(__pyx_t_16);
              __Pyx_XGIVEREF(__pyx_t_15);
              __Pyx_ExceptionReset(__pyx_t_17, __pyx_t_16, __pyx_t_15);
              __pyx_L118_try_end:;
            }
          }
          /*finally:*/ {
            /*normal exit:*/{
              if (__pyx_t_14) {
                __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__12, NULL);
                __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
                if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 326, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
              }
              goto __pyx_L110;
            }
            __pyx_L110:;
          }
          goto __pyx_L129;
          __pyx_L105_error:;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L1_error;
          __pyx_L129:;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":325
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:
 *                         futures = []
 */
        goto __pyx_L79;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":335
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'single':             # <<<<<<<<<<<<<<
 *                     for stock_code in stocks_list:
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 */
      __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 335, __pyx_L1_error)
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":336
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:             # <<<<<<<<<<<<<<
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 *                             all_succeed = False
 */
        if (likely(PyList_CheckExact(__pyx_v_stocks_list)) || PyTuple_CheckExact(__pyx_v_stocks_list)) {
          __pyx_t_3 = __pyx_v_stocks_list; __Pyx_INCREF(__pyx_t_3);
          __pyx_t_18 = 0;
          __pyx_t_19 = NULL;
        } else {
          __pyx_t_18 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_stocks_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 336, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_19)) {
            if (likely(PyList_CheckExact(__pyx_t_3))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
                #endif
                if (__pyx_t_18 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_1); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
                #endif
                if (__pyx_t_18 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_18); __Pyx_INCREF(__pyx_t_1); __pyx_t_18++; if (unlikely((0 < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
            }
          } else {
            __pyx_t_1 = __pyx_t_19(__pyx_t_3);
            if (unlikely(!__pyx_t_1)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                else __PYX_ERR(0, 336, __pyx_L1_error)
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_1);
          }
          __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
          __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":337
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 *                         if not self.func_concept(stock_code, concept_name, multi_type):             # <<<<<<<<<<<<<<
 *                             all_succeed = False
 *             if all_succeed:
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_func_concept); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[4] = {__pyx_t_11, __pyx_v_stock_code, __pyx_v_concept_name, __pyx_v_multi_type};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 337, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 337, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_5 = (!__pyx_t_6);
          if (__pyx_t_5) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":338
 *                     for stock_code in stocks_list:
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 *                             all_succeed = False             # <<<<<<<<<<<<<<
 *             if all_succeed:
 *                 update_dict["updated_concept"] = True
 */
            __pyx_v_all_succeed = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":337
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:
 *                         if not self.func_concept(stock_code, concept_name, multi_type):             # <<<<<<<<<<<<<<
 *                             all_succeed = False
 *             if all_succeed:
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":336
 *                                 all_succeed = False
 *                 elif multi_type == 'single':
 *                     for stock_code in stocks_list:             # <<<<<<<<<<<<<<
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 *                             all_succeed = False
 */
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":335
 *                             if not future.result():
 *                                 all_succeed = False
 *                 elif multi_type == 'single':             # <<<<<<<<<<<<<<
 *                     for stock_code in stocks_list:
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 */
      }
      __pyx_L79:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":310
 *             self.dataproc.setTableColumnValue(table_name, 'is_hsgt', 0)
 *             stock_concept_basic_info = self.dataproc.loadTable('stock_concept_basic_info')
 *             for index, row in tqdm(stock_concept_basic_info.iterrows(), desc=fun_name + ' : update concept : ' + multi_type,             # <<<<<<<<<<<<<<
 *                                    total=stock_concept_basic_info.shape[0]):
 *                 concept_name = row['name']
 */
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":339
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 *                             all_succeed = False
 *             if all_succeed:             # <<<<<<<<<<<<<<
 *                 update_dict["updated_concept"] = True
 *             self.update_json[table_name] = update_dict
 */
    if (__pyx_v_all_succeed) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":340
 *                             all_succeed = False
 *             if all_succeed:
 *                 update_dict["updated_concept"] = True             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
      if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated_concept, Py_True) < 0))) __PYX_ERR(0, 340, __pyx_L1_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":339
 *                         if not self.func_concept(stock_code, concept_name, multi_type):
 *                             all_succeed = False
 *             if all_succeed:             # <<<<<<<<<<<<<<
 *                 update_dict["updated_concept"] = True
 *             self.update_json[table_name] = update_dict
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":341
 *             if all_succeed:
 *                 update_dict["updated_concept"] = True
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *         else:
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (unlikely((PyObject_SetItem(__pyx_t_10, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 341, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":342
 *                 update_dict["updated_concept"] = True
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         else:
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 342, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 342, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":304
 * 
 *         #
 *         if not update_dict["updated_concept"]:             # <<<<<<<<<<<<<<
 *             all_succeed = True
 *             self.dataproc.setTableColumnValue(table_name, 'concept', '0')
 */
    goto __pyx_L74;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":344
 *             self.dumpJsonToFile()
 *         else:
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')             # <<<<<<<<<<<<<<
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_The);
    __pyx_t_8 += 4;
    __Pyx_GIVEREF(__pyx_kp_u_The);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_The);
    __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
    __pyx_t_2 = 0;
    __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_by_updat_2);
    __pyx_t_8 += 42;
    __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_by_updat_2);
    PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_table_has_been_updated_by_updat_2);
    __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 344, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_L74:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":232
 *         return True
 * 
 *     def updateStockBasicInfoByIndustryConcept(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_industry_basic_infostock_concept_basic_infostock_basic_info
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoByIndustryConcept", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_stock_industry_basic_info);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_industry_name);
  __Pyx_XDECREF(__pyx_v_industry_cons_stocks);
  __Pyx_XDECREF(__pyx_v_stocks_list);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_stock_concept_basic_info);
  __Pyx_XDECREF(__pyx_v_concept_name);
  __Pyx_XDECREF(__pyx_v_concept_cons_stocks);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_15updateStockBasicInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_14updateStockBasicInfoToMysql, "\n        \346\233\264\346\226\260stock_basic_info\350\241\250\347\232\204\n        code,name,first_date,province,main_business,key_products\345\210\227\n        :param multi_thread:\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_15updateStockBasicInfoToMysql = {"updateStockBasicInfoToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_15updateStockBasicInfoToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_14updateStockBasicInfoToMysql};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_15updateStockBasicInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockBasicInfoToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 346, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockBasicInfoToMysql") < 0)) __PYX_ERR(0, 346, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockBasicInfoToMysql", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 346, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_14updateStockBasicInfoToMysql(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":399
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]
 * 
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_1updateSingleStockBasicInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_1updateSingleStockBasicInfo = {"updateSingleStockBasicInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_1updateSingleStockBasicInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_1updateSingleStockBasicInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_stock_name = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockBasicInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_stock_name,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockBasicInfo", 1, 3, 3, 1); __PYX_ERR(0, 399, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 399, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockBasicInfo", 1, 3, 3, 2); __PYX_ERR(0, 399, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockBasicInfo") < 0)) __PYX_ERR(0, 399, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_stock_code = values[0];
    __pyx_v_stock_name = values[1];
    __pyx_v_update_dict = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockBasicInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 399, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql.updateSingleStockBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_updateSingleStockBasicInfo(__pyx_self, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_update_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_updateSingleStockBasicInfo(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_stock_name, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_stock_basic_info_df = NULL;
  PyObject *__pyx_v_stock_zyjs_ths_df = NULL;
  PyObject *__pyx_v_main_business = NULL;
  PyObject *__pyx_v_key_products = NULL;
  PyObject *__pyx_v_stock_individual_info_em_df = NULL;
  PyObject *__pyx_v_data_dict = NULL;
  PyObject *__pyx_v_first_date = NULL;
  PyObject *__pyx_v_province = NULL;
  PyObject *__pyx_v_new_record = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockBasicInfo", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":401
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)             # <<<<<<<<<<<<<<
 *             try:
 *                 # -
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_columns)) { __Pyx_RaiseClosureNameError("table_columns"); __PYX_ERR(0, 401, __pyx_L1_error) }
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_columns, __pyx_cur_scope->__pyx_v_table_columns) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_basic_info_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":402
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 *             try:             # <<<<<<<<<<<<<<
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":404
 *             try:
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)             # <<<<<<<<<<<<<<
 *                 main_business = stock_zyjs_ths_df.loc[0, '']
 *                 key_products = stock_zyjs_ths_df.loc[0, '']
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ak); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stock_zyjs_ths); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 404, __pyx_L3_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_stock_zyjs_ths_df = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":405
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 *                 main_business = stock_zyjs_ths_df.loc[0, '']             # <<<<<<<<<<<<<<
 *                 key_products = stock_zyjs_ths_df.loc[0, '']
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zyjs_ths_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_main_business = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":406
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 *                 main_business = stock_zyjs_ths_df.loc[0, '']
 *                 key_products = stock_zyjs_ths_df.loc[0, '']             # <<<<<<<<<<<<<<
 * 
 *                 # # -- ip
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zyjs_ths_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__16); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_key_products = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":414
 * 
 *                 #  -  -
 *                 stock_individual_info_em_df = sdc.stock_individual_info_em(symbol=stock_code)             # <<<<<<<<<<<<<<
 *                 data_dict = dict(zip(stock_individual_info_em_df['item'], stock_individual_info_em_df['value']))
 *                 first_date = pd.to_datetime(str(data_dict['']))
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sdc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stock_individual_info_em); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 414, __pyx_L3_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_stock_individual_info_em_df = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":415
 *                 #  -  -
 *                 stock_individual_info_em_df = sdc.stock_individual_info_em(symbol=stock_code)
 *                 data_dict = dict(zip(stock_individual_info_em_df['item'], stock_individual_info_em_df['value']))             # <<<<<<<<<<<<<<
 *                 first_date = pd.to_datetime(str(data_dict['']))
 *                 province = utils.extractAdministrativeRegions(data_dict[''])
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_individual_info_em_df, __pyx_n_s_item); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 415, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_individual_info_em_df, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1)) __PYX_ERR(0, 415, __pyx_L3_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2)) __PYX_ERR(0, 415, __pyx_L3_error);
      __pyx_t_1 = 0;
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 415, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_data_dict = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":416
 *                 stock_individual_info_em_df = sdc.stock_individual_info_em(symbol=stock_code)
 *                 data_dict = dict(zip(stock_individual_info_em_df['item'], stock_individual_info_em_df['value']))
 *                 first_date = pd.to_datetime(str(data_dict['']))             # <<<<<<<<<<<<<<
 *                 province = utils.extractAdministrativeRegions(data_dict[''])
 *                 if province:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 416, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_data_dict, __pyx_kp_s__17); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = __Pyx_PyObject_Str(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_7};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 416, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_v_first_date = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":417
 *                 data_dict = dict(zip(stock_individual_info_em_df['item'], stock_individual_info_em_df['value']))
 *                 first_date = pd.to_datetime(str(data_dict['']))
 *                 province = utils.extractAdministrativeRegions(data_dict[''])             # <<<<<<<<<<<<<<
 *                 if province:
 *                     province = province[0]
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_extractAdministrativeRegions); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_data_dict, __pyx_kp_s__18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 417, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_7))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_7, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 417, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      }
      __pyx_v_province = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":418
 *                 first_date = pd.to_datetime(str(data_dict['']))
 *                 province = utils.extractAdministrativeRegions(data_dict[''])
 *                 if province:             # <<<<<<<<<<<<<<
 *                     province = province[0]
 *                 else:
 */
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_province); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 418, __pyx_L3_error)
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":419
 *                 province = utils.extractAdministrativeRegions(data_dict[''])
 *                 if province:
 *                     province = province[0]             # <<<<<<<<<<<<<<
 *                 else:
 *                     province = ''
 */
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_province, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 419, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF_SET(__pyx_v_province, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":418
 *                 first_date = pd.to_datetime(str(data_dict['']))
 *                 province = utils.extractAdministrativeRegions(data_dict[''])
 *                 if province:             # <<<<<<<<<<<<<<
 *                     province = province[0]
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":421
 *                     province = province[0]
 *                 else:
 *                     province = ''             # <<<<<<<<<<<<<<
 * 
 *                 new_record = {'code': stock_code, 'name': stock_name, 'main_business': main_business,
 */
      /*else*/ {
        __Pyx_INCREF(__pyx_kp_s__19);
        __Pyx_DECREF_SET(__pyx_v_province, __pyx_kp_s__19);
      }
      __pyx_L9:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":423
 *                     province = ''
 * 
 *                 new_record = {'code': stock_code, 'name': stock_name, 'main_business': main_business,             # <<<<<<<<<<<<<<
 *                               'key_products': key_products, 'first_date': first_date, 'province': province}
 * 
 */
      __pyx_t_3 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 423, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_code, __pyx_v_stock_code) < 0) __PYX_ERR(0, 423, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_stock_name) < 0) __PYX_ERR(0, 423, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_main_business, __pyx_v_main_business) < 0) __PYX_ERR(0, 423, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":424
 * 
 *                 new_record = {'code': stock_code, 'name': stock_name, 'main_business': main_business,
 *                               'key_products': key_products, 'first_date': first_date, 'province': province}             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_key_products, __pyx_v_key_products) < 0) __PYX_ERR(0, 423, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_first_date, __pyx_v_first_date) < 0) __PYX_ERR(0, 423, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_province, __pyx_v_province) < 0) __PYX_ERR(0, 423, __pyx_L3_error)
      __pyx_v_new_record = ((PyObject*)__pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":427
 * 
 *                 #
 *                 stock_basic_info_df.loc[0, list(new_record.keys())] = list(new_record.values())             # <<<<<<<<<<<<<<
 *                 stock_basic_info_df.fillna('0', inplace=True)
 * 
 */
      __pyx_t_3 = __Pyx_PyDict_Values(__pyx_v_new_record); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_basic_info_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_new_record); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 427, __pyx_L3_error);
      __Pyx_GIVEREF(__pyx_t_2);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 427, __pyx_L3_error);
      __pyx_t_2 = 0;
      if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_1, __pyx_t_7) < 0))) __PYX_ERR(0, 427, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":428
 *                 #
 *                 stock_basic_info_df.loc[0, list(new_record.keys())] = list(new_record.values())
 *                 stock_basic_info_df.fillna('0', inplace=True)             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_basic_info_df, __pyx_n_s_fillna); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 428, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 428, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 428, __pyx_L3_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__20, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":431
 * 
 *                 #
 *                 session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).delete(synchronize_session=False)             # <<<<<<<<<<<<<<
 *                 session.commit()
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_session); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_10)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_10);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_7};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_filter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_stock_basic_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_7)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_7);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_1};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_delete); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_synchronize_session, Py_False) < 0) __PYX_ERR(0, 431, __pyx_L3_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":432
 *                 #
 *                 session.query(stock_basic_info).filter(stock_basic_info.code == stock_code).delete(synchronize_session=False)
 *                 session.commit()             # <<<<<<<<<<<<<<
 * 
 *                 stock_basic_info_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 432, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_commit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":434
 *                 session.commit()
 * 
 *                 stock_basic_info_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 * 
 *                 if stock_code not in update_dict['update_list']:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_basic_info_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 434, __pyx_L3_error) }
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 434, __pyx_L3_error);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_engine); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_con, __pyx_t_7) < 0) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 434, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 434, __pyx_L3_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 434, __pyx_L3_error) }
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 434, __pyx_L3_error)
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 434, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":436
 *                 stock_basic_info_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 * 
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 436, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_7, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 436, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":437
 * 
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
        __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_stock_code); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 437, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":436
 *                 stock_basic_info_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 * 
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":438
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 438, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_7, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 438, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":439
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 439, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_stock_code};
          __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 439, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":438
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":440
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L7_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":402
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 *             try:             # <<<<<<<<<<<<<<
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":442
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql.updateSingleStockBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 442, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_7);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":443
 * 
 *             except Exception as e:
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 */
        __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 443, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":444
 *             except Exception as e:
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 utils.logger.error(f'Failed to updateSingleStockBasicInfo for stock_code = {stock_code}: {e} ')
 */
          __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 444, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_stock_code); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 444, __pyx_L17_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":443
 * 
 *             except Exception as e:
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":445
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f'Failed to updateSingleStockBasicInfo for stock_code = {stock_code}: {e} ')
 *                 return False
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":446
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 *                 utils.logger.error(f'Failed to updateSingleStockBasicInfo for stock_code = {stock_code}: {e} ')             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyTuple_New(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_updateSingleStockBasic);
        __pyx_t_14 += 54;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_updateSingleStockBasic);
        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_u_Failed_to_updateSingleStockBasic);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_kp_u__21);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_kp_u__22);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 446, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_16};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":447
 *                 no_fault = False
 *                 utils.logger.error(f'Failed to updateSingleStockBasicInfo for stock_code = {stock_code}: {e} ')
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        goto __pyx_L16_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":442
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
      /*finally:*/ {
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_12 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L5_except_error;
        }
        __pyx_L16_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":402
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 *             try:             # <<<<<<<<<<<<<<
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":399
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]
 * 
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql.updateSingleStockBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_basic_info_df);
  __Pyx_XDECREF(__pyx_v_stock_zyjs_ths_df);
  __Pyx_XDECREF(__pyx_v_main_business);
  __Pyx_XDECREF(__pyx_v_key_products);
  __Pyx_XDECREF(__pyx_v_stock_individual_info_em_df);
  __Pyx_XDECREF(__pyx_v_data_dict);
  __Pyx_XDECREF(__pyx_v_first_date);
  __Pyx_XDECREF(__pyx_v_province);
  __Pyx_XDECREF(__pyx_v_new_record);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_14updateStockBasicInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_failed_list = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_rows = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_cols = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_updateSingleStockBasicInfo = 0;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_current_time = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_7genexpr__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockBasicInfoToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 346, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":354
 *         :return:
 *         '''
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'stock_basic_info'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":355
 *         '''
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_basic_info'             # <<<<<<<<<<<<<<
 *         no_fault = True
 *         # jsonjson
 */
  __Pyx_INCREF(__pyx_n_s_stock_basic_info);
  __Pyx_GIVEREF(__pyx_n_s_stock_basic_info);
  __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_basic_info;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":356
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_basic_info'
 *         no_fault = True             # <<<<<<<<<<<<<<
 *         # jsonjson
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":358
 *         no_fault = True
 *         # jsonjson
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}             # <<<<<<<<<<<<<<
 * 
 *         if 'stock_simple_info' not in self.update_json or not self.update_json['stock_simple_info']['updated']:
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated_industry, Py_False) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated_concept, Py_False) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 358, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":360
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}
 * 
 *         if 'stock_simple_info' not in self.update_json or not self.update_json['stock_simple_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Need update stock_simple_info firstly.')
 *             return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_stock_simple_info, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_stock_simple_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 360, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":361
 * 
 *         if 'stock_simple_info' not in self.update_json or not self.update_json['stock_simple_info']['updated']:
 *             utils.logger.error(f'Need update stock_simple_info firstly.')             # <<<<<<<<<<<<<<
 *             return False
 *         elif not self.update_json['stock_simple_info']['new_stocks']:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_u_Need_update_stock_simple_info_fi};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":362
 *         if 'stock_simple_info' not in self.update_json or not self.update_json['stock_simple_info']['updated']:
 *             utils.logger.error(f'Need update stock_simple_info firstly.')
 *             return False             # <<<<<<<<<<<<<<
 *         elif not self.update_json['stock_simple_info']['new_stocks']:
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":360
 *         update_dict = {"updated": False, "updated_industry": False, "updated_concept": False, "failed_list": [], "update_list": []}
 * 
 *         if 'stock_simple_info' not in self.update_json or not self.update_json['stock_simple_info']['updated']:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Need update stock_simple_info firstly.')
 *             return False
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":363
 *             utils.logger.error(f'Need update stock_simple_info firstly.')
 *             return False
 *         elif not self.update_json['stock_simple_info']['new_stocks']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 *             if table_name in self.update_json:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_stock_simple_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_new_stocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 363, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = (!__pyx_t_5);
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":364
 *             return False
 *         elif not self.update_json['stock_simple_info']['new_stocks']:
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')             # <<<<<<<<<<<<<<
 *             if table_name in self.update_json:
 *                 update_dict = self.update_json[table_name]
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_8 = 0;
    __pyx_t_9 = 127;
    __Pyx_INCREF(__pyx_kp_u_There_is_not_new_stocks_to_updat);
    __pyx_t_8 += 34;
    __Pyx_GIVEREF(__pyx_kp_u_There_is_not_new_stocks_to_updat);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_There_is_not_new_stocks_to_updat);
    __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
    __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
    __Pyx_GIVEREF(__pyx_t_10);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_10);
    __pyx_t_10 = 0;
    __Pyx_INCREF(__pyx_kp_u__5);
    __pyx_t_8 += 1;
    __Pyx_GIVEREF(__pyx_kp_u__5);
    PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
    __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_10};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":365
 *         elif not self.update_json['stock_simple_info']['new_stocks']:
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 *             if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *                 update_dict = self.update_json[table_name]
 *             update_dict['updated'] = True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 365, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":366
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 *             if table_name in self.update_json:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 366, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":365
 *         elif not self.update_json['stock_simple_info']['new_stocks']:
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 *             if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *                 update_dict = self.update_json[table_name]
 *             update_dict['updated'] = True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":367
 *             if table_name in self.update_json:
 *                 update_dict = self.update_json[table_name]
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 367, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":368
 *                 update_dict = self.update_json[table_name]
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *             return True
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 368, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":369
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *             return True
 *         else:
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 369, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":370
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 *             return True             # <<<<<<<<<<<<<<
 *         else:
 *             failed_list = self.update_json['stock_simple_info']['new_stocks'].copy()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":363
 *             utils.logger.error(f'Need update stock_simple_info firstly.')
 *             return False
 *         elif not self.update_json['stock_simple_info']['new_stocks']:             # <<<<<<<<<<<<<<
 *             utils.logger.info(f'There is not new stocks to update {table_name}.')
 *             if table_name in self.update_json:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":372
 *             return True
 *         else:
 *             failed_list = self.update_json['stock_simple_info']['new_stocks'].copy()             # <<<<<<<<<<<<<<
 *             update_dict['failed_list'] = failed_list
 * 
 */
  /*else*/ {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_stock_simple_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_new_stocks); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 372, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_10))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_10, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 372, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    }
    __pyx_v_failed_list = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":373
 *         else:
 *             failed_list = self.update_json['stock_simple_info']['new_stocks'].copy()
 *             update_dict['failed_list'] = failed_list             # <<<<<<<<<<<<<<
 * 
 *         if table_name in self.update_json:
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_failed_list, __pyx_v_failed_list) < 0))) __PYX_ERR(0, 373, __pyx_L1_error)
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":375
 *             update_dict['failed_list'] = failed_list
 * 
 *         if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 375, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":376
 * 
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 *                 return True
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_updated); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 376, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":377
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = 0;
      __pyx_t_9 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_8 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_The);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
      __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_code_name_first_date_prov);
      __pyx_t_8 += 94;
      __Pyx_GIVEREF(__pyx_kp_u_table_code_name_first_date_prov);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_table_code_name_first_date_prov);
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":378
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":376
 * 
 *         if table_name in self.update_json:
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":379
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 *                 return True
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict = self.update_json[table_name]
 *                 failed_list = self.update_json[table_name]['failed_list']
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!__pyx_t_5) {
    } else {
      __pyx_t_7 = __pyx_t_5;
      goto __pyx_L9_bool_binop_done;
    }
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_10, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_7 = __pyx_t_5;
    __pyx_L9_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":380
 *                 return True
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 failed_list = self.update_json[table_name]['failed_list']
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 380, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":381
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:
 *                 update_dict = self.update_json[table_name]
 *                 failed_list = self.update_json[table_name]['failed_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 381, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_failed_list, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":379
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 *                 return True
 *             elif self.update_json[table_name]['failed_list'] or self.update_json[table_name]['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict = self.update_json[table_name]
 *                 failed_list = self.update_json[table_name]['failed_list']
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":375
 *             update_dict['failed_list'] = failed_list
 * 
 *         if table_name in self.update_json:             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table code, name, first_date, province, main_business, key_products columns has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":383
 *                 failed_list = self.update_json[table_name]['failed_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         # dataframe
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 383, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":386
 * 
 *         # dataframe
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         rows, cols = all_stock_simple_info.shape
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":387
 *         # dataframe
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         rows, cols = all_stock_simple_info.shape             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 387, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
    PyObject* sequence = __pyx_t_10;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 387, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_t_3);
    #else
    __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    #endif
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_1 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L11_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_2), 2) < 0) __PYX_ERR(0, 387, __pyx_L1_error)
    __pyx_t_11 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L12_unpacking_done;
    __pyx_L11_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_11 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 387, __pyx_L1_error)
    __pyx_L12_unpacking_done:;
  }
  __pyx_v_rows = __pyx_t_1;
  __pyx_t_1 = 0;
  __pyx_v_cols = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":390
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_Globals(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 390, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_10);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":391
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         table_columns = list(dtype_mapping.keys())
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 391, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":392
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 *         table_columns = list(dtype_mapping.keys())
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_id};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 392, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":391
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         table_columns = list(dtype_mapping.keys())
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":393
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 *         table_columns = list(dtype_mapping.keys())             # <<<<<<<<<<<<<<
 * 
 *         # update_range
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_table_columns = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":396
 * 
 *         # update_range
 *         update_range = range(0, rows)             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 396, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_rows);
  __Pyx_GIVEREF(__pyx_v_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rows)) __PYX_ERR(0, 396, __pyx_L1_error);
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_range = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":397
 *         # update_range
 *         update_range = range(0, rows)
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):
 */
  { /* enter inner scope */
    __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 397, __pyx_L16_error)
    __Pyx_GOTREF(__pyx_t_10);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_3 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_8 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 397, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 397, __pyx_L16_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 397, __pyx_L16_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 397, __pyx_L16_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 397, __pyx_L16_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 397, __pyx_L16_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_12(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 397, __pyx_L16_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_x, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 397, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_7genexpr__pyx_v_x);
      __Pyx_GIVEREF(__pyx_7genexpr__pyx_v_x);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_7genexpr__pyx_v_x)) __PYX_ERR(0, 397, __pyx_L16_error);
      __Pyx_INCREF(__pyx_n_s_code);
      __Pyx_GIVEREF(__pyx_n_s_code);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_code)) __PYX_ERR(0, 397, __pyx_L16_error);
      __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 397, __pyx_L16_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_13, __pyx_v_failed_list, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 397, __pyx_L16_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_7) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_7genexpr__pyx_v_x))) __PYX_ERR(0, 397, __pyx_L16_error)
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
    goto __pyx_L21_exit_scope;
    __pyx_L16_error:;
    __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x); __pyx_7genexpr__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L21_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":399
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]
 * 
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 */
  __pyx_t_10 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_1updateSingleStockBasicInfo, 0, __pyx_n_s_DataToMysql_updateStockBasicInfo, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_v_updateSingleStockBasicInfo = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":449
 *                 return False
 * 
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 449, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":450
 * 
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 450, __pyx_L1_error)
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_14 = __Pyx_PyObject_LookupSpecial(__pyx_t_13, __pyx_n_s_exit); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_13, __pyx_n_s_enter); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 450, __pyx_L23_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 450, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __pyx_t_10 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_17);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_10;
            __pyx_t_10 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":451
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for index in update_range:
 */
            __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 451, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_10);
            __pyx_v_futures = ((PyObject*)__pyx_t_10);
            __pyx_t_10 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":452
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for index in update_range:
 *                     stock_code = all_stock_simple_info.loc[index, 'code']
 */
            __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 452, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 452, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_13 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_13)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_13);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
              __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 452, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_v_start_time = __pyx_t_10;
            __pyx_t_10 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":453
 *                 futures = []
 *                 start_time = time.time()
 *                 for index in update_range:             # <<<<<<<<<<<<<<
 *                     stock_code = all_stock_simple_info.loc[index, 'code']
 *                     stock_name = all_stock_simple_info.loc[index, 'name']
 */
            __pyx_t_10 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_10);
            __pyx_t_8 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_10);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 453, __pyx_L27_error)
                #endif
                if (__pyx_t_8 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 453, __pyx_L27_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_10, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 453, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":454
 *                 start_time = time.time()
 *                 for index in update_range:
 *                     stock_code = all_stock_simple_info.loc[index, 'code']             # <<<<<<<<<<<<<<
 *                     stock_name = all_stock_simple_info.loc[index, 'name']
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 454, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 454, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_INCREF(__pyx_v_index);
              __Pyx_GIVEREF(__pyx_v_index);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_index)) __PYX_ERR(0, 454, __pyx_L27_error);
              __Pyx_INCREF(__pyx_n_s_code);
              __Pyx_GIVEREF(__pyx_n_s_code);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_code)) __PYX_ERR(0, 454, __pyx_L27_error);
              __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":455
 *                 for index in update_range:
 *                     stock_code = all_stock_simple_info.loc[index, 'code']
 *                     stock_name = all_stock_simple_info.loc[index, 'name']             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)
 *                     futures.append(future)
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 455, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_INCREF(__pyx_v_index);
              __Pyx_GIVEREF(__pyx_v_index);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_index)) __PYX_ERR(0, 455, __pyx_L27_error);
              __Pyx_INCREF(__pyx_n_s_name);
              __Pyx_GIVEREF(__pyx_n_s_name);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_n_s_name)) __PYX_ERR(0, 455, __pyx_L27_error);
              __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 455, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":456
 *                     stock_code = all_stock_simple_info.loc[index, 'code']
 *                     stock_name = all_stock_simple_info.loc[index, 'name']
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 */
              __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 456, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_13))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_13, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_1, __pyx_v_updateSingleStockBasicInfo, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_update_dict};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 456, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":457
 *                     stock_name = all_stock_simple_info.loc[index, 'name']
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 457, __pyx_L27_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":453
 *                 futures = []
 *                 start_time = time.time()
 *                 for index in update_range:             # <<<<<<<<<<<<<<
 *                     stock_code = all_stock_simple_info.loc[index, 'code']
 *                     stock_name = all_stock_simple_info.loc[index, 'name']
 */
            }
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":458
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_13);
            __pyx_t_1 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_13))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_13, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            }
            __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_3)) __PYX_ERR(0, 458, __pyx_L27_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 458, __pyx_L27_error)
            __pyx_t_8 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 458, __pyx_L27_error)
            __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_1) < 0) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L27_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
              __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_8 = 0;
              __pyx_t_12 = NULL;
            } else {
              __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 458, __pyx_L27_error)
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            for (;;) {
              if (likely(!__pyx_t_12)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 458, __pyx_L27_error)
                    #endif
                    if (__pyx_t_8 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 458, __pyx_L27_error)
                  #else
                  __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L27_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 458, __pyx_L27_error)
                    #endif
                    if (__pyx_t_8 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 458, __pyx_L27_error)
                  #else
                  __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L27_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  #endif
                }
              } else {
                __pyx_t_1 = __pyx_t_12(__pyx_t_3);
                if (unlikely(!__pyx_t_1)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 458, __pyx_L27_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_1);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":459
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 459, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 459, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_10);
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              __pyx_t_13 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_10))) {
                __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
                if (likely(__pyx_t_13)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                  __Pyx_INCREF(__pyx_t_13);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_10, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 459, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":460
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_1 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 460, __pyx_L27_error)
              __Pyx_GOTREF(__pyx_t_10);
              __pyx_t_13 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GE); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 460, __pyx_L27_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
              __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 460, __pyx_L27_error)
              __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
              if (__pyx_t_7) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":461
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 461, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_13);
                if (unlikely((PyObject_SetItem(__pyx_t_13, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 461, __pyx_L27_error)
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":462
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         else:
 */
                __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 462, __pyx_L27_error)
                __Pyx_GOTREF(__pyx_t_10);
                __pyx_t_1 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_10))) {
                  __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
                  if (likely(__pyx_t_1)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
                    __Pyx_INCREF(__pyx_t_1);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_10, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
                  __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                  if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 462, __pyx_L27_error)
                  __Pyx_GOTREF(__pyx_t_13);
                  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
                }
                __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":463
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             start_time = time.time()
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":460
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":458
 *                     future = executor.submit(updateSingleStockBasicInfo, stock_code, stock_name, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":450
 * 
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
          goto __pyx_L32_try_end;
          __pyx_L27_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_13, &__pyx_t_10) < 0) __PYX_ERR(0, 450, __pyx_L29_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_13);
            __Pyx_XGOTREF(__pyx_t_10);
            __pyx_t_1 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_13, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 450, __pyx_L29_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_19 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_1, NULL);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 450, __pyx_L29_except_error)
            __Pyx_GOTREF(__pyx_t_19);
            __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_19);
            __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
            if (__pyx_t_7 < 0) __PYX_ERR(0, 450, __pyx_L29_except_error)
            __pyx_t_5 = (!__pyx_t_7);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_13);
              __Pyx_XGIVEREF(__pyx_t_10);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_13, __pyx_t_10);
              __pyx_t_3 = 0; __pyx_t_13 = 0; __pyx_t_10 = 0; 
              __PYX_ERR(0, 450, __pyx_L29_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            goto __pyx_L28_exception_handled;
          }
          __pyx_L29_except_error:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          goto __pyx_L1_error;
          __pyx_L28_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_16, __pyx_t_17);
          __pyx_L32_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_14) {
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 450, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
          }
          goto __pyx_L26;
        }
        __pyx_L26:;
      }
      goto __pyx_L43;
      __pyx_L23_error:;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L1_error;
      __pyx_L43:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":449
 *                 return False
 * 
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L22;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":465
 *                         start_time = current_time
 *         else:
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for index in tqdm(update_range, desc=fun_name):
 *                 stock_code = all_stock_simple_info.loc[index, 'code']
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 465, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_start_time = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":466
 *         else:
 *             start_time = time.time()
 *             for index in tqdm(update_range, desc=fun_name):             # <<<<<<<<<<<<<<
 *                 stock_code = all_stock_simple_info.loc[index, 'code']
 *                 stock_name = all_stock_simple_info.loc[index, 'name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_update_range)) __PYX_ERR(0, 466, __pyx_L1_error);
    __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 466, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_13 = __pyx_t_1; __Pyx_INCREF(__pyx_t_13);
      __pyx_t_8 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 466, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 466, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_13))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_13);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_13);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_13, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_12(__pyx_t_13);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 466, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":467
 *             start_time = time.time()
 *             for index in tqdm(update_range, desc=fun_name):
 *                 stock_code = all_stock_simple_info.loc[index, 'code']             # <<<<<<<<<<<<<<
 *                 stock_name = all_stock_simple_info.loc[index, 'name']
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(0, 467, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_code);
      __Pyx_GIVEREF(__pyx_n_s_code);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_code)) __PYX_ERR(0, 467, __pyx_L1_error);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 467, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":468
 *             for index in tqdm(update_range, desc=fun_name):
 *                 stock_code = all_stock_simple_info.loc[index, 'code']
 *                 stock_name = all_stock_simple_info.loc[index, 'name']             # <<<<<<<<<<<<<<
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)
 *                 current_time = time.time()
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_all_stock_simple_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_index);
      __Pyx_GIVEREF(__pyx_v_index);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_index)) __PYX_ERR(0, 468, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_name);
      __Pyx_GIVEREF(__pyx_n_s_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_name)) __PYX_ERR(0, 468, __pyx_L1_error);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 468, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_stock_name, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":469
 *                 stock_code = all_stock_simple_info.loc[index, 'code']
 *                 stock_name = all_stock_simple_info.loc[index, 'name']
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      __pyx_t_1 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockBasicInfoToMysql_updateSingleStockBasicInfo(__pyx_v_updateSingleStockBasicInfo, __pyx_v_stock_code, __pyx_v_stock_name, __pyx_v_update_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":470
 *                 stock_name = all_stock_simple_info.loc[index, 'name']
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":471
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_1 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_10, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 471, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":472
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 472, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":473
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         if no_fault:
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 473, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_1 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 473, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":474
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":471
 *                 res = updateSingleStockBasicInfo(stock_code, stock_name, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":466
 *         else:
 *             start_time = time.time()
 *             for index in tqdm(update_range, desc=fun_name):             # <<<<<<<<<<<<<<
 *                 stock_code = all_stock_simple_info.loc[index, 'code']
 *                 stock_name = all_stock_simple_info.loc[index, 'name']
 */
    }
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_L22:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":475
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":476
 *                     start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 476, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":475
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":477
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  if (unlikely((PyObject_SetItem(__pyx_t_13, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 477, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":478
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 478, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 478, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockBasicInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_failed_list);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_cols);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_updateSingleStockBasicInfo);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_7genexpr__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":480
 *         self.dumpJsonToFile()
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):             # <<<<<<<<<<<<<<
 *         dividend_table = 'stock_dividend_info'
 *         temp = pd.DataFrame()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_17getFqFactorByDividend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_17getFqFactorByDividend = {"getFqFactorByDividend", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_17getFqFactorByDividend, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_17getFqFactorByDividend(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getFqFactorByDividend (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_689009)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 480, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getFqFactorByDividend") < 0)) __PYX_ERR(0, 480, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getFqFactorByDividend", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 480, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.getFqFactorByDividend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_16getFqFactorByDividend(__pyx_self, __pyx_v_self, __pyx_v_stock_code);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_16getFqFactorByDividend(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code) {
  PyObject *__pyx_v_dividend_table = NULL;
  PyObject *__pyx_v_temp = NULL;
  PyObject *__pyx_v_basic_info_df = NULL;
  PyObject *__pyx_v_ipo_time = NULL;
  PyObject *__pyx_v_stock_trade_day_df = NULL;
  PyObject *__pyx_v_dividend_df = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_v_row_index1 = NULL;
  PyObject *__pyx_v_cash_dividends = NULL;
  PyObject *__pyx_v_stock_dividends = NULL;
  PyObject *__pyx_v_row_index2 = NULL;
  PyObject *__pyx_v_restoration_price_qfq = NULL;
  PyObject *__pyx_v_restoration_price_hfq = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getFqFactorByDividend", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":481
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):
 *         dividend_table = 'stock_dividend_info'             # <<<<<<<<<<<<<<
 *         temp = pd.DataFrame()
 *         # temp['date'] = []
 */
  __Pyx_INCREF(__pyx_n_s_stock_dividend_info);
  __pyx_v_dividend_table = __pyx_n_s_stock_dividend_info;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":482
 *     def getFqFactorByDividend(self, stock_code='689009'):
 *         dividend_table = 'stock_dividend_info'
 *         temp = pd.DataFrame()             # <<<<<<<<<<<<<<
 *         # temp['date'] = []
 *         # temp['qfq_factor'] = []
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 482, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_temp = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":487
 *         # temp['hfq_factor'] = []
 *         # temp['date'] = pd.to_datetime(temp['date'])
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()             # <<<<<<<<<<<<<<
 *         temp.loc[0, 'qfq_factor'] = 1.0
 *         temp.loc[0, 'hfq_factor'] = 1.0
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_tuple__26, __pyx_t_1) < 0))) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":488
 *         # temp['date'] = pd.to_datetime(temp['date'])
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()
 *         temp.loc[0, 'qfq_factor'] = 1.0             # <<<<<<<<<<<<<<
 *         temp.loc[0, 'hfq_factor'] = 1.0
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_tuple__27, __pyx_float_1_0) < 0))) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":489
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()
 *         temp.loc[0, 'qfq_factor'] = 1.0
 *         temp.loc[0, 'hfq_factor'] = 1.0             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_tuple__28, __pyx_float_1_0) < 0))) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":491
 *         temp.loc[0, 'hfq_factor'] = 1.0
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":492
 * 
 *         try:
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)             # <<<<<<<<<<<<<<
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 492, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadTableContentByCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_n_s_stock_basic_info, __pyx_v_stock_code};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_basic_info_df = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":493
 *         try:
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,
 *                                                     end_date=self.today_date,
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_basic_info_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_tuple__29); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_ipo_time = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":494
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,             # <<<<<<<<<<<<<<
 *                                                     end_date=self.today_date,
 *                                                     adjust="")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_zh_a_hist); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 494, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_period, __pyx_n_s_daily) < 0) __PYX_ERR(0, 494, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_date, __pyx_v_ipo_time) < 0) __PYX_ERR(0, 494, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":495
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,
 *                                                     end_date=self.today_date,             # <<<<<<<<<<<<<<
 *                                                     adjust="")
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_today_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 495, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_date, __pyx_t_3) < 0) __PYX_ERR(0, 494, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_adjust, __pyx_kp_s__30) < 0) __PYX_ERR(0, 494, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":494
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,             # <<<<<<<<<<<<<<
 *                                                     end_date=self.today_date,
 *                                                     adjust="")
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 494, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_stock_trade_day_df = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":498
 *                                                     adjust="")
 * 
 *             stock_trade_day_df[''] = stock_trade_day_df[''].shift(1)             # <<<<<<<<<<<<<<
 *             stock_trade_day_df.loc[0, ''] = stock_trade_day_df.iloc[0][''] / (1.0 + stock_trade_day_df.iloc[0][''] / 100)
 *             stock_trade_day_df[''] = (stock_trade_day_df[''] - stock_trade_day_df['']) / stock_trade_day_df[''] * 100.0
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__31); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_int_1};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 498, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__32, __pyx_t_3) < 0))) __PYX_ERR(0, 498, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":499
 * 
 *             stock_trade_day_df[''] = stock_trade_day_df[''].shift(1)
 *             stock_trade_day_df.loc[0, ''] = stock_trade_day_df.iloc[0][''] / (1.0 + stock_trade_day_df.iloc[0][''] / 100)             # <<<<<<<<<<<<<<
 *             stock_trade_day_df[''] = (stock_trade_day_df[''] - stock_trade_day_df['']) / stock_trade_day_df[''] * 100.0
 *             stock_trade_day_df[''] = pd.to_datetime(stock_trade_day_df['']).dt.date
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_iloc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_kp_s__31); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_kp_s__33); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyInt_TrueDivideObjC(__pyx_t_2, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyFloat_AddCObj(__pyx_float_1_0, __pyx_t_1, 1.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_tuple__34, __pyx_t_1) < 0))) __PYX_ERR(0, 499, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":500
 *             stock_trade_day_df[''] = stock_trade_day_df[''].shift(1)
 *             stock_trade_day_df.loc[0, ''] = stock_trade_day_df.iloc[0][''] / (1.0 + stock_trade_day_df.iloc[0][''] / 100)
 *             stock_trade_day_df[''] = (stock_trade_day_df[''] - stock_trade_day_df['']) / stock_trade_day_df[''] * 100.0             # <<<<<<<<<<<<<<
 *             stock_trade_day_df[''] = pd.to_datetime(stock_trade_day_df['']).dt.date
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__31); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyNumber_Subtract(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_float_100_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__33, __pyx_t_2) < 0))) __PYX_ERR(0, 500, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":501
 *             stock_trade_day_df.loc[0, ''] = stock_trade_day_df.iloc[0][''] / (1.0 + stock_trade_day_df.iloc[0][''] / 100)
 *             stock_trade_day_df[''] = (stock_trade_day_df[''] - stock_trade_day_df['']) / stock_trade_day_df[''] * 100.0
 *             stock_trade_day_df[''] = pd.to_datetime(stock_trade_day_df['']).dt.date             # <<<<<<<<<<<<<<
 * 
 *             dividend_df = self.dataproc.loadTableContentByCode(dividend_table, stock_code)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__35); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__35, __pyx_t_2) < 0))) __PYX_ERR(0, 501, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":503
 *             stock_trade_day_df[''] = pd.to_datetime(stock_trade_day_df['']).dt.date
 * 
 *             dividend_df = self.dataproc.loadTableContentByCode(dividend_table, stock_code)             # <<<<<<<<<<<<<<
 *             dividend_df['ex_date'] = pd.to_datetime(dividend_df['ex_date']).dt.date
 *             i = 1
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 503, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadTableContentByCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_dividend_table, __pyx_v_stock_code};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_v_dividend_df = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":504
 * 
 *             dividend_df = self.dataproc.loadTableContentByCode(dividend_table, stock_code)
 *             dividend_df['ex_date'] = pd.to_datetime(dividend_df['ex_date']).dt.date             # <<<<<<<<<<<<<<
 *             i = 1
 *             for value in reversed(dividend_df['ex_date'].to_list()):
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dividend_df, __pyx_n_s_ex_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_dividend_df, __pyx_n_s_ex_date, __pyx_t_2) < 0))) __PYX_ERR(0, 504, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":505
 *             dividend_df = self.dataproc.loadTableContentByCode(dividend_table, stock_code)
 *             dividend_df['ex_date'] = pd.to_datetime(dividend_df['ex_date']).dt.date
 *             i = 1             # <<<<<<<<<<<<<<
 *             for value in reversed(dividend_df['ex_date'].to_list()):
 *                 # NaT is meaning Not a Time
 */
      __Pyx_INCREF(__pyx_int_1);
      __pyx_v_i = __pyx_int_1;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":506
 *             dividend_df['ex_date'] = pd.to_datetime(dividend_df['ex_date']).dt.date
 *             i = 1
 *             for value in reversed(dividend_df['ex_date'].to_list()):             # <<<<<<<<<<<<<<
 *                 # NaT is meaning Not a Time
 *                 # print("value is {0}, type is {1}".format(value, type(value)))
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dividend_df, __pyx_n_s_ex_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 506, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
        __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
        __pyx_t_9 = 0;
        __pyx_t_10 = NULL;
      } else {
        __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 506, __pyx_L3_error)
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      for (;;) {
        if (likely(!__pyx_t_10)) {
          if (likely(PyList_CheckExact(__pyx_t_2))) {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 506, __pyx_L3_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 506, __pyx_L3_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          } else {
            {
              Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
              #if !CYTHON_ASSUME_SAFE_MACROS
              if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 506, __pyx_L3_error)
              #endif
              if (__pyx_t_9 >= __pyx_temp) break;
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 506, __pyx_L3_error)
            #else
            __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_1);
            #endif
          }
        } else {
          __pyx_t_1 = __pyx_t_10(__pyx_t_2);
          if (unlikely(!__pyx_t_1)) {
            PyObject* exc_type = PyErr_Occurred();
            if (exc_type) {
              if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
              else __PYX_ERR(0, 506, __pyx_L3_error)
            }
            break;
          }
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":509
 *                 # NaT is meaning Not a Time
 *                 # print("value is {0}, type is {1}".format(value, type(value)))
 *                 if pd.isna(value):             # <<<<<<<<<<<<<<
 *                     continue
 *                 row_index1 = dividend_df.index[dividend_df['ex_date'] == value].values[0]
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 509, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isna); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 509, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_value};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 509, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_11) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":510
 *                 # print("value is {0}, type is {1}".format(value, type(value)))
 *                 if pd.isna(value):
 *                     continue             # <<<<<<<<<<<<<<
 *                 row_index1 = dividend_df.index[dividend_df['ex_date'] == value].values[0]
 * 
 */
          goto __pyx_L9_continue;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":509
 *                 # NaT is meaning Not a Time
 *                 # print("value is {0}, type is {1}".format(value, type(value)))
 *                 if pd.isna(value):             # <<<<<<<<<<<<<<
 *                     continue
 *                 row_index1 = dividend_df.index[dividend_df['ex_date'] == value].values[0]
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":511
 *                 if pd.isna(value):
 *                     continue
 *                 row_index1 = dividend_df.index[dividend_df['ex_date'] == value].values[0]             # <<<<<<<<<<<<<<
 * 
 *                 cash_dividends = dividend_df.loc[row_index1, 'cash_dividend_ps']
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dividend_df, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_dividend_df, __pyx_n_s_ex_date); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_v_value, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 511, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_index1, __pyx_t_8);
        __pyx_t_8 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":513
 *                 row_index1 = dividend_df.index[dividend_df['ex_date'] == value].values[0]
 * 
 *                 cash_dividends = dividend_df.loc[row_index1, 'cash_dividend_ps']             # <<<<<<<<<<<<<<
 *                 if pd.isna(cash_dividends):
 *                     cash_dividends = 0
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_dividend_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 513, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 513, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index1);
        __Pyx_GIVEREF(__pyx_v_row_index1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index1)) __PYX_ERR(0, 513, __pyx_L3_error);
        __Pyx_INCREF(__pyx_n_s_cash_dividend_ps);
        __Pyx_GIVEREF(__pyx_n_s_cash_dividend_ps);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_cash_dividend_ps)) __PYX_ERR(0, 513, __pyx_L3_error);
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_cash_dividends, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":514
 * 
 *                 cash_dividends = dividend_df.loc[row_index1, 'cash_dividend_ps']
 *                 if pd.isna(cash_dividends):             # <<<<<<<<<<<<<<
 *                     cash_dividends = 0
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 514, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isna); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 514, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_cash_dividends};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 514, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_11) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":515
 *                 cash_dividends = dividend_df.loc[row_index1, 'cash_dividend_ps']
 *                 if pd.isna(cash_dividends):
 *                     cash_dividends = 0             # <<<<<<<<<<<<<<
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 *                 if pd.isna(stock_dividends):
 */
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_DECREF_SET(__pyx_v_cash_dividends, __pyx_int_0);

          /* "tbstock/dataAcquisition/saveDataToMysql.py":514
 * 
 *                 cash_dividends = dividend_df.loc[row_index1, 'cash_dividend_ps']
 *                 if pd.isna(cash_dividends):             # <<<<<<<<<<<<<<
 *                     cash_dividends = 0
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":516
 *                 if pd.isna(cash_dividends):
 *                     cash_dividends = 0
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']             # <<<<<<<<<<<<<<
 *                 if pd.isna(stock_dividends):
 *                     stock_dividends = 0
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dividend_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 516, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_row_index1);
        __Pyx_GIVEREF(__pyx_v_row_index1);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_row_index1)) __PYX_ERR(0, 516, __pyx_L3_error);
        __Pyx_INCREF(__pyx_n_s_stock_dividend_ps);
        __Pyx_GIVEREF(__pyx_n_s_stock_dividend_ps);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_stock_dividend_ps)) __PYX_ERR(0, 516, __pyx_L3_error);
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 516, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_stock_dividends, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":517
 *                     cash_dividends = 0
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 *                 if pd.isna(stock_dividends):             # <<<<<<<<<<<<<<
 *                     stock_dividends = 0
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isna); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_8)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_8);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_v_stock_dividends};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 517, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_11 < 0))) __PYX_ERR(0, 517, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_11) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":518
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 *                 if pd.isna(stock_dividends):
 *                     stock_dividends = 0             # <<<<<<<<<<<<<<
 * 
 *                 row_index2 = stock_trade_day_df.index[stock_trade_day_df[''] >= value].values[0]
 */
          __Pyx_INCREF(__pyx_int_0);
          __Pyx_DECREF_SET(__pyx_v_stock_dividends, __pyx_int_0);

          /* "tbstock/dataAcquisition/saveDataToMysql.py":517
 *                     cash_dividends = 0
 *                 stock_dividends = dividend_df.loc[row_index1, 'stock_dividend_ps']
 *                 if pd.isna(stock_dividends):             # <<<<<<<<<<<<<<
 *                     stock_dividends = 0
 * 
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":520
 *                     stock_dividends = 0
 * 
 *                 row_index2 = stock_trade_day_df.index[stock_trade_day_df[''] >= value].values[0]             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_trade_day_df, __pyx_kp_s__35); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_value, Py_GE); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_values); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_index2, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":523
 * 
 *                 #
 *                 restoration_price_qfq = (stock_trade_day_df.loc[row_index2, ''] - cash_dividends) / (stock_dividends + 1.0)             # <<<<<<<<<<<<<<
 *                 restoration_price_hfq = stock_trade_day_df.loc[row_index2, ''] * (stock_dividends + 1.0) + cash_dividends
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_row_index2)) __PYX_ERR(0, 523, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__32);
        __Pyx_GIVEREF(__pyx_kp_s__32);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_kp_s__32)) __PYX_ERR(0, 523, __pyx_L3_error);
        __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyNumber_Subtract(__pyx_t_3, __pyx_v_cash_dividends); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyFloat_AddObjC(__pyx_v_stock_dividends, __pyx_float_1_0, 1.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_restoration_price_qfq, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":524
 *                 #
 *                 restoration_price_qfq = (stock_trade_day_df.loc[row_index2, ''] - cash_dividends) / (stock_dividends + 1.0)
 *                 restoration_price_hfq = stock_trade_day_df.loc[row_index2, ''] * (stock_dividends + 1.0) + cash_dividends             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index2)) __PYX_ERR(0, 524, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__31);
        __Pyx_GIVEREF(__pyx_kp_s__31);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s__31)) __PYX_ERR(0, 524, __pyx_L3_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyFloat_AddObjC(__pyx_v_stock_dividends, __pyx_float_1_0, 1.0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyNumber_Multiply(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_cash_dividends); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_restoration_price_hfq, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":527
 * 
 *                 #
 *                 temp.loc[i, 'date'] = value             # <<<<<<<<<<<<<<
 *                 temp.loc[i, 'qfq_factor'] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq
 *                 temp.loc[i, 'hfq_factor'] = restoration_price_hfq / stock_trade_day_df.loc[row_index2, '']
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i)) __PYX_ERR(0, 527, __pyx_L3_error);
        __Pyx_INCREF(__pyx_n_s_date);
        __Pyx_GIVEREF(__pyx_n_s_date);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_date)) __PYX_ERR(0, 527, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_1, __pyx_v_value) < 0))) __PYX_ERR(0, 527, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":528
 *                 #
 *                 temp.loc[i, 'date'] = value
 *                 temp.loc[i, 'qfq_factor'] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq             # <<<<<<<<<<<<<<
 *                 temp.loc[i, 'hfq_factor'] = restoration_price_hfq / stock_trade_day_df.loc[row_index2, '']
 *                 i += 1
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index2)) __PYX_ERR(0, 528, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__32);
        __Pyx_GIVEREF(__pyx_kp_s__32);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s__32)) __PYX_ERR(0, 528, __pyx_L3_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_v_restoration_price_qfq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i)) __PYX_ERR(0, 528, __pyx_L3_error);
        __Pyx_INCREF(__pyx_n_s_qfq_factor);
        __Pyx_GIVEREF(__pyx_n_s_qfq_factor);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_qfq_factor)) __PYX_ERR(0, 528, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_1, __pyx_t_3) < 0))) __PYX_ERR(0, 528, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":529
 *                 temp.loc[i, 'date'] = value
 *                 temp.loc[i, 'qfq_factor'] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq
 *                 temp.loc[i, 'hfq_factor'] = restoration_price_hfq / stock_trade_day_df.loc[row_index2, '']             # <<<<<<<<<<<<<<
 *                 i += 1
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_row_index2)) __PYX_ERR(0, 529, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__31);
        __Pyx_GIVEREF(__pyx_kp_s__31);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__31)) __PYX_ERR(0, 529, __pyx_L3_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_restoration_price_hfq, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_i);
        __Pyx_GIVEREF(__pyx_v_i);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i)) __PYX_ERR(0, 529, __pyx_L3_error);
        __Pyx_INCREF(__pyx_n_s_hfq_factor);
        __Pyx_GIVEREF(__pyx_n_s_hfq_factor);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_hfq_factor)) __PYX_ERR(0, 529, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 529, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":530
 *                 temp.loc[i, 'qfq_factor'] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq
 *                 temp.loc[i, 'hfq_factor'] = restoration_price_hfq / stock_trade_day_df.loc[row_index2, '']
 *                 i += 1             # <<<<<<<<<<<<<<
 * 
 *                 #  pre_close,
 */
        __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":533
 * 
 *                 #  pre_close,
 *                 stock_trade_day_df.loc[row_index2, ''] = restoration_price_qfq             # <<<<<<<<<<<<<<
 *                 stock_trade_day_df.loc[row_index2, ''] = (stock_trade_day_df.loc[row_index2, ''] - restoration_price_qfq)
 *                 stock_trade_day_df.loc[row_index2, ''] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq * 100.0
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index2)) __PYX_ERR(0, 533, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__32);
        __Pyx_GIVEREF(__pyx_kp_s__32);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s__32)) __PYX_ERR(0, 533, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_3, __pyx_v_restoration_price_qfq) < 0))) __PYX_ERR(0, 533, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":534
 *                 #  pre_close,
 *                 stock_trade_day_df.loc[row_index2, ''] = restoration_price_qfq
 *                 stock_trade_day_df.loc[row_index2, ''] = (stock_trade_day_df.loc[row_index2, ''] - restoration_price_qfq)             # <<<<<<<<<<<<<<
 *                 stock_trade_day_df.loc[row_index2, ''] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq * 100.0
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_row_index2)) __PYX_ERR(0, 534, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__31);
        __Pyx_GIVEREF(__pyx_kp_s__31);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__31)) __PYX_ERR(0, 534, __pyx_L3_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyNumber_Subtract(__pyx_t_8, __pyx_v_restoration_price_qfq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index2)) __PYX_ERR(0, 534, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__36);
        __Pyx_GIVEREF(__pyx_kp_s__36);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s__36)) __PYX_ERR(0, 534, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_8, __pyx_t_3, __pyx_t_1) < 0))) __PYX_ERR(0, 534, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":535
 *                 stock_trade_day_df.loc[row_index2, ''] = restoration_price_qfq
 *                 stock_trade_day_df.loc[row_index2, ''] = (stock_trade_day_df.loc[row_index2, ''] - restoration_price_qfq)
 *                 stock_trade_day_df.loc[row_index2, ''] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq * 100.0             # <<<<<<<<<<<<<<
 * 
 *             temp = temp.sort_values(by='date', ascending=False, ignore_index=True)
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_row_index2)) __PYX_ERR(0, 535, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__36);
        __Pyx_GIVEREF(__pyx_kp_s__36);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_s__36)) __PYX_ERR(0, 535, __pyx_L3_error);
        __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_t_8, __pyx_v_restoration_price_qfq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_float_100_0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_trade_day_df, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_row_index2);
        __Pyx_GIVEREF(__pyx_v_row_index2);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_row_index2)) __PYX_ERR(0, 535, __pyx_L3_error);
        __Pyx_INCREF(__pyx_kp_s__33);
        __Pyx_GIVEREF(__pyx_kp_s__33);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__33)) __PYX_ERR(0, 535, __pyx_L3_error);
        if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_1, __pyx_t_8) < 0))) __PYX_ERR(0, 535, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":506
 *             dividend_df['ex_date'] = pd.to_datetime(dividend_df['ex_date']).dt.date
 *             i = 1
 *             for value in reversed(dividend_df['ex_date'].to_list()):             # <<<<<<<<<<<<<<
 *                 # NaT is meaning Not a Time
 *                 # print("value is {0}, type is {1}".format(value, type(value)))
 */
        __pyx_L9_continue:;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":537
 *                 stock_trade_day_df.loc[row_index2, ''] = stock_trade_day_df.loc[row_index2, ''] / restoration_price_qfq * 100.0
 * 
 *             temp = temp.sort_values(by='date', ascending=False, ignore_index=True)             # <<<<<<<<<<<<<<
 *             temp['qfq_factor'] = temp['qfq_factor'].cumprod()
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 537, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 537, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_by, __pyx_n_s_date) < 0) __PYX_ERR(0, 537, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 537, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_ignore_index, Py_True) < 0) __PYX_ERR(0, 537, __pyx_L3_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF_SET(__pyx_v_temp, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":538
 * 
 *             temp = temp.sort_values(by='date', ascending=False, ignore_index=True)
 *             temp['qfq_factor'] = temp['qfq_factor'].cumprod()             # <<<<<<<<<<<<<<
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)
 *             temp.loc[0, 'qfq_factor'] = 1.0
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_temp, __pyx_n_s_qfq_factor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 538, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_cumprod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      if (unlikely((PyObject_SetItem(__pyx_v_temp, __pyx_n_s_qfq_factor, __pyx_t_1) < 0))) __PYX_ERR(0, 538, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":539
 *             temp = temp.sort_values(by='date', ascending=False, ignore_index=True)
 *             temp['qfq_factor'] = temp['qfq_factor'].cumprod()
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)             # <<<<<<<<<<<<<<
 *             temp.loc[0, 'qfq_factor'] = 1.0
 *             temp['hfq_factor'] = temp['hfq_factor'].iloc[::-1].cumprod().iloc[::-1]
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_temp, __pyx_n_s_qfq_factor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 539, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_shift); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_int_1};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      if (unlikely((PyObject_SetItem(__pyx_v_temp, __pyx_n_s_qfq_factor, __pyx_t_1) < 0))) __PYX_ERR(0, 539, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":540
 *             temp['qfq_factor'] = temp['qfq_factor'].cumprod()
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)
 *             temp.loc[0, 'qfq_factor'] = 1.0             # <<<<<<<<<<<<<<
 *             temp['hfq_factor'] = temp['hfq_factor'].iloc[::-1].cumprod().iloc[::-1]
 * 
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_tuple__27, __pyx_float_1_0) < 0))) __PYX_ERR(0, 540, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":541
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)
 *             temp.loc[0, 'qfq_factor'] = 1.0
 *             temp['hfq_factor'] = temp['hfq_factor'].iloc[::-1].cumprod().iloc[::-1]             # <<<<<<<<<<<<<<
 * 
 *             # ipo
 */
      __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_temp, __pyx_n_s_hfq_factor); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_slice__37); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_cumprod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iloc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_slice__37); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely((PyObject_SetItem(__pyx_v_temp, __pyx_n_s_hfq_factor, __pyx_t_1) < 0))) __PYX_ERR(0, 541, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":544
 * 
 *             # ipo
 *             temp.loc[len(temp)] = temp.iloc[-1]             # <<<<<<<<<<<<<<
 *             temp.loc[len(temp) - 2, 'date'] = datetime.strptime(ipo_time, '%Y%m%d').date()
 *             temp.insert(0, 'code', stock_code)
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_iloc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyObject_Length(__pyx_v_temp); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 544, __pyx_L3_error)
      if (unlikely((__Pyx_SetItemInt(__pyx_t_1, __pyx_t_9, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1) < 0))) __PYX_ERR(0, 544, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":545
 *             # ipo
 *             temp.loc[len(temp)] = temp.iloc[-1]
 *             temp.loc[len(temp) - 2, 'date'] = datetime.strptime(ipo_time, '%Y%m%d').date()             # <<<<<<<<<<<<<<
 *             temp.insert(0, 'code', stock_code)
 *             return True, temp
 */
      __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_datetime); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_strptime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_v_ipo_time, __pyx_kp_s_Y_m_d};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_Length(__pyx_v_temp); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 545, __pyx_L3_error)
      __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_9 - 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_GIVEREF(__pyx_t_1);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1)) __PYX_ERR(0, 545, __pyx_L3_error);
      __Pyx_INCREF(__pyx_n_s_date);
      __Pyx_GIVEREF(__pyx_n_s_date);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_n_s_date)) __PYX_ERR(0, 545, __pyx_L3_error);
      __pyx_t_1 = 0;
      if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_t_8, __pyx_t_2) < 0))) __PYX_ERR(0, 545, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":546
 *             temp.loc[len(temp)] = temp.iloc[-1]
 *             temp.loc[len(temp) - 2, 'date'] = datetime.strptime(ipo_time, '%Y%m%d').date()
 *             temp.insert(0, 'code', stock_code)             # <<<<<<<<<<<<<<
 *             return True, temp
 * 
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_temp, __pyx_n_s_insert); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 546, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_8))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_8, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_int_0, __pyx_n_s_code, __pyx_v_stock_code};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":547
 *             temp.loc[len(temp) - 2, 'date'] = datetime.strptime(ipo_time, '%Y%m%d').date()
 *             temp.insert(0, 'code', stock_code)
 *             return True, temp             # <<<<<<<<<<<<<<
 * 
 *         except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True)) __PYX_ERR(0, 547, __pyx_L3_error);
      __Pyx_INCREF(__pyx_v_temp);
      __Pyx_GIVEREF(__pyx_v_temp);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_temp)) __PYX_ERR(0, 547, __pyx_L3_error);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L7_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":491
 *         temp.loc[0, 'hfq_factor'] = 1.0
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 */
    }
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":549
 *             return True, temp
 * 
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"error: {e}")
 *             return False, temp
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.getFqFactorByDividend", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_8, &__pyx_t_3) < 0) __PYX_ERR(0, 549, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_8);
      __pyx_v_e = __pyx_t_8;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":550
 * 
 *         except Exception as e:
 *             utils.logger.error(f"error: {e}")             # <<<<<<<<<<<<<<
 *             return False, temp
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_utils); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 550, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 550, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 550, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 550, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyUnicode_Concat(__pyx_kp_u_error_2, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 550, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 550, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":551
 *         except Exception as e:
 *             utils.logger.error(f"error: {e}")
 *             return False, temp             # <<<<<<<<<<<<<<
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L20_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(Py_False);
        __Pyx_GIVEREF(Py_False);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_False)) __PYX_ERR(0, 551, __pyx_L20_error);
        __Pyx_INCREF(__pyx_v_temp);
        __Pyx_GIVEREF(__pyx_v_temp);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_temp)) __PYX_ERR(0, 551, __pyx_L20_error);
        __pyx_r = __pyx_t_1;
        __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        goto __pyx_L19_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":549
 *             return True, temp
 * 
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"error: {e}")
 *             return False, temp
 */
      /*finally:*/ {
        __pyx_L20_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
        __pyx_L19_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":491
 *         temp.loc[0, 'hfq_factor'] = 1.0
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":480
 *         self.dumpJsonToFile()
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):             # <<<<<<<<<<<<<<
 *         dividend_table = 'stock_dividend_info'
 *         temp = pd.DataFrame()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.getFqFactorByDividend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_dividend_table);
  __Pyx_XDECREF(__pyx_v_temp);
  __Pyx_XDECREF(__pyx_v_basic_info_df);
  __Pyx_XDECREF(__pyx_v_ipo_time);
  __Pyx_XDECREF(__pyx_v_stock_trade_day_df);
  __Pyx_XDECREF(__pyx_v_dividend_df);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_row_index1);
  __Pyx_XDECREF(__pyx_v_cash_dividends);
  __Pyx_XDECREF(__pyx_v_stock_dividends);
  __Pyx_XDECREF(__pyx_v_row_index2);
  __Pyx_XDECREF(__pyx_v_restoration_price_qfq);
  __Pyx_XDECREF(__pyx_v_restoration_price_hfq);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":553
 *             return False, temp
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_19updateStockFqFactorToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_19updateStockFqFactorToMysql = {"updateStockFqFactorToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_19updateStockFqFactorToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_19updateStockFqFactorToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockFqFactorToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_type,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 553, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockFqFactorToMysql") < 0)) __PYX_ERR(0, 553, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_type = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockFqFactorToMysql", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 553, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFqFactorToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_18updateStockFqFactorToMysql(__pyx_self, __pyx_v_self, __pyx_v_multi_type, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_18updateStockFqFactorToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_table_name = NULL;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_succeed = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr1__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockFqFactorToMysql", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":554
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'stock_fq_factor'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":555
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_fq_factor);
  __pyx_v_table_name = __pyx_n_s_stock_fq_factor;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":556
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":559
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":560
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 560, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":561
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 561, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":562
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 562, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 560, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":565
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 565, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":566
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 566, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":567
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 567, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":568
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":566
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":570
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 570, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":571
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 571, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":565
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":573
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":576
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 576, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":577
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 577, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":578
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":577
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":581
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 581, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":582
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_update_range = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":583
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #             # <<<<<<<<<<<<<<
 * 
 *         desc_name = fun_name + ': ' + multi_type
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 583, __pyx_L10_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 583, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 583, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 583, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 583, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 583, __pyx_L10_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr1__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 583, __pyx_L10_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_8genexpr1__pyx_v_x))) __PYX_ERR(0, 583, __pyx_L10_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L15_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x); __pyx_8genexpr1__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L15_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":585
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         desc_name = fun_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_multi_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":586
 * 
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 586, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":587
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 587, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_start_time = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":588
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #             # <<<<<<<<<<<<<<
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 588, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 588, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 588, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 588, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 588, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 588, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 588, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":589
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockFqFactor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 589, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 589, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 589, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L19_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L19_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 589, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L20_unpacking_done;
        __pyx_L19_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 589, __pyx_L1_error)
        __pyx_L20_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF_SET(__pyx_v_stock_code, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":590
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                 if not succeed:
 *                     no_fault = False
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":591
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:             # <<<<<<<<<<<<<<
 *                     no_fault = False
 *                 # save json to file
 */
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 591, __pyx_L1_error)
      __pyx_t_6 = (!__pyx_t_5);
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":592
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:
 *                     no_fault = False             # <<<<<<<<<<<<<<
 *                 # save json to file
 *                 current_time = time.time()
 */
        __pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":591
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:             # <<<<<<<<<<<<<<
 *                     no_fault = False
 *                 # save json to file
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":594
 *                     no_fault = False
 *                 # save json to file
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 594, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 594, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":595
 *                 # save json to file
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 595, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":596
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 596, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":597
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 597, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":598
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":595
 *                 # save json to file
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":588
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #             # <<<<<<<<<<<<<<
 *                 succeed, stock_code = self.updateSingleStockFqFactor(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":586
 * 
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":599
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 599, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":600
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 600, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 600, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 600, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":601
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_futures = ((PyObject*)__pyx_t_3);
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":602
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 602, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 602, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_v_start_time = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":603
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_3 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 603, __pyx_L28_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 603, __pyx_L28_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":604
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockFqFactor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_11 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_2, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":605
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 605, __pyx_L28_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":603
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":606
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_1);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(0, 606, __pyx_L28_error);
            __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 606, __pyx_L28_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 606, __pyx_L28_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 606, __pyx_L28_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 606, __pyx_L28_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 606, __pyx_L28_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 606, __pyx_L28_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 606, __pyx_L28_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 606, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_1);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 606, __pyx_L28_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":607
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()             # <<<<<<<<<<<<<<
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 607, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 607, __pyx_L28_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_3);
                #else
                __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 607, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 607, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 607, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
                index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L39_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L39_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_3);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 607, __pyx_L28_error)
                __pyx_t_12 = NULL;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                goto __pyx_L40_unpacking_done;
                __pyx_L39_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_12 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 607, __pyx_L28_error)
                __pyx_L40_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_9);
              __pyx_t_9 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":608
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     if not succeed:
 *                         no_fault = False
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":609
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 609, __pyx_L28_error)
              __pyx_t_5 = (!__pyx_t_6);
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":610
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                     # save json to file
 *                     current_time = time.time()
 */
                __pyx_v_no_fault = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":609
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":612
 *                         no_fault = False
 *                     # save json to file
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 612, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":613
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 613, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 613, __pyx_L28_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 613, __pyx_L28_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":614
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 614, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 614, __pyx_L28_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":615
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         elif multi_type == 'process':
 */
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 615, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_9))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_9, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":616
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":613
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":606
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":600
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L33_try_end;
          __pyx_L28_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFqFactorToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 600, __pyx_L30_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L30_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 600, __pyx_L30_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_5 < 0) __PYX_ERR(0, 600, __pyx_L30_except_error)
            __pyx_t_6 = (!__pyx_t_5);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_9);
              __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; 
              __PYX_ERR(0, 600, __pyx_L30_except_error)
            }
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L29_exception_handled;
          }
          __pyx_L30_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L29_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L33_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 600, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L27;
        }
        __pyx_L27:;
      }
      goto __pyx_L47;
      __pyx_L24_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L47:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":599
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":617
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 617, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":618
 *                         start_time = current_time
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 618, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 618, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 618, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L48_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":619
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 619, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_futures = ((PyObject*)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":620
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 620, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 620, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_v_start_time = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":621
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_9);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 621, __pyx_L52_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 621, __pyx_L52_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":622
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 622, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockFqFactor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_11 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_2, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":623
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 623, __pyx_L52_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":621
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":624
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 624, __pyx_L52_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 624, __pyx_L52_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 624, __pyx_L52_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 624, __pyx_L52_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L52_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 624, __pyx_L52_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 624, __pyx_L52_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 624, __pyx_L52_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_3);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 624, __pyx_L52_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":625
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()             # <<<<<<<<<<<<<<
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 625, __pyx_L52_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_9);
                #else
                __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 625, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
                index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L63_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_1);
                index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L63_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 625, __pyx_L52_error)
                __pyx_t_12 = NULL;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                goto __pyx_L64_unpacking_done;
                __pyx_L63_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_12 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 625, __pyx_L52_error)
                __pyx_L64_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_1);
              __pyx_t_1 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":626
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     if not succeed:
 *                         no_fault = False
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 626, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":627
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 627, __pyx_L52_error)
              __pyx_t_5 = (!__pyx_t_6);
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":628
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                     # save json to file
 *                     current_time = time.time()
 */
                __pyx_v_no_fault = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":627
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":630
 *                         no_fault = False
 *                     # save json to file
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 630, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 630, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":631
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 631, __pyx_L52_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 631, __pyx_L52_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":632
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 632, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_9);
                if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 632, __pyx_L52_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":633
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         if no_fault:
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 633, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":634
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":631
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":624
 *                     future = executor.submit(self.updateSingleStockFqFactor, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":618
 *                         start_time = current_time
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L57_try_end;
          __pyx_L52_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFqFactorToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 618, __pyx_L54_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L54_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 618, __pyx_L54_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_5 < 0) __PYX_ERR(0, 618, __pyx_L54_except_error)
            __pyx_t_6 = (!__pyx_t_5);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_9, __pyx_t_1);
              __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 618, __pyx_L54_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L53_exception_handled;
          }
          __pyx_L54_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L53_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          __pyx_L57_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 618, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L51;
        }
        __pyx_L51:;
      }
      goto __pyx_L71;
      __pyx_L48_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L71:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":617
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L16:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":635
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":636
 *                         start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 636, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":635
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":637
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 637, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":638
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 638, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":553
 *             return False, temp
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFqFactorToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_succeed);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr1__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":640
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_fq_factor'
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_21updateSingleStockFqFactor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_21updateSingleStockFqFactor = {"updateSingleStockFqFactor", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_21updateSingleStockFqFactor, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_21updateSingleStockFqFactor(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_simple_code = 0;
  PyObject *__pyx_v_dtype_mapping = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockFqFactor (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_simple_code,&__pyx_n_s_dtype_mapping,&__pyx_n_s_multi_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_simple_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockFqFactor", 0, 3, 4, 1); __PYX_ERR(0, 640, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_mapping)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockFqFactor", 0, 3, 4, 2); __PYX_ERR(0, 640, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 640, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockFqFactor") < 0)) __PYX_ERR(0, 640, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_simple_code = values[1];
    __pyx_v_dtype_mapping = values[2];
    __pyx_v_multi_type = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockFqFactor", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 640, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockFqFactor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_20updateSingleStockFqFactor(__pyx_self, __pyx_v_self, __pyx_v_stock_simple_code, __pyx_v_dtype_mapping, __pyx_v_multi_type);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_20updateSingleStockFqFactor(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_stock_simple_code, PyObject *__pyx_v_dtype_mapping, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_stock_full_code = NULL;
  PyObject *__pyx_v_local_engine = NULL;
  PyObject *__pyx_v_local_session = NULL;
  PyObject *__pyx_v_stock_zh_a_hist_sina_qfq = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_succeed = NULL;
  PyObject *__pyx_v_fq_factor_df = NULL;
  PyObject *__pyx_v_date_data_type = NULL;
  PyObject *__pyx_v_is_datetime = NULL;
  PyObject *__pyx_v_new_data_fist_date_str = NULL;
  PyObject *__pyx_v_max_date = NULL;
  PyObject *__pyx_v_table_max_date_str = NULL;
  PyObject *__pyx_v_stock_zh_a_hist_sina_hfq = NULL;
  PyObject *__pyx_v_stock_zh_a_hist_sina_fq_factor = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  char const *__pyx_t_26;
  PyObject *__pyx_t_27 = NULL;
  char const *__pyx_t_28;
  char const *__pyx_t_29;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockFqFactor", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":641
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):
 *         table_name = 'stock_fq_factor'             # <<<<<<<<<<<<<<
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_fq_factor);
  __pyx_v_table_name = __pyx_n_s_stock_fq_factor;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":642
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):
 *         table_name = 'stock_fq_factor'
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)             # <<<<<<<<<<<<<<
 * 
 *         # engin,session
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_stock_simple_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_full_code = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":645
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 645, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":646
 *         # engin,session
 *         if multi_type == 'process':
 *             local_engine, local_session = create_engine_session()             # <<<<<<<<<<<<<<
 *         else:
 *             local_engine, local_session = engine, session
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 646, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 646, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_6);
      index = 0; __pyx_t_3 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_2 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_2);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
      __pyx_t_7 = NULL;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L5_unpacking_done;
      __pyx_L4_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 646, __pyx_L1_error)
      __pyx_L5_unpacking_done:;
    }
    __pyx_v_local_engine = __pyx_t_3;
    __pyx_t_3 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":645
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":648
 *             local_engine, local_session = create_engine_session()
 *         else:
 *             local_engine, local_session = engine, session             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_engine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_session); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_local_engine = __pyx_t_1;
    __pyx_t_1 = 0;
    __pyx_v_local_session = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":651
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
  /*try:*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_10);
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":652
 *         #
 *         try:
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=self.today_date,
 *                                                            adjust="qfq-factor")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ak); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stock_zh_a_daily); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_symbol, __pyx_v_stock_full_code) < 0) __PYX_ERR(0, 652, __pyx_L9_error)
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start_date, __pyx_t_3) < 0) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":653
 *         try:
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,             # <<<<<<<<<<<<<<
 *                                                            adjust="qfq-factor")
 *         except Exception as e:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_today_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end_date, __pyx_t_3) < 0) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_adjust, __pyx_kp_s_qfq_factor_2) < 0) __PYX_ERR(0, 652, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":652
 *         #
 *         try:
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=self.today_date,
 *                                                            adjust="qfq-factor")
 */
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_stock_zh_a_hist_sina_qfq = __pyx_t_3;
        __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":651
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
      }
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L14_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":655
 *                                                            end_date=self.today_date,
 *                                                            adjust="qfq-factor")
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 */
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockFqFactor", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 655, __pyx_L11_except_error)
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_e = __pyx_t_2;
        /*try:*/ {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":656
 *                                                            adjust="qfq-factor")
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')             # <<<<<<<<<<<<<<
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 *             if not succeed:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_logger); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = PyTuple_New(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_13);
          __pyx_t_14 = 0;
          __pyx_t_15 = 127;
          __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai);
          __pyx_t_14 += 63;
          __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai);
          PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai);
          __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_simple_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_16);
          PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_16);
          __pyx_t_16 = 0;
          __Pyx_INCREF(__pyx_kp_u__21);
          __pyx_t_14 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__21);
          PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_kp_u__21);
          __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
          __Pyx_GIVEREF(__pyx_t_16);
          PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_16);
          __pyx_t_16 = 0;
          __Pyx_INCREF(__pyx_kp_u__22);
          __pyx_t_14 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__22);
          PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_kp_u__22);
          __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 656, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          __pyx_t_13 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_16};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":657
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #             # <<<<<<<<<<<<<<
 *             if not succeed:
 *                 return False, stock_simple_code
 */
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getFqFactorByDividend); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_16 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_12))) {
            __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_12);
            if (likely(__pyx_t_16)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
              __Pyx_INCREF(__pyx_t_16);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_12, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_v_stock_simple_code};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          }
          if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
            PyObject* sequence = __pyx_t_6;
            Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
            if (unlikely(size != 2)) {
              if (size > 2) __Pyx_RaiseTooManyValuesError(2);
              else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
              __PYX_ERR(0, 657, __pyx_L20_error)
            }
            #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
            if (likely(PyTuple_CheckExact(sequence))) {
              __pyx_t_12 = PyTuple_GET_ITEM(sequence, 0); 
              __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1); 
            } else {
              __pyx_t_12 = PyList_GET_ITEM(sequence, 0); 
              __pyx_t_16 = PyList_GET_ITEM(sequence, 1); 
            }
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_16);
            #else
            __pyx_t_12 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 657, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_16 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 657, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_16);
            #endif
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          } else {
            Py_ssize_t index = -1;
            __pyx_t_13 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 657, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_7 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13);
            index = 0; __pyx_t_12 = __pyx_t_7(__pyx_t_13); if (unlikely(!__pyx_t_12)) goto __pyx_L22_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_12);
            index = 1; __pyx_t_16 = __pyx_t_7(__pyx_t_13); if (unlikely(!__pyx_t_16)) goto __pyx_L22_unpacking_failed;
            __Pyx_GOTREF(__pyx_t_16);
            if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_13), 2) < 0) __PYX_ERR(0, 657, __pyx_L20_error)
            __pyx_t_7 = NULL;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            goto __pyx_L23_unpacking_done;
            __pyx_L22_unpacking_failed:;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __pyx_t_7 = NULL;
            if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
            __PYX_ERR(0, 657, __pyx_L20_error)
            __pyx_L23_unpacking_done:;
          }
          __pyx_v_succeed = __pyx_t_12;
          __pyx_t_12 = 0;
          __pyx_v_fq_factor_df = __pyx_t_16;
          __pyx_t_16 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":658
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 *             if not succeed:             # <<<<<<<<<<<<<<
 *                 return False, stock_simple_code
 *             else:
 */
          __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 658, __pyx_L20_error)
          __pyx_t_17 = (!__pyx_t_5);
          if (__pyx_t_17) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":659
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 *             if not succeed:
 *                 return False, stock_simple_code             # <<<<<<<<<<<<<<
 *             else:
 *                 self.dataproc.clearTableContentByCode(table_name, stock_simple_code)
 */
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 659, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_INCREF(Py_False);
            __Pyx_GIVEREF(Py_False);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(0, 659, __pyx_L20_error);
            __Pyx_INCREF(__pyx_v_stock_simple_code);
            __Pyx_GIVEREF(__pyx_v_stock_simple_code);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_stock_simple_code)) __PYX_ERR(0, 659, __pyx_L20_error);
            __pyx_r = __pyx_t_6;
            __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L19_return;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":658
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 *             if not succeed:             # <<<<<<<<<<<<<<
 *                 return False, stock_simple_code
 *             else:
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":661
 *                 return False, stock_simple_code
 *             else:
 *                 self.dataproc.clearTableContentByCode(table_name, stock_simple_code)             # <<<<<<<<<<<<<<
 *                 fq_factor_df.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 utils.logger.info(f'Succeed to call getFqFactorByDividend and save to database for stock_code = {stock_simple_code}.')
 */
          /*else*/ {
            __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 661, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_clearTableContentByCode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 661, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_16 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_12))) {
              __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_12);
              if (likely(__pyx_t_16)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
                __Pyx_INCREF(__pyx_t_16);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_12, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[3] = {__pyx_t_16, __pyx_v_table_name, __pyx_v_stock_simple_code};
              __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
              if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 661, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_6);
              __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":662
 *             else:
 *                 self.dataproc.clearTableContentByCode(table_name, stock_simple_code)
 *                 fq_factor_df.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'Succeed to call getFqFactorByDividend and save to database for stock_code = {stock_simple_code}.')
 *                 return True, stock_simple_code
 */
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fq_factor_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 662, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 662, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_INCREF(__pyx_v_table_name);
            __Pyx_GIVEREF(__pyx_v_table_name);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_table_name)) __PYX_ERR(0, 662, __pyx_L20_error);
            __pyx_t_16 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 662, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_16);
            if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_con, __pyx_v_local_engine) < 0) __PYX_ERR(0, 662, __pyx_L20_error)
            if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 662, __pyx_L20_error)
            if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 662, __pyx_L20_error)
            if (PyDict_SetItem(__pyx_t_16, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 662, __pyx_L20_error)
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, __pyx_t_16); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 662, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":663
 *                 self.dataproc.clearTableContentByCode(table_name, stock_simple_code)
 *                 fq_factor_df.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 utils.logger.info(f'Succeed to call getFqFactorByDividend and save to database for stock_code = {stock_simple_code}.')             # <<<<<<<<<<<<<<
 *                 return True, stock_simple_code
 *         finally:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_utils); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_12);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_info); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_12);
            __pyx_t_14 = 0;
            __pyx_t_15 = 127;
            __Pyx_INCREF(__pyx_kp_u_Succeed_to_call_getFqFactorByDiv);
            __pyx_t_14 += 76;
            __Pyx_GIVEREF(__pyx_kp_u_Succeed_to_call_getFqFactorByDiv);
            PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_Succeed_to_call_getFqFactorByDiv);
            __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_simple_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_15;
            __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
            __Pyx_GIVEREF(__pyx_t_6);
            PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_6);
            __pyx_t_6 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_14 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u__5);
            __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_12, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __pyx_t_12 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_16))) {
              __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_16);
              if (likely(__pyx_t_12)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
                __Pyx_INCREF(__pyx_t_12);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_16, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_6};
              __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 663, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_13);
              __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            }
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":664
 *                 fq_factor_df.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 utils.logger.info(f'Succeed to call getFqFactorByDividend and save to database for stock_code = {stock_simple_code}.')
 *                 return True, stock_simple_code             # <<<<<<<<<<<<<<
 *         finally:
 *             if multi_type == 'process':
 */
            __Pyx_XDECREF(__pyx_r);
            __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 664, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_INCREF(Py_True);
            __Pyx_GIVEREF(Py_True);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, Py_True)) __PYX_ERR(0, 664, __pyx_L20_error);
            __Pyx_INCREF(__pyx_v_stock_simple_code);
            __Pyx_GIVEREF(__pyx_v_stock_simple_code);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_stock_simple_code)) __PYX_ERR(0, 664, __pyx_L20_error);
            __pyx_r = __pyx_t_13;
            __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L19_return;
          }
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":655
 *                                                            end_date=self.today_date,
 *                                                            adjust="qfq-factor")
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily qfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             succeed, fq_factor_df = self.getFqFactorByDividend(stock_simple_code)  #
 */
        /*finally:*/ {
          __pyx_L20_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_24);
            __Pyx_XGOTREF(__pyx_t_25);
            __pyx_t_11 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_23);
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
            }
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
            __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
            __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
            goto __pyx_L11_except_error;
          }
          __pyx_L19_return: {
            __pyx_t_25 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            __pyx_r = __pyx_t_25;
            __pyx_t_25 = 0;
            goto __pyx_L12_except_return;
          }
        }
      }
      goto __pyx_L11_except_error;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":651
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
      __pyx_L11_except_error:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L7_error;
      __pyx_L12_except_return:;
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10);
      goto __pyx_L6_return;
      __pyx_L14_try_end:;
    }
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":666
 *                 return True, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
  /*finally:*/ {
    /*normal exit:*/{
      __pyx_t_17 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 666, __pyx_L1_error)
      if (__pyx_t_17) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":667
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":668
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":666
 *                 return True, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
      }
      goto __pyx_L8;
    }
    __pyx_L7_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8) < 0)) __Pyx_ErrFetch(&__pyx_t_10, &__pyx_t_9, &__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_23);
      __pyx_t_18 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
      {
        __pyx_t_17 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 666, __pyx_L31_error)
        if (__pyx_t_17) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":667
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L31_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":668
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L31_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_3 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L31_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":666
 *                 return True, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_25);
        __Pyx_XGIVEREF(__pyx_t_24);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_24, __pyx_t_23);
      }
      __Pyx_XGIVEREF(__pyx_t_10);
      __Pyx_XGIVEREF(__pyx_t_9);
      __Pyx_XGIVEREF(__pyx_t_8);
      __Pyx_ErrRestore(__pyx_t_10, __pyx_t_9, __pyx_t_8);
      __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_8 = 0; __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0;
      __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_26;
      goto __pyx_L1_error;
      __pyx_L31_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_25);
        __Pyx_XGIVEREF(__pyx_t_24);
        __Pyx_XGIVEREF(__pyx_t_23);
        __Pyx_ExceptionReset(__pyx_t_25, __pyx_t_24, __pyx_t_23);
      }
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L6_return: {
      __pyx_t_23 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_17 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 666, __pyx_L1_error)
      if (__pyx_t_17) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":667
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":668
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *         #
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":666
 *                 return True, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
      }
      __pyx_r = __pyx_t_23;
      __pyx_t_23 = 0;
      goto __pyx_L0;
    }
    __pyx_L8:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":671
 * 
 *         #
 *         date_data_type = stock_zh_a_hist_sina_qfq['date'].dtype             # <<<<<<<<<<<<<<
 *         is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *         if not is_datetime:
 */
  if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 671, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_dtype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_date_data_type = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":672
 *         #
 *         date_data_type = stock_zh_a_hist_sina_qfq['date'].dtype
 *         is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)             # <<<<<<<<<<<<<<
 *         if not is_datetime:
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_datetime64_any_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_date_data_type};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_is_datetime = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":673
 *         date_data_type = stock_zh_a_hist_sina_qfq['date'].dtype
 *         is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *         if not is_datetime:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)
 */
  __pyx_t_17 = __Pyx_PyObject_IsTrue(__pyx_v_is_datetime); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 673, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_17);
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":674
 *         is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *         if not is_datetime:
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)
 *         new_data_fist_date_str = stock_zh_a_hist_sina_qfq.loc[0, 'date'].strftime("%Y%m%d")  # date
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 674, __pyx_L1_error) }
    __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_13 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_13)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_13);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_3};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 674, __pyx_L1_error) }
    if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_date, __pyx_t_2) < 0))) __PYX_ERR(0, 674, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":673
 *         date_data_type = stock_zh_a_hist_sina_qfq['date'].dtype
 *         is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *         if not is_datetime:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":675
 *         if not is_datetime:
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)             # <<<<<<<<<<<<<<
 *         new_data_fist_date_str = stock_zh_a_hist_sina_qfq.loc[0, 'date'].strftime("%Y%m%d")  # date
 * 
 */
  if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 675, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 675, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 675, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__38, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":676
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)
 *         new_data_fist_date_str = stock_zh_a_hist_sina_qfq.loc[0, 'date'].strftime("%Y%m%d")  # date             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 676, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_tuple__26); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strftime); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_new_data_fist_date_str = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":679
 * 
 *         #
 *         max_date = local_session.query(func.max(stock_fq_factor.date)).filter(stock_fq_factor.code == stock_simple_code).scalar()             # <<<<<<<<<<<<<<
 *         if max_date:
 *             # print("max_date = {0}".format(max_date))
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_func); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_max); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_stock_fq_factor); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_27 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_date); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_27);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_27};
    __pyx_t_16 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
    if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_16);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_16};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_filter); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stock_fq_factor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_code); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyObject_RichCompare(__pyx_t_16, __pyx_v_stock_simple_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_16)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_16);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_scalar); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 679, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_v_max_date = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":680
 *         #
 *         max_date = local_session.query(func.max(stock_fq_factor.date)).filter(stock_fq_factor.code == stock_simple_code).scalar()
 *         if max_date:             # <<<<<<<<<<<<<<
 *             # print("max_date = {0}".format(max_date))
 *             table_max_date_str = max_date.strftime("%Y%m%d")
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_date); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 680, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":682
 *         if max_date:
 *             # print("max_date = {0}".format(max_date))
 *             table_max_date_str = max_date.strftime("%Y%m%d")             # <<<<<<<<<<<<<<
 *             if table_max_date_str >= new_data_fist_date_str:
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 */
    __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 682, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_13))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_13, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }
    __pyx_v_table_max_date_str = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":683
 *             # print("max_date = {0}".format(max_date))
 *             table_max_date_str = max_date.strftime("%Y%m%d")
 *             if table_max_date_str >= new_data_fist_date_str:             # <<<<<<<<<<<<<<
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 *                 if multi_type == 'process':
 */
    __pyx_t_3 = PyObject_RichCompare(__pyx_v_table_max_date_str, __pyx_v_new_data_fist_date_str, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 683, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":685
 *             if table_max_date_str >= new_data_fist_date_str:
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 *                 if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     local_session.remove()
 *                     local_engine.dispose()
 */
      __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 685, __pyx_L1_error)
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":686
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 *                 if multi_type == 'process':
 *                     local_session.remove()             # <<<<<<<<<<<<<<
 *                     local_engine.dispose()
 *                 return True, stock_simple_code
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 686, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_1 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":687
 *                 if multi_type == 'process':
 *                     local_session.remove()
 *                     local_engine.dispose()             # <<<<<<<<<<<<<<
 *                 return True, stock_simple_code
 *             else:
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 687, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_1 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":685
 *             if table_max_date_str >= new_data_fist_date_str:
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 *                 if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                     local_session.remove()
 *                     local_engine.dispose()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":688
 *                     local_session.remove()
 *                     local_engine.dispose()
 *                 return True, stock_simple_code             # <<<<<<<<<<<<<<
 *             else:
 *                 local_session.query(stock_fq_factor).filter(stock_fq_factor.code == stock_simple_code).delete(synchronize_session=False)
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(Py_True);
      __Pyx_GIVEREF(Py_True);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, Py_True)) __PYX_ERR(0, 688, __pyx_L1_error);
      __Pyx_INCREF(__pyx_v_stock_simple_code);
      __Pyx_GIVEREF(__pyx_v_stock_simple_code);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_stock_simple_code)) __PYX_ERR(0, 688, __pyx_L1_error);
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":683
 *             # print("max_date = {0}".format(max_date))
 *             table_max_date_str = max_date.strftime("%Y%m%d")
 *             if table_max_date_str >= new_data_fist_date_str:             # <<<<<<<<<<<<<<
 *                 # utils.logger.info(f'Fq factor of {stock_simple_code} dont need to update. ')
 *                 if multi_type == 'process':
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":690
 *                 return True, stock_simple_code
 *             else:
 *                 local_session.query(stock_fq_factor).filter(stock_fq_factor.code == stock_simple_code).delete(synchronize_session=False)             # <<<<<<<<<<<<<<
 *                 local_session.commit()
 *                 utils.logger.info(f'Fq factor of {stock_simple_code} need to update. ')
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_stock_fq_factor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_16 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_16)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_16);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_stock_fq_factor); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_code); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_v_stock_simple_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_13};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_delete); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_synchronize_session, Py_False) < 0) __PYX_ERR(0, 690, __pyx_L1_error)
      __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 690, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":691
 *             else:
 *                 local_session.query(stock_fq_factor).filter(stock_fq_factor.code == stock_simple_code).delete(synchronize_session=False)
 *                 local_session.commit()             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'Fq factor of {stock_simple_code} need to update. ')
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_commit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 691, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":692
 *                 local_session.query(stock_fq_factor).filter(stock_fq_factor.code == stock_simple_code).delete(synchronize_session=False)
 *                 local_session.commit()
 *                 utils.logger.info(f'Fq factor of {stock_simple_code} need to update. ')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_Fq_factor_of);
      __pyx_t_14 += 13;
      __Pyx_GIVEREF(__pyx_kp_u_Fq_factor_of);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Fq_factor_of);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_simple_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_need_to_update);
      __pyx_t_14 += 17;
      __Pyx_GIVEREF(__pyx_kp_u_need_to_update);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_need_to_update);
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
        __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 692, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":680
 *         #
 *         max_date = local_session.query(func.max(stock_fq_factor.date)).filter(stock_fq_factor.code == stock_simple_code).scalar()
 *         if max_date:             # <<<<<<<<<<<<<<
 *             # print("max_date = {0}".format(max_date))
 *             table_max_date_str = max_date.strftime("%Y%m%d")
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":695
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
  /*try:*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_25);
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":696
 *         #
 *         try:
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=self.today_date,
 *                                                            adjust="hfq-factor")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_ak); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_stock_zh_a_daily); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_symbol, __pyx_v_stock_full_code) < 0) __PYX_ERR(0, 696, __pyx_L41_error)
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_start_date, __pyx_t_2) < 0) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":697
 *         try:
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,             # <<<<<<<<<<<<<<
 *                                                            adjust="hfq-factor")
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_today_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 697, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_end_date, __pyx_t_2) < 0) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_adjust, __pyx_kp_s_hfq_factor_2) < 0) __PYX_ERR(0, 696, __pyx_L41_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":696
 *         #
 *         try:
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=self.today_date,
 *                                                            adjust="hfq-factor")
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_v_stock_zh_a_hist_sina_hfq = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":701
 * 
 *             #
 *             date_data_type = stock_zh_a_hist_sina_hfq['date'].dtype             # <<<<<<<<<<<<<<
 *             is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *             if not is_datetime:
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_hfq, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_dtype); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 701, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF_SET(__pyx_v_date_data_type, __pyx_t_13);
        __pyx_t_13 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":702
 *             #
 *             date_data_type = stock_zh_a_hist_sina_hfq['date'].dtype
 *             is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)             # <<<<<<<<<<<<<<
 *             if not is_datetime:
 *                 stock_zh_a_hist_sina_hfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_hfq['date'])
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_api); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 702, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_datetime64_any_dtype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_date_data_type};
          __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 702, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_is_datetime, __pyx_t_13);
        __pyx_t_13 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":703
 *             date_data_type = stock_zh_a_hist_sina_hfq['date'].dtype
 *             is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *             if not is_datetime:             # <<<<<<<<<<<<<<
 *                 stock_zh_a_hist_sina_hfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_hfq['date'])
 *             stock_zh_a_hist_sina_hfq.sort_values('date', inplace=True, ascending=False)  #
 */
        __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_is_datetime); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 703, __pyx_L41_error)
        __pyx_t_17 = (!__pyx_t_5);
        if (__pyx_t_17) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":704
 *             is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *             if not is_datetime:
 *                 stock_zh_a_hist_sina_hfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_hfq['date'])             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_hfq.sort_values('date', inplace=True, ascending=False)  #
 * 
 */
          __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 704, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_hfq, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 704, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (unlikely(PyMethod_Check(__pyx_t_2))) {
            __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
            if (likely(__pyx_t_1)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
              __Pyx_INCREF(__pyx_t_1);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_2, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_3};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 704, __pyx_L41_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          }
          if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_sina_hfq, __pyx_n_s_date, __pyx_t_13) < 0))) __PYX_ERR(0, 704, __pyx_L41_error)
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":703
 *             date_data_type = stock_zh_a_hist_sina_hfq['date'].dtype
 *             is_datetime = pd.api.types.is_datetime64_any_dtype(date_data_type)
 *             if not is_datetime:             # <<<<<<<<<<<<<<
 *                 stock_zh_a_hist_sina_hfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_hfq['date'])
 *             stock_zh_a_hist_sina_hfq.sort_values('date', inplace=True, ascending=False)  #
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":705
 *             if not is_datetime:
 *                 stock_zh_a_hist_sina_hfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_hfq['date'])
 *             stock_zh_a_hist_sina_hfq.sort_values('date', inplace=True, ascending=False)  #             # <<<<<<<<<<<<<<
 * 
 *             #
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_hfq, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 705, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 705, __pyx_L41_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 705, __pyx_L41_error)
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__38, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":708
 * 
 *             #
 *             stock_zh_a_hist_sina_fq_factor = pd.concat([stock_zh_a_hist_sina_qfq, stock_zh_a_hist_sina_hfq['hfq_factor']], axis=1)             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_fq_factor.insert(0, 'code', stock_simple_code)
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_concat); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_v_stock_zh_a_hist_sina_qfq)) { __Pyx_RaiseUnboundLocalError("stock_zh_a_hist_sina_qfq"); __PYX_ERR(0, 708, __pyx_L41_error) }
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_hfq, __pyx_n_s_hfq_factor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_13 = PyList_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_stock_zh_a_hist_sina_qfq);
        __Pyx_GIVEREF(__pyx_v_stock_zh_a_hist_sina_qfq);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_v_stock_zh_a_hist_sina_qfq)) __PYX_ERR(0, 708, __pyx_L41_error);
        __Pyx_GIVEREF(__pyx_t_3);
        if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 1, __pyx_t_3)) __PYX_ERR(0, 708, __pyx_L41_error);
        __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_13);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13)) __PYX_ERR(0, 708, __pyx_L41_error);
        __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_axis, __pyx_int_1) < 0) __PYX_ERR(0, 708, __pyx_L41_error)
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_v_stock_zh_a_hist_sina_fq_factor = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":709
 *             #
 *             stock_zh_a_hist_sina_fq_factor = pd.concat([stock_zh_a_hist_sina_qfq, stock_zh_a_hist_sina_hfq['hfq_factor']], axis=1)
 *             stock_zh_a_hist_sina_fq_factor.insert(0, 'code', stock_simple_code)             # <<<<<<<<<<<<<<
 * 
 *             #
 */
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_fq_factor, __pyx_n_s_insert); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 709, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_int_0, __pyx_n_s_code, __pyx_v_stock_simple_code};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":712
 * 
 *             #
 *             stock_zh_a_hist_sina_fq_factor.to_sql(table_name, con=local_engine, if_exists='append', index=False,             # <<<<<<<<<<<<<<
 *                                                   dtype=dtype_mapping)
 *             return True, stock_simple_code
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_fq_factor, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 712, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_v_table_name);
        __Pyx_GIVEREF(__pyx_v_table_name);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_table_name)) __PYX_ERR(0, 712, __pyx_L41_error);
        __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 712, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_con, __pyx_v_local_engine) < 0) __PYX_ERR(0, 712, __pyx_L41_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 712, __pyx_L41_error)
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 712, __pyx_L41_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":713
 *             #
 *             stock_zh_a_hist_sina_fq_factor.to_sql(table_name, con=local_engine, if_exists='append', index=False,
 *                                                   dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             return True, stock_simple_code
 *         except Exception as e:
 */
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 712, __pyx_L41_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":712
 * 
 *             #
 *             stock_zh_a_hist_sina_fq_factor.to_sql(table_name, con=local_engine, if_exists='append', index=False,             # <<<<<<<<<<<<<<
 *                                                   dtype=dtype_mapping)
 *             return True, stock_simple_code
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 712, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":714
 *             stock_zh_a_hist_sina_fq_factor.to_sql(table_name, con=local_engine, if_exists='append', index=False,
 *                                                   dtype=dtype_mapping)
 *             return True, stock_simple_code             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = {stock_simple_code}: {e} ')
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True)) __PYX_ERR(0, 714, __pyx_L41_error);
        __Pyx_INCREF(__pyx_v_stock_simple_code);
        __Pyx_GIVEREF(__pyx_v_stock_simple_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_stock_simple_code)) __PYX_ERR(0, 714, __pyx_L41_error);
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L45_try_return;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":695
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
      }
      __pyx_L41_error:;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":715
 *                                                   dtype=dtype_mapping)
 *             return True, stock_simple_code
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             return False, stock_simple_code
 */
      __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_11) {
        __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockFqFactor", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_13) < 0) __PYX_ERR(0, 715, __pyx_L43_except_error)
        __Pyx_XGOTREF(__pyx_t_2);
        __Pyx_XGOTREF(__pyx_t_3);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_INCREF(__pyx_t_3);
        __pyx_v_e = __pyx_t_3;
        /*try:*/ {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":716
 *             return True, stock_simple_code
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = {stock_simple_code}: {e} ')             # <<<<<<<<<<<<<<
 *             return False, stock_simple_code
 *         finally:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_utils); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_16);
          __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_12);
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_error); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_16);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_12);
          __pyx_t_14 = 0;
          __pyx_t_15 = 127;
          __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2);
          __pyx_t_14 += 63;
          __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2);
          PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2);
          __pyx_t_27 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_simple_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) : __pyx_t_15;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_27);
          __Pyx_GIVEREF(__pyx_t_27);
          PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_27);
          __pyx_t_27 = 0;
          __Pyx_INCREF(__pyx_kp_u__21);
          __pyx_t_14 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__21);
          PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u__21);
          __pyx_t_27 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_27);
          __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_27) : __pyx_t_15;
          __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_27);
          __Pyx_GIVEREF(__pyx_t_27);
          PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_27);
          __pyx_t_27 = 0;
          __Pyx_INCREF(__pyx_kp_u__22);
          __pyx_t_14 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__22);
          PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_u__22);
          __pyx_t_27 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 716, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          __pyx_t_12 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_16))) {
            __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_16);
            if (likely(__pyx_t_12)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
              __Pyx_INCREF(__pyx_t_12);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_16, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_27};
            __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_16, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L53_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":717
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             return False, stock_simple_code             # <<<<<<<<<<<<<<
 *         finally:
 *             if multi_type == 'process':
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L53_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_INCREF(Py_False);
          __Pyx_GIVEREF(Py_False);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, Py_False)) __PYX_ERR(0, 717, __pyx_L53_error);
          __Pyx_INCREF(__pyx_v_stock_simple_code);
          __Pyx_GIVEREF(__pyx_v_stock_simple_code);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_stock_simple_code)) __PYX_ERR(0, 717, __pyx_L53_error);
          __pyx_r = __pyx_t_1;
          __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L52_return;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":715
 *                                                   dtype=dtype_mapping)
 *             return True, stock_simple_code
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily hfq-factor for stock_code = {stock_simple_code}: {e} ')
 *             return False, stock_simple_code
 */
        /*finally:*/ {
          __pyx_L53_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
            __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10) < 0)) __Pyx_ErrFetch(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10);
            __Pyx_XGOTREF(__pyx_t_8);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_10);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __pyx_t_11 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_22);
              __Pyx_XGIVEREF(__pyx_t_21);
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
            }
            __Pyx_XGIVEREF(__pyx_t_8);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_XGIVEREF(__pyx_t_10);
            __Pyx_ErrRestore(__pyx_t_8, __pyx_t_9, __pyx_t_10);
            __pyx_t_8 = 0; __pyx_t_9 = 0; __pyx_t_10 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
            __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_28;
            goto __pyx_L43_except_error;
          }
          __pyx_L52_return: {
            __pyx_t_20 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            __pyx_r = __pyx_t_20;
            __pyx_t_20 = 0;
            goto __pyx_L44_except_return;
          }
        }
      }
      goto __pyx_L43_except_error;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":695
 * 
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_hfq = ak.stock_zh_a_daily(symbol=stock_full_code, start_date=self.start_date,
 *                                                            end_date=self.today_date,
 */
      __pyx_L43_except_error:;
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
      goto __pyx_L39_error;
      __pyx_L45_try_return:;
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
      goto __pyx_L38_return;
      __pyx_L44_except_return:;
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
      goto __pyx_L38_return;
    }
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":719
 *             return False, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
  /*finally:*/ {
    __pyx_L39_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_25);
      __Pyx_XGOTREF(__pyx_t_24);
      __Pyx_XGOTREF(__pyx_t_23);
      __Pyx_XGOTREF(__pyx_t_20);
      __Pyx_XGOTREF(__pyx_t_21);
      __Pyx_XGOTREF(__pyx_t_22);
      __pyx_t_18 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_29 = __pyx_filename;
      {
        __pyx_t_17 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 719, __pyx_L60_error)
        if (__pyx_t_17) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":720
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L60_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 720, __pyx_L60_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":721
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):
 */
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L60_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_3))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_3, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 721, __pyx_L60_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          }
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":719
 *             return False, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      }
      __Pyx_XGIVEREF(__pyx_t_25);
      __Pyx_XGIVEREF(__pyx_t_24);
      __Pyx_XGIVEREF(__pyx_t_23);
      __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23);
      __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_29;
      goto __pyx_L1_error;
      __pyx_L60_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_XGIVEREF(__pyx_t_21);
        __Pyx_XGIVEREF(__pyx_t_22);
        __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_21, __pyx_t_22);
      }
      __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
      __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
      __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0;
      __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L38_return: {
      __pyx_t_22 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_17 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_17 < 0))) __PYX_ERR(0, 719, __pyx_L1_error)
      if (__pyx_t_17) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":720
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 720, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":721
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 721, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 721, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":719
 *             return False, stock_simple_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
      }
      __pyx_r = __pyx_t_22;
      __pyx_t_22 = 0;
      goto __pyx_L0;
    }
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":640
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_fq_factor'
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_27);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockFqFactor", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_stock_full_code);
  __Pyx_XDECREF(__pyx_v_local_engine);
  __Pyx_XDECREF(__pyx_v_local_session);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_sina_qfq);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_succeed);
  __Pyx_XDECREF(__pyx_v_fq_factor_df);
  __Pyx_XDECREF(__pyx_v_date_data_type);
  __Pyx_XDECREF(__pyx_v_is_datetime);
  __Pyx_XDECREF(__pyx_v_new_data_fist_date_str);
  __Pyx_XDECREF(__pyx_v_max_date);
  __Pyx_XDECREF(__pyx_v_table_max_date_str);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_sina_hfq);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_sina_fq_factor);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":723
 *                 local_engine.dispose()
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockDividendInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_22updateStockDividendInfoToMysql, "\n\n        :param multi_type:'single'->\345\215\225\347\272\277\347\250\213; 'thread'->\345\244\232\347\272\277\347\250\213; 'process'->\345\244\232\350\277\233\347\250\213\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockDividendInfoToMysql = {"updateStockDividendInfoToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockDividendInfoToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_22updateStockDividendInfoToMysql};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockDividendInfoToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_type = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockDividendInfoToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_type,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockDividendInfoToMysql") < 0)) __PYX_ERR(0, 723, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_type = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockDividendInfoToMysql", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 723, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockDividendInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_22updateStockDividendInfoToMysql(__pyx_self, __pyx_v_self, __pyx_v_multi_type, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_22updateStockDividendInfoToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_type, PyObject *__pyx_v_workers) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_table_name = NULL;
  int __pyx_v_no_fault;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_desc_name = NULL;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_succeed = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr2__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockDividendInfoToMysql", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":730
 *         :return:
 *         '''
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'stock_dividend_info'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 730, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":731
 *         '''
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_dividend_info'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_dividend_info);
  __pyx_v_table_name = __pyx_n_s_stock_dividend_info;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":732
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_dividend_info'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":735
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":736
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 736, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":737
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 737, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":738
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 738, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 736, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":742
 * 
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 742, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":743
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 743, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":744
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 744, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 744, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":745
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":743
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":747
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 747, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":748
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 748, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":742
 * 
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":750
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 750, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":753
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 753, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 753, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":754
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 754, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":755
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 755, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 755, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":754
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":758
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 758, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":759
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_update_range = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":760
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #             # <<<<<<<<<<<<<<
 * 
 *         desc_name = fun_name + ': ' + multi_type
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 760, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 760, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 760, __pyx_L10_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 760, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 760, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 760, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 760, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 760, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 760, __pyx_L10_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr2__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 760, __pyx_L10_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_8genexpr2__pyx_v_x))) __PYX_ERR(0, 760, __pyx_L10_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L15_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x); __pyx_8genexpr2__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L15_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":762
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         desc_name = fun_name + ': ' + multi_type             # <<<<<<<<<<<<<<
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 */
  __pyx_t_3 = PyNumber_Add(__pyx_v_fun_name, __pyx_kp_s__21); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_v_multi_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_desc_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":763
 * 
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_single, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 763, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":764
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 764, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_start_time = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":765
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #             # <<<<<<<<<<<<<<
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 765, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 765, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 765, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 765, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 765, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 765, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 765, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 765, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 765, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":766
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockDividendInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
        PyObject* sequence = __pyx_t_2;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 766, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 766, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
        index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L19_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L19_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 766, __pyx_L1_error)
        __pyx_t_12 = NULL;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L20_unpacking_done;
        __pyx_L19_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_12 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 766, __pyx_L1_error)
        __pyx_L20_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_DECREF_SET(__pyx_v_stock_code, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":767
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                 if not succeed:
 *                     no_fault = False
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 767, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 767, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":768
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:             # <<<<<<<<<<<<<<
 *                     no_fault = False
 *                 # save json to file
 */
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 768, __pyx_L1_error)
      __pyx_t_6 = (!__pyx_t_5);
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":769
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:
 *                     no_fault = False             # <<<<<<<<<<<<<<
 *                 # save json to file
 *                 current_time = time.time()
 */
        __pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":768
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 *                 if not succeed:             # <<<<<<<<<<<<<<
 *                     no_fault = False
 *                 # save json to file
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":771
 *                     no_fault = False
 *                 # save json to file
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 771, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":772
 *                 # save json to file
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 772, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":773
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 773, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":774
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 774, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 774, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":775
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":772
 *                 # save json to file
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":765
 *         if multi_type == 'single':  #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #             # <<<<<<<<<<<<<<
 *                 succeed, stock_code = self.updateSingleStockDividendInfo(stock_code, dtype_mapping, multi_type)
 *                 self.updateStrategyDict(succeed, stock_code, update_dict)
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":763
 * 
 *         desc_name = fun_name + ': ' + multi_type
 *         if multi_type == 'single':  #             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=desc_name):  #
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":776
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_thread, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 776, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":777
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 777, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_9, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L24_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 777, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_14, &__pyx_t_15, &__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_16);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":778
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_futures = ((PyObject*)__pyx_t_3);
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":779
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 779, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_v_start_time = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":780
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_3 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 780, __pyx_L28_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 780, __pyx_L28_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":781
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 781, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockDividendInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_11 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_2, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":782
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 782, __pyx_L28_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":780
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":783
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_1);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1)) __PYX_ERR(0, 783, __pyx_L28_error);
            __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 783, __pyx_L28_error)
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_mininterval, __pyx_float_0_01) < 0) __PYX_ERR(0, 783, __pyx_L28_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 783, __pyx_L28_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L28_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 783, __pyx_L28_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 783, __pyx_L28_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 783, __pyx_L28_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 783, __pyx_L28_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 783, __pyx_L28_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_1);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 783, __pyx_L28_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":784
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()             # <<<<<<<<<<<<<<
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 784, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 784, __pyx_L28_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_3 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_3);
                #else
                __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 784, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_3);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 784, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
                index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L39_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L39_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_3);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 784, __pyx_L28_error)
                __pyx_t_12 = NULL;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                goto __pyx_L40_unpacking_done;
                __pyx_L39_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_12 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 784, __pyx_L28_error)
                __pyx_L40_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_9);
              __pyx_t_9 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":785
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     if not succeed:
 *                         no_fault = False
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 785, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":786
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 786, __pyx_L28_error)
              __pyx_t_5 = (!__pyx_t_6);
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":787
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                     # save json to file
 *                     current_time = time.time()
 */
                __pyx_v_no_fault = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":786
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":789
 *                         no_fault = False
 *                     # save json to file
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 789, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 789, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":790
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 790, __pyx_L28_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 790, __pyx_L28_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 790, __pyx_L28_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":791
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 791, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 791, __pyx_L28_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":792
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         elif multi_type == 'process':
 */
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 792, __pyx_L28_error)
                __Pyx_GOTREF(__pyx_t_9);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_9))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_9, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 792, __pyx_L28_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":793
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":790
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":783
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":777
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          goto __pyx_L33_try_end;
          __pyx_L28_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockDividendInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 777, __pyx_L30_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L30_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 777, __pyx_L30_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_5 < 0) __PYX_ERR(0, 777, __pyx_L30_except_error)
            __pyx_t_6 = (!__pyx_t_5);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_9);
              __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; 
              __PYX_ERR(0, 777, __pyx_L30_except_error)
            }
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L29_exception_handled;
          }
          __pyx_L30_except_error:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          goto __pyx_L1_error;
          __pyx_L29_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_ExceptionReset(__pyx_t_14, __pyx_t_15, __pyx_t_16);
          __pyx_L33_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 777, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          }
          goto __pyx_L27;
        }
        __pyx_L27:;
      }
      goto __pyx_L47;
      __pyx_L24_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L47:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":776
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         elif multi_type == 'thread':  #             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":794
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 794, __pyx_L1_error)
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":795
 *                         start_time = current_time
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 795, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_13 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 795, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 795, __pyx_L48_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 795, __pyx_L48_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_16, &__pyx_t_15, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_16);
          __Pyx_XGOTREF(__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":796
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 796, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_futures = ((PyObject*)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":797
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 797, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 797, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_v_start_time = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":798
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            __pyx_t_9 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_9);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 798, __pyx_L52_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 798, __pyx_L52_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":799
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateSingleStockDividendInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_11 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_11)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_11);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_11, __pyx_t_2, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 799, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":800
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 800, __pyx_L52_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":798
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":801
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3)) __PYX_ERR(0, 801, __pyx_L52_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_desc_name) < 0) __PYX_ERR(0, 801, __pyx_L52_error)
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mininterval, __pyx_float_0_01) < 0) __PYX_ERR(0, 801, __pyx_L52_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 801, __pyx_L52_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L52_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 801, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 801, __pyx_L52_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 801, __pyx_L52_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 801, __pyx_L52_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 801, __pyx_L52_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 801, __pyx_L52_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_3);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 801, __pyx_L52_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":802
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()             # <<<<<<<<<<<<<<
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 802, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
                PyObject* sequence = __pyx_t_2;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 802, __pyx_L52_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_9);
                #else
                __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 802, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_11 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 802, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_11);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_11);
                index = 0; __pyx_t_1 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L63_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_1);
                index = 1; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L63_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 802, __pyx_L52_error)
                __pyx_t_12 = NULL;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                goto __pyx_L64_unpacking_done;
                __pyx_L63_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
                __pyx_t_12 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 802, __pyx_L52_error)
                __pyx_L64_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_succeed, __pyx_t_1);
              __pyx_t_1 = 0;
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":803
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     if not succeed:
 *                         no_fault = False
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStrategyDict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 803, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_v_succeed, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":804
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 804, __pyx_L52_error)
              __pyx_t_5 = (!__pyx_t_6);
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":805
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                     # save json to file
 *                     current_time = time.time()
 */
                __pyx_v_no_fault = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":804
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 *                     if not succeed:             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                     # save json to file
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":807
 *                         no_fault = False
 *                     # save json to file
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 807, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 807, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 807, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":808
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L52_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 808, __pyx_L52_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 808, __pyx_L52_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":809
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 809, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_9);
                if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 809, __pyx_L52_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":810
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         if no_fault:
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L52_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 810, __pyx_L52_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":811
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":808
 *                     # save json to file
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":801
 *                     future = executor.submit(self.updateSingleStockDividendInfo, stock_code, dtype_mapping, multi_type)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=desc_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     succeed, stock_code = future.result()
 *                     self.updateStrategyDict(succeed, stock_code, update_dict)
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":795
 *                         start_time = current_time
 *         elif multi_type == 'process':
 *             with ProcessPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L57_try_end;
          __pyx_L52_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockDividendInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 795, __pyx_L54_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 795, __pyx_L54_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 795, __pyx_L54_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_5 < 0) __PYX_ERR(0, 795, __pyx_L54_except_error)
            __pyx_t_6 = (!__pyx_t_5);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_9, __pyx_t_1);
              __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 795, __pyx_L54_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L53_exception_handled;
          }
          __pyx_L54_except_error:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L53_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_16);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_16, __pyx_t_15, __pyx_t_14);
          __pyx_L57_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_13) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 795, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L51;
        }
        __pyx_L51:;
      }
      goto __pyx_L71;
      __pyx_L48_error:;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L1_error;
      __pyx_L71:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":794
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         elif multi_type == 'process':             # <<<<<<<<<<<<<<
 *             with ProcessPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  }
  __pyx_L16:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":812
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":813
 *                         start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 813, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":812
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":814
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 814, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":815
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 815, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":723
 *                 local_engine.dispose()
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockDividendInfoToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_desc_name);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_succeed);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr2__pyx_v_x);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":817
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_dividend_info'
 *         #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_25updateSingleStockDividendInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_25updateSingleStockDividendInfo = {"updateSingleStockDividendInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_25updateSingleStockDividendInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_25updateSingleStockDividendInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_dtype_mapping = 0;
  PyObject *__pyx_v_multi_type = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockDividendInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_stock_code,&__pyx_n_s_dtype_mapping,&__pyx_n_s_multi_type,0};
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_single)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockDividendInfo", 0, 3, 4, 1); __PYX_ERR(0, 817, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_dtype_mapping)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockDividendInfo", 0, 3, 4, 2); __PYX_ERR(0, 817, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_type);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 817, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockDividendInfo") < 0)) __PYX_ERR(0, 817, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_stock_code = ((PyObject*)values[1]);
    __pyx_v_dtype_mapping = values[2];
    __pyx_v_multi_type = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockDividendInfo", 0, 3, 4, __pyx_nargs); __PYX_ERR(0, 817, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockDividendInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_code), (&PyString_Type), 0, "stock_code", 1))) __PYX_ERR(0, 817, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_24updateSingleStockDividendInfo(__pyx_self, __pyx_v_self, __pyx_v_stock_code, __pyx_v_dtype_mapping, __pyx_v_multi_type);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_24updateSingleStockDividendInfo(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_dtype_mapping, PyObject *__pyx_v_multi_type) {
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_fhsz_em = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_local_engine = NULL;
  PyObject *__pyx_v_local_session = NULL;
  PyObject *__pyx_v_max_date_em = NULL;
  PyObject *__pyx_v_max_date_row_table = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_is_null_ex_data_table = NULL;
  int __pyx_v_need_update;
  PyObject *__pyx_v_is_null_ex_data_em = NULL;
  PyObject *__pyx_v_match_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *(*__pyx_t_24)(PyObject *);
  int __pyx_t_25;
  int __pyx_t_26;
  char const *__pyx_t_27;
  char const *__pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockDividendInfo", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":818
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):
 *         table_name = 'stock_dividend_info'             # <<<<<<<<<<<<<<
 *         #
 *         try:
 */
  __Pyx_INCREF(__pyx_n_s_stock_dividend_info);
  __pyx_v_table_name = __pyx_n_s_stock_dividend_info;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":820
 *         table_name = 'stock_dividend_info'
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":821
 *         #
 *         try:
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)             # <<<<<<<<<<<<<<
 *             if fhsz_em.empty:
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sdc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stock_fhps_detail_em); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 821, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 821, __pyx_L3_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_fhsz_em = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":822
 *         try:
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                 return True, stock_code
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 822, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":823
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")             # <<<<<<<<<<<<<<
 *                 return True, stock_code
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = 0;
        __pyx_t_9 = 127;
        __Pyx_INCREF(__pyx_kp_u_sdc_stock_fhps_detail_em_return);
        __pyx_t_8 += 49;
        __Pyx_GIVEREF(__pyx_kp_u_sdc_stock_fhps_detail_em_return);
        PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_sdc_stock_fhps_detail_em_return);
        __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
        __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_INCREF(__pyx_kp_u_maybe_is_new_stock);
        __pyx_t_8 += 21;
        __Pyx_GIVEREF(__pyx_kp_u_maybe_is_new_stock);
        PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_maybe_is_new_stock);
        __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 823, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 823, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":824
 *             if fhsz_em.empty:
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                 return True, stock_code             # <<<<<<<<<<<<<<
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #
 *         except Exception as e:
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 824, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_True)) __PYX_ERR(0, 824, __pyx_L3_error);
        __Pyx_INCREF(__pyx_v_stock_code);
        __Pyx_GIVEREF(__pyx_v_stock_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_stock_code)) __PYX_ERR(0, 824, __pyx_L3_error);
        __pyx_r = __pyx_t_6;
        __pyx_t_6 = 0;
        goto __pyx_L7_try_return;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":822
 *         try:
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                 return True, stock_code
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":825
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                 return True, stock_code
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 825, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 825, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 825, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ascending, Py_False) < 0) __PYX_ERR(0, 825, __pyx_L3_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__40, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 825, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":820
 *         table_name = 'stock_dividend_info'
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":826
 *                 return True, stock_code
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *             return False, stock_code
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockDividendInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 826, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":827
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")             # <<<<<<<<<<<<<<
 *             return False, stock_code
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_utils); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_8 = 0;
        __pyx_t_9 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_stock_finance_mfd);
        __pyx_t_8 += 47;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_stock_finance_mfd);
        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_kp_u_Failed_to_call_stock_finance_mfd);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
        __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_8 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_kp_u__21);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
        __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_8 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_kp_u__22);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 827, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":828
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *             return False, stock_code             # <<<<<<<<<<<<<<
 * 
 *         # engin,session
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(Py_False);
        __Pyx_GIVEREF(Py_False);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, Py_False)) __PYX_ERR(0, 828, __pyx_L15_error);
        __Pyx_INCREF(__pyx_v_stock_code);
        __Pyx_GIVEREF(__pyx_v_stock_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_stock_code)) __PYX_ERR(0, 828, __pyx_L15_error);
        __pyx_r = __pyx_t_5;
        __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L14_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":826
 *                 return True, stock_code
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *             return False, stock_code
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":820
 *         table_name = 'stock_dividend_info'
 *         #
 *         try:             # <<<<<<<<<<<<<<
 *             fhsz_em = sdc.stock_fhps_detail_em(symbol=stock_code)
 *             if fhsz_em.empty:
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":831
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 831, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":832
 *         # engin,session
 *         if multi_type == 'process':
 *             local_engine, local_session = create_engine_session()             # <<<<<<<<<<<<<<
 *         else:
 *             local_engine = engine
 */
    __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_create_engine_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
      PyObject* sequence = __pyx_t_6;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 832, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_4 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_10 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_10);
      #else
      __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      #endif
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_5 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_24 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
      index = 0; __pyx_t_4 = __pyx_t_24(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L22_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_4);
      index = 1; __pyx_t_10 = __pyx_t_24(__pyx_t_5); if (unlikely(!__pyx_t_10)) goto __pyx_L22_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_10);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_5), 2) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
      __pyx_t_24 = NULL;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      goto __pyx_L23_unpacking_done;
      __pyx_L22_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_24 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 832, __pyx_L1_error)
      __pyx_L23_unpacking_done:;
    }
    __pyx_v_local_engine = __pyx_t_4;
    __pyx_t_4 = 0;
    __pyx_v_local_session = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":831
 * 
 *         # engin,session
 *         if multi_type == 'process':             # <<<<<<<<<<<<<<
 *             local_engine, local_session = create_engine_session()
 *         else:
 */
    goto __pyx_L21;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":834
 *             local_engine, local_session = create_engine_session()
 *         else:
 *             local_engine = engine             # <<<<<<<<<<<<<<
 *             local_session = session
 * 
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_engine); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_local_engine = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":835
 *         else:
 *             local_engine = engine
 *             local_session = session             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 835, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_local_session = __pyx_t_6;
    __pyx_t_6 = 0;
  }
  __pyx_L21:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":838
 * 
 *         #
 *         max_date_em = fhsz_em.loc[0, '']             # <<<<<<<<<<<<<<
 *         max_date_row_table = local_session.query(globals()[table_name]).filter(globals()[table_name].code == stock_code).order_by(
 *             globals()[table_name].report_date.desc()).first()
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__41); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_max_date_em = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":839
 *         #
 *         max_date_em = fhsz_em.loc[0, '']
 *         max_date_row_table = local_session.query(globals()[table_name]).filter(globals()[table_name].code == stock_code).order_by(             # <<<<<<<<<<<<<<
 *             globals()[table_name].report_date.desc()).first()
 * 
 */
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_15 = __Pyx_Globals(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_v_table_name); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_15)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_15);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_filter); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_table_name); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = PyObject_RichCompare(__pyx_t_5, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_14};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_order_by); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 839, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":840
 *         max_date_em = fhsz_em.loc[0, '']
 *         max_date_row_table = local_session.query(globals()[table_name]).filter(globals()[table_name].code == stock_code).order_by(
 *             globals()[table_name].report_date.desc()).first()             # <<<<<<<<<<<<<<
 * 
 *         if max_date_row_table:
 */
  __pyx_t_14 = __Pyx_Globals(); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_14, __pyx_v_table_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_report_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_desc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  __pyx_t_14 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_14)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_14);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_first); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 840, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 840, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_v_max_date_row_table = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":842
 *             globals()[table_name].report_date.desc()).first()
 * 
 *         if max_date_row_table:             # <<<<<<<<<<<<<<
 *             max_date_table = max_date_row_table.report_date
 *             is_null_ex_data_table = max_date_row_table.ex_date is None
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_row_table); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 842, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":843
 * 
 *         if max_date_row_table:
 *             max_date_table = max_date_row_table.report_date             # <<<<<<<<<<<<<<
 *             is_null_ex_data_table = max_date_row_table.ex_date is None
 *         else:
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row_table, __pyx_n_s_report_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_max_date_table = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":844
 *         if max_date_row_table:
 *             max_date_table = max_date_row_table.report_date
 *             is_null_ex_data_table = max_date_row_table.ex_date is None             # <<<<<<<<<<<<<<
 *         else:
 *             max_date_table = None
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row_table, __pyx_n_s_ex_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = (__pyx_t_10 == Py_None);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyBool_FromLong(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 844, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_v_is_null_ex_data_table = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":842
 *             globals()[table_name].report_date.desc()).first()
 * 
 *         if max_date_row_table:             # <<<<<<<<<<<<<<
 *             max_date_table = max_date_row_table.report_date
 *             is_null_ex_data_table = max_date_row_table.ex_date is None
 */
    goto __pyx_L24;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":846
 *             is_null_ex_data_table = max_date_row_table.ex_date is None
 *         else:
 *             max_date_table = None             # <<<<<<<<<<<<<<
 *             is_null_ex_data_table = None
 * 
 */
  /*else*/ {
    __Pyx_INCREF(Py_None);
    __pyx_v_max_date_table = Py_None;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":847
 *         else:
 *             max_date_table = None
 *             is_null_ex_data_table = None             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __Pyx_INCREF(Py_None);
    __pyx_v_is_null_ex_data_table = Py_None;
  }
  __pyx_L24:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":850
 * 
 *         #
 *         need_update = True             # <<<<<<<<<<<<<<
 *         if max_date_table is None:
 *             pass
 */
  __pyx_v_need_update = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":851
 *         #
 *         need_update = True
 *         if max_date_table is None:             # <<<<<<<<<<<<<<
 *             pass
 *         elif max_date_table == max_date_em:
 */
  __pyx_t_7 = (__pyx_v_max_date_table == Py_None);
  if (__pyx_t_7) {
    goto __pyx_L25;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":853
 *         if max_date_table is None:
 *             pass
 *         elif max_date_table == max_date_em:             # <<<<<<<<<<<<<<
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT
 *             if is_null_ex_data_em or not is_null_ex_data_table:
 */
  __pyx_t_10 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_v_max_date_em, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 853, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 853, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":854
 *             pass
 *         elif max_date_table == max_date_em:
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT             # <<<<<<<<<<<<<<
 *             if is_null_ex_data_em or not is_null_ex_data_table:
 *                 need_update = False
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_loc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_tuple__43); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_pd); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_NaT); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_7 = (__pyx_t_13 == __pyx_t_6);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 854, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_v_is_null_ex_data_em = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":855
 *         elif max_date_table == max_date_em:
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT
 *             if is_null_ex_data_em or not is_null_ex_data_table:             # <<<<<<<<<<<<<<
 *                 need_update = False
 *             else:
 */
    __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_v_is_null_ex_data_em); if (unlikely((__pyx_t_25 < 0))) __PYX_ERR(0, 855, __pyx_L1_error)
    if (!__pyx_t_25) {
    } else {
      __pyx_t_7 = __pyx_t_25;
      goto __pyx_L27_bool_binop_done;
    }
    __pyx_t_25 = __Pyx_PyObject_IsTrue(__pyx_v_is_null_ex_data_table); if (unlikely((__pyx_t_25 < 0))) __PYX_ERR(0, 855, __pyx_L1_error)
    __pyx_t_26 = (!__pyx_t_25);
    __pyx_t_7 = __pyx_t_26;
    __pyx_L27_bool_binop_done:;
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":856
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT
 *             if is_null_ex_data_em or not is_null_ex_data_table:
 *                 need_update = False             # <<<<<<<<<<<<<<
 *             else:
 *                 fhsz_em = fhsz_em.iloc[[0]]
 */
      __pyx_v_need_update = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":855
 *         elif max_date_table == max_date_em:
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT
 *             if is_null_ex_data_em or not is_null_ex_data_table:             # <<<<<<<<<<<<<<
 *                 need_update = False
 *             else:
 */
      goto __pyx_L26;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":858
 *                 need_update = False
 *             else:
 *                 fhsz_em = fhsz_em.iloc[[0]]             # <<<<<<<<<<<<<<
 *                 local_session.query(stock_dividend_info).filter(stock_dividend_info.code == stock_code,
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)
 */
    /*else*/ {
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_iloc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_13 = PyList_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_int_0);
      __Pyx_GIVEREF(__pyx_int_0);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_13, 0, __pyx_int_0)) __PYX_ERR(0, 858, __pyx_L1_error);
      __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_13); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 858, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_DECREF_SET(__pyx_v_fhsz_em, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":859
 *             else:
 *                 fhsz_em = fhsz_em.iloc[[0]]
 *                 local_session.query(stock_dividend_info).filter(stock_dividend_info.code == stock_code,             # <<<<<<<<<<<<<<
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)
 *                 local_session.commit()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_query); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stock_dividend_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_4};
        __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_stock_dividend_info); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_13 = PyObject_RichCompare(__pyx_t_4, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 859, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":860
 *                 fhsz_em = fhsz_em.iloc[[0]]
 *                 local_session.query(stock_dividend_info).filter(stock_dividend_info.code == stock_code,
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)             # <<<<<<<<<<<<<<
 *                 local_session.commit()
 *         elif max_date_table < max_date_em:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stock_dividend_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_report_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_v_max_date_table, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_t_13, __pyx_t_4};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 859, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_delete); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_synchronize_session, Py_False) < 0) __PYX_ERR(0, 860, __pyx_L1_error)
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 860, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":861
 *                 local_session.query(stock_dividend_info).filter(stock_dividend_info.code == stock_code,
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)
 *                 local_session.commit()             # <<<<<<<<<<<<<<
 *         elif max_date_table < max_date_em:
 *             match_index = fhsz_em.index[fhsz_em[''] == max_date_table].values[0]
 */
      __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_commit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 861, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_6 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_10))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_10, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    __pyx_L26:;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":853
 *         if max_date_table is None:
 *             pass
 *         elif max_date_table == max_date_em:             # <<<<<<<<<<<<<<
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT
 *             if is_null_ex_data_em or not is_null_ex_data_table:
 */
    goto __pyx_L25;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":862
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)
 *                 local_session.commit()
 *         elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *             match_index = fhsz_em.index[fhsz_em[''] == max_date_table].values[0]
 *             fhsz_em = fhsz_em.iloc[0:match_index]
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_v_max_date_em, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error)
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 862, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":863
 *                 local_session.commit()
 *         elif max_date_table < max_date_em:
 *             match_index = fhsz_em.index[fhsz_em[''] == max_date_table].values[0]             # <<<<<<<<<<<<<<
 *             fhsz_em = fhsz_em.iloc[0:match_index]
 *         else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_fhsz_em, __pyx_kp_s__39); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_10, __pyx_v_max_date_table, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 863, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_match_index = __pyx_t_10;
    __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":864
 *         elif max_date_table < max_date_em:
 *             match_index = fhsz_em.index[fhsz_em[''] == max_date_table].values[0]
 *             fhsz_em = fhsz_em.iloc[0:match_index]             # <<<<<<<<<<<<<<
 *         else:
 *             need_update = False
 */
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_iloc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_10, 0, 0, NULL, &__pyx_v_match_index, NULL, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 864, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF_SET(__pyx_v_fhsz_em, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":862
 *                                                                 stock_dividend_info.report_date == max_date_table).delete(synchronize_session=False)
 *                 local_session.commit()
 *         elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *             match_index = fhsz_em.index[fhsz_em[''] == max_date_table].values[0]
 *             fhsz_em = fhsz_em.iloc[0:match_index]
 */
    goto __pyx_L25;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":866
 *             fhsz_em = fhsz_em.iloc[0:match_index]
 *         else:
 *             need_update = False             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __pyx_v_need_update = 0;
  }
  __pyx_L25:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":868
 *             need_update = False
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if need_update:
 *                 fhsz_em['code'] = stock_code
 */
  /*try:*/ {
    {
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":869
 * 
 *         try:
 *             if need_update:             # <<<<<<<<<<<<<<
 *                 fhsz_em['code'] = stock_code
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 */
        if (__pyx_v_need_update) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":870
 *         try:
 *             if need_update:
 *                 fhsz_em['code'] = stock_code             # <<<<<<<<<<<<<<
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0
 */
          if (unlikely((PyObject_SetItem(__pyx_v_fhsz_em, __pyx_n_s_code, __pyx_v_stock_code) < 0))) __PYX_ERR(0, 870, __pyx_L32_error)

          /* "tbstock/dataAcquisition/saveDataToMysql.py":871
 *             if need_update:
 *                 fhsz_em['code'] = stock_code
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0             # <<<<<<<<<<<<<<
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em.rename(
 */
          __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_fhsz_em, __pyx_kp_s__44); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 871, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_10 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_6, __pyx_float_10_0, 10.0, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 871, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely((PyObject_SetItem(__pyx_v_fhsz_em, __pyx_n_s_cash_dividend_ps, __pyx_t_10) < 0))) __PYX_ERR(0, 871, __pyx_L32_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":872
 *                 fhsz_em['code'] = stock_code
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0             # <<<<<<<<<<<<<<
 *                 fhsz_em.rename(
 *                     columns={'': 'report_date', '': 'ex_date', '-': 'dividend_text',
 */
          __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_fhsz_em, __pyx_kp_s__45); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 872, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_6 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_10, __pyx_float_10_0, 10.0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely((PyObject_SetItem(__pyx_v_fhsz_em, __pyx_n_s_stock_dividend_ps, __pyx_t_6) < 0))) __PYX_ERR(0, 872, __pyx_L32_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":873
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em.rename(             # <<<<<<<<<<<<<<
 *                     columns={'': 'report_date', '': 'ex_date', '-': 'dividend_text',
 *                              '-': 'dividend_yield', '': 'eps', '': 'capital_reserve_ps',
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_rename); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 873, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);

          /* "tbstock/dataAcquisition/saveDataToMysql.py":874
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em.rename(
 *                     columns={'': 'report_date', '': 'ex_date', '-': 'dividend_text',             # <<<<<<<<<<<<<<
 *                              '-': 'dividend_yield', '': 'eps', '': 'capital_reserve_ps',
 *                              '': 'unassign_profit_ps'},
 */
          __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 874, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_4 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 874, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_4);
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__39, __pyx_n_s_report_date) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__42, __pyx_n_s_ex_date) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__46, __pyx_n_s_dividend_text) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__47, __pyx_n_s_dividend_yield) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__48, __pyx_n_s_eps) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__49, __pyx_n_s_capital_reserve_ps) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__50, __pyx_n_s_unassign_profit_ps) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_columns, __pyx_t_4) < 0) __PYX_ERR(0, 874, __pyx_L32_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":877
 *                              '-': 'dividend_yield', '': 'eps', '': 'capital_reserve_ps',
 *                              '': 'unassign_profit_ps'},
 *                     inplace=True)             # <<<<<<<<<<<<<<
 *                 fhsz_em = fhsz_em[dtype_mapping.keys()]
 *                 fhsz_em.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
          if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 874, __pyx_L32_error)

          /* "tbstock/dataAcquisition/saveDataToMysql.py":873
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em['stock_dividend_ps'] = fhsz_em['-'] / 10.0
 *                 fhsz_em.rename(             # <<<<<<<<<<<<<<
 *                     columns={'': 'report_date', '': 'ex_date', '-': 'dividend_text',
 *                              '-': 'dividend_yield', '': 'eps', '': 'capital_reserve_ps',
 */
          __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":878
 *                              '': 'unassign_profit_ps'},
 *                     inplace=True)
 *                 fhsz_em = fhsz_em[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 *                 fhsz_em.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 utils.logger.info(f"stock_dividend_info of {stock_code} has updated.")
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 878, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_6 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_10))) {
            __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
            if (likely(__pyx_t_6)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
              __Pyx_INCREF(__pyx_t_6);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_10, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L32_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          }
          __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_fhsz_em, __pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 878, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF_SET(__pyx_v_fhsz_em, __pyx_t_10);
          __pyx_t_10 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":879
 *                     inplace=True)
 *                 fhsz_em = fhsz_em[dtype_mapping.keys()]
 *                 fhsz_em.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f"stock_dividend_info of {stock_code} has updated.")
 *             # else:
 */
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_fhsz_em, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 879, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 879, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(__pyx_v_table_name);
          __Pyx_GIVEREF(__pyx_v_table_name);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_table_name)) __PYX_ERR(0, 879, __pyx_L32_error);
          __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 879, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_con, __pyx_v_local_engine) < 0) __PYX_ERR(0, 879, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 879, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 879, __pyx_L32_error)
          if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 879, __pyx_L32_error)
          __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 879, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_13);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":880
 *                 fhsz_em = fhsz_em[dtype_mapping.keys()]
 *                 fhsz_em.to_sql(table_name, con=local_engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 utils.logger.info(f"stock_dividend_info of {stock_code} has updated.")             # <<<<<<<<<<<<<<
 *             # else:
 *             #     utils.logger.info(f"stock_dividend_info of {stock_code} dont need to update.")
 */
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_info); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_8 = 0;
          __pyx_t_9 = 127;
          __Pyx_INCREF(__pyx_kp_u_stock_dividend_info_of);
          __pyx_t_8 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_stock_dividend_info_of);
          PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_kp_u_stock_dividend_info_of);
          __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
          __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_10);
          __pyx_t_10 = 0;
          __Pyx_INCREF(__pyx_kp_u_has_updated);
          __pyx_t_8 += 13;
          __Pyx_GIVEREF(__pyx_kp_u_has_updated);
          PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_kp_u_has_updated);
          __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_4, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 880, __pyx_L32_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_10};
            __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 880, __pyx_L32_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":869
 * 
 *         try:
 *             if need_update:             # <<<<<<<<<<<<<<
 *                 fhsz_em['code'] = stock_code
 *                 fhsz_em['cash_dividend_ps'] = fhsz_em['-'] / 10.0
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":883
 *             # else:
 *             #     utils.logger.info(f"stock_dividend_info of {stock_code} dont need to update.")
 *             return True, stock_code             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f"{stock_code} dividend data failed save in {table_name}, err is {e}.")
 */
        __Pyx_XDECREF(__pyx_r);
        __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 883, __pyx_L32_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_INCREF(Py_True);
        __Pyx_GIVEREF(Py_True);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 0, Py_True)) __PYX_ERR(0, 883, __pyx_L32_error);
        __Pyx_INCREF(__pyx_v_stock_code);
        __Pyx_GIVEREF(__pyx_v_stock_code);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_v_stock_code)) __PYX_ERR(0, 883, __pyx_L32_error);
        __pyx_r = __pyx_t_13;
        __pyx_t_13 = 0;
        goto __pyx_L36_try_return;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":868
 *             need_update = False
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if need_update:
 *                 fhsz_em['code'] = stock_code
 */
      }
      __pyx_L32_error:;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":884
 *             #     utils.logger.info(f"stock_dividend_info of {stock_code} dont need to update.")
 *             return True, stock_code
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code} dividend data failed save in {table_name}, err is {e}.")
 *             return False, stock_code
 */
      __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
      if (__pyx_t_16) {
        __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockDividendInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_6, &__pyx_t_10) < 0) __PYX_ERR(0, 884, __pyx_L34_except_error)
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_6);
        __Pyx_XGOTREF(__pyx_t_10);
        __Pyx_INCREF(__pyx_t_6);
        __pyx_v_e = __pyx_t_6;
        /*try:*/ {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":885
 *             return True, stock_code
 *         except Exception as e:
 *             utils.logger.error(f"{stock_code} dividend data failed save in {table_name}, err is {e}.")             # <<<<<<<<<<<<<<
 *             return False, stock_code
 *         finally:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = PyTuple_New(6); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_8 = 0;
          __pyx_t_9 = 127;
          __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
          __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_15);
          __pyx_t_15 = 0;
          __Pyx_INCREF(__pyx_kp_u_dividend_data_failed_save_in);
          __pyx_t_8 += 30;
          __Pyx_GIVEREF(__pyx_kp_u_dividend_data_failed_save_in);
          PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_kp_u_dividend_data_failed_save_in);
          __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
          __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_15);
          __pyx_t_15 = 0;
          __Pyx_INCREF(__pyx_kp_u_err_is);
          __pyx_t_8 += 9;
          __Pyx_GIVEREF(__pyx_kp_u_err_is);
          PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_kp_u_err_is);
          __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_15);
          __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
          __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
          __Pyx_GIVEREF(__pyx_t_15);
          PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_15);
          __pyx_t_15 = 0;
          __Pyx_INCREF(__pyx_kp_u__5);
          __pyx_t_8 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__5);
          PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_kp_u__5);
          __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 6, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 885, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_15);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          __pyx_t_14 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_5))) {
            __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
            if (likely(__pyx_t_14)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
              __Pyx_INCREF(__pyx_t_14);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_5, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
            __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
            if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 885, __pyx_L44_error)
            __Pyx_GOTREF(__pyx_t_4);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":886
 *         except Exception as e:
 *             utils.logger.error(f"{stock_code} dividend data failed save in {table_name}, err is {e}.")
 *             return False, stock_code             # <<<<<<<<<<<<<<
 *         finally:
 *             if multi_type == 'process':
 */
          __Pyx_XDECREF(__pyx_r);
          __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 886, __pyx_L44_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_INCREF(Py_False);
          __Pyx_GIVEREF(Py_False);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, Py_False)) __PYX_ERR(0, 886, __pyx_L44_error);
          __Pyx_INCREF(__pyx_v_stock_code);
          __Pyx_GIVEREF(__pyx_v_stock_code);
          if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_stock_code)) __PYX_ERR(0, 886, __pyx_L44_error);
          __pyx_r = __pyx_t_4;
          __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L43_return;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":884
 *             #     utils.logger.info(f"stock_dividend_info of {stock_code} dont need to update.")
 *             return True, stock_code
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"{stock_code} dividend data failed save in {table_name}, err is {e}.")
 *             return False, stock_code
 */
        /*finally:*/ {
          __pyx_L44_error:;
          /*exception exit:*/{
            __Pyx_PyThreadState_declare
            __Pyx_PyThreadState_assign
            __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
            __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
            __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
            if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_23);
            __Pyx_XGOTREF(__pyx_t_22);
            __Pyx_XGOTREF(__pyx_t_21);
            __Pyx_XGOTREF(__pyx_t_20);
            __Pyx_XGOTREF(__pyx_t_19);
            __Pyx_XGOTREF(__pyx_t_18);
            __pyx_t_16 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_27 = __pyx_filename;
            {
              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            }
            if (PY_MAJOR_VERSION >= 3) {
              __Pyx_XGIVEREF(__pyx_t_20);
              __Pyx_XGIVEREF(__pyx_t_19);
              __Pyx_XGIVEREF(__pyx_t_18);
              __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
            }
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
            __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
            __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_27;
            goto __pyx_L34_except_error;
          }
          __pyx_L43_return: {
            __pyx_t_18 = __pyx_r;
            __pyx_r = 0;
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
            __pyx_r = __pyx_t_18;
            __pyx_t_18 = 0;
            goto __pyx_L35_except_return;
          }
        }
      }
      goto __pyx_L34_except_error;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":868
 *             need_update = False
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if need_update:
 *                 fhsz_em['code'] = stock_code
 */
      __pyx_L34_except_error:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L30_error;
      __pyx_L36_try_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L29_return;
      __pyx_L35_except_return:;
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
      goto __pyx_L29_return;
    }
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":888
 *             return False, stock_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
  /*finally:*/ {
    __pyx_L30_error:;
    /*exception exit:*/{
      __Pyx_PyThreadState_declare
      __Pyx_PyThreadState_assign
      __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
      if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0)) __Pyx_ErrFetch(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_18);
      __Pyx_XGOTREF(__pyx_t_19);
      __Pyx_XGOTREF(__pyx_t_20);
      __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
      {
        __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 888, __pyx_L51_error)
        if (__pyx_t_7) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":889
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 889, __pyx_L51_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
            __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L51_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":890
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 */
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L51_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_13 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_13)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_13);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
            __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 890, __pyx_L51_error)
            __Pyx_GOTREF(__pyx_t_10);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":888
 *             return False, stock_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
        }
      }
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      }
      __Pyx_XGIVEREF(__pyx_t_1);
      __Pyx_XGIVEREF(__pyx_t_2);
      __Pyx_XGIVEREF(__pyx_t_3);
      __Pyx_ErrRestore(__pyx_t_1, __pyx_t_2, __pyx_t_3);
      __pyx_t_1 = 0; __pyx_t_2 = 0; __pyx_t_3 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
      __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_28;
      goto __pyx_L1_error;
      __pyx_L51_error:;
      if (PY_MAJOR_VERSION >= 3) {
        __Pyx_XGIVEREF(__pyx_t_18);
        __Pyx_XGIVEREF(__pyx_t_19);
        __Pyx_XGIVEREF(__pyx_t_20);
        __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
      }
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
      goto __pyx_L1_error;
    }
    __pyx_L29_return: {
      __pyx_t_20 = __pyx_r;
      __pyx_r = 0;
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_multi_type, __pyx_n_s_process, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 888, __pyx_L1_error)
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":889
 *         finally:
 *             if multi_type == 'process':
 *                 local_session.remove()             # <<<<<<<<<<<<<<
 *                 local_engine.dispose()
 * 
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_session, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 889, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":890
 *             if multi_type == 'process':
 *                 local_session.remove()
 *                 local_engine.dispose()             # <<<<<<<<<<<<<<
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_local_engine, __pyx_n_s_dispose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 890, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_13 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, NULL};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 890, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":888
 *             return False, stock_code
 *         finally:
 *             if multi_type == 'process':             # <<<<<<<<<<<<<<
 *                 local_session.remove()
 *                 local_engine.dispose()
 */
      }
      __pyx_r = __pyx_t_20;
      __pyx_t_20 = 0;
      goto __pyx_L0;
    }
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":817
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_dividend_info'
 *         #
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateSingleStockDividendInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_fhsz_em);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_local_engine);
  __Pyx_XDECREF(__pyx_v_local_session);
  __Pyx_XDECREF(__pyx_v_max_date_em);
  __Pyx_XDECREF(__pyx_v_max_date_row_table);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_is_null_ex_data_table);
  __Pyx_XDECREF(__pyx_v_is_null_ex_data_em);
  __Pyx_XDECREF(__pyx_v_match_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":892
 *                 local_engine.dispose()
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):             # <<<<<<<<<<<<<<
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStrategyDict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStrategyDict = {"updateStrategyDict", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStrategyDict, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStrategyDict(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  CYTHON_UNUSED PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_succeed = 0;
  PyObject *__pyx_v_stock_item = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStrategyDict (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_succeed,&__pyx_n_s_stock_item,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_succeed)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateStrategyDict", 1, 4, 4, 1); __PYX_ERR(0, 892, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_item)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateStrategyDict", 1, 4, 4, 2); __PYX_ERR(0, 892, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 892, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateStrategyDict", 1, 4, 4, 3); __PYX_ERR(0, 892, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStrategyDict") < 0)) __PYX_ERR(0, 892, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 4)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
      values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
    }
    __pyx_v_self = values[0];
    __pyx_v_succeed = values[1];
    __pyx_v_stock_item = values[2];
    __pyx_v_update_dict = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStrategyDict", 1, 4, 4, __pyx_nargs); __PYX_ERR(0, 892, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStrategyDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateStrategyDict(__pyx_self, __pyx_v_self, __pyx_v_succeed, __pyx_v_stock_item, __pyx_v_update_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateStrategyDict(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_succeed, PyObject *__pyx_v_stock_item, PyObject *__pyx_v_update_dict) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  unsigned int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStrategyDict", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":893
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 *         if succeed:             # <<<<<<<<<<<<<<
 *             if stock_item not in update_dict['update_list']:
 *                 update_dict['update_list'].append(stock_item)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_succeed); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 893, __pyx_L1_error)
  if (__pyx_t_1) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":894
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['update_list'].append(stock_item)
 *             if stock_item in update_dict['failed_list']:
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_item, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 894, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":895
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:
 *                 update_dict['update_list'].append(stock_item)             # <<<<<<<<<<<<<<
 *             if stock_item in update_dict['failed_list']:
 *                 update_dict['failed_list'].remove(stock_item)
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_stock_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 895, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":894
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['update_list'].append(stock_item)
 *             if stock_item in update_dict['failed_list']:
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":896
 *             if stock_item not in update_dict['update_list']:
 *                 update_dict['update_list'].append(stock_item)
 *             if stock_item in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].remove(stock_item)
 *         else:
 */
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_item, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 896, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":897
 *                 update_dict['update_list'].append(stock_item)
 *             if stock_item in update_dict['failed_list']:
 *                 update_dict['failed_list'].remove(stock_item)             # <<<<<<<<<<<<<<
 *         else:
 *             if stock_item not in update_dict['failed_list']:
 */
      __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 897, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = NULL;
      __pyx_t_6 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_6 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_stock_item};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
        __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":896
 *             if stock_item not in update_dict['update_list']:
 *                 update_dict['update_list'].append(stock_item)
 *             if stock_item in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].remove(stock_item)
 *         else:
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":893
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):
 *         if succeed:             # <<<<<<<<<<<<<<
 *             if stock_item not in update_dict['update_list']:
 *                 update_dict['update_list'].append(stock_item)
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":899
 *                 update_dict['failed_list'].remove(stock_item)
 *         else:
 *             if stock_item not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].append(stock_item)
 * 
 */
  /*else*/ {
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_item, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 899, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_1) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":900
 *         else:
 *             if stock_item not in update_dict['failed_list']:
 *                 update_dict['failed_list'].append(stock_item)             # <<<<<<<<<<<<<<
 * 
 *     def getSuspendedStocks(self) -> list:
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_stock_item); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 900, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":899
 *                 update_dict['failed_list'].remove(stock_item)
 *         else:
 *             if stock_item not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].append(stock_item)
 * 
 */
    }
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":892
 *                 local_engine.dispose()
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):             # <<<<<<<<<<<<<<
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStrategyDict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":902
 *                 update_dict['failed_list'].append(stock_item)
 * 
 *     def getSuspendedStocks(self) -> list:             # <<<<<<<<<<<<<<
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_29getSuspendedStocks(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_29getSuspendedStocks = {"getSuspendedStocks", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_29getSuspendedStocks, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_29getSuspendedStocks(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSuspendedStocks (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 902, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getSuspendedStocks") < 0)) __PYX_ERR(0, 902, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getSuspendedStocks", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 902, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.getSuspendedStocks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28getSuspendedStocks(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28getSuspendedStocks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_stock_tfp_em_df = NULL;
  PyObject *__pyx_v_suspended_stock_list = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getSuspendedStocks", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":903
 * 
 *     def getSuspendedStocks(self) -> list:
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)             # <<<<<<<<<<<<<<
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 *         return suspended_stock_list
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_tfp_em); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_date, __pyx_t_3) < 0) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_tfp_em_df = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":904
 *     def getSuspendedStocks(self) -> list:
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])             # <<<<<<<<<<<<<<
 *         return suspended_stock_list
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_tfp_em_df, __pyx_kp_s__51); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PySequence_ListKeepNew(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_suspended_stock_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":905
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 *         return suspended_stock_list             # <<<<<<<<<<<<<<
 * 
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_suspended_stock_list);
  __pyx_r = __pyx_v_suspended_stock_list;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":902
 *                 update_dict['failed_list'].append(stock_item)
 * 
 *     def getSuspendedStocks(self) -> list:             # <<<<<<<<<<<<<<
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.getSuspendedStocks", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_tfp_em_df);
  __Pyx_XDECREF(__pyx_v_suspended_stock_list);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":907
 *         return suspended_stock_list
 * 
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',             # <<<<<<<<<<<<<<
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_6__defaults__(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__defaults__", 1);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_simple_stock_code);
  __Pyx_GIVEREF(__Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_simple_stock_code);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self)->__pyx_arg_simple_stock_code)) __PYX_ERR(0, 907, __pyx_L1_error);
  __Pyx_INCREF(((PyObject*)__pyx_kp_s_20180101));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_s_20180101));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject*)__pyx_kp_s_20180101))) __PYX_ERR(0, 907, __pyx_L1_error);
  __Pyx_INCREF(((PyObject*)__pyx_kp_s_20241230));
  __Pyx_GIVEREF(((PyObject*)__pyx_kp_s_20241230));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, ((PyObject*)__pyx_kp_s_20241230))) __PYX_ERR(0, 907, __pyx_L1_error);
  __Pyx_INCREF(((PyObject *)__pyx_int_0));
  __Pyx_GIVEREF(((PyObject *)__pyx_int_0));
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, ((PyObject *)__pyx_int_0))) __PYX_ERR(0, 907, __pyx_L1_error);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 907, __pyx_L1_error);
  __Pyx_INCREF(Py_None);
  __Pyx_GIVEREF(Py_None);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None)) __PYX_ERR(0, 907, __pyx_L1_error);
  __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.__defaults__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_31saveHistTradeDayInfoSina(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_31saveHistTradeDayInfoSina = {"saveHistTradeDayInfoSina", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_31saveHistTradeDayInfoSina, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_31saveHistTradeDayInfoSina(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_simple_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_pre_close_first = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoSina (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_simple_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_pre_close_first,0};
    __pyx_defaults *__pyx_dynamic_args = __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_self);
    values[1] = __Pyx_Arg_NewRef_FASTCALL(__pyx_dynamic_args->__pyx_arg_simple_stock_code);
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20180101)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_s_20241230)));
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simple_stock_code);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pre_close_first);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 907, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "saveHistTradeDayInfoSina") < 0)) __PYX_ERR(0, 907, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_simple_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
    __pyx_v_pre_close_first = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoSina", 0, 1, 5, __pyx_nargs); __PYX_ERR(0, 907, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoSina", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_30saveHistTradeDayInfoSina(__pyx_self, __pyx_v_self, __pyx_v_simple_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_pre_close_first);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_30saveHistTradeDayInfoSina(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_pre_close_first) {
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_stock_zh_a_hist_sina_bfq = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_min_date_sina = NULL;
  PyObject *__pyx_v_min_date_sina_str = NULL;
  PyObject *__pyx_v_pre_close = NULL;
  PyObject *__pyx_v_res_fq = NULL;
  PyObject *__pyx_v_fq_factor_origin = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_fq_row_date = NULL;
  PyObject *__pyx_v_fq_row_date_str = NULL;
  PyObject *__pyx_v_row_qfq_factor = NULL;
  PyObject *__pyx_v_row_indice = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_split_dict = NULL;
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_year_stock_data = NULL;
  PyObject *__pyx_v_table_name_year = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *(*__pyx_t_24)(PyObject *);
  PyObject *(*__pyx_t_25)(PyObject *);
  Py_ssize_t __pyx_t_26;
  int __pyx_t_27;
  char const *__pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoSina", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":909
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):             # <<<<<<<<<<<<<<
 *             stock_code = utils.getFullStockCode(simple_stock_code)
 *         else:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_startWithDigit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_simple_stock_code};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 909, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":910
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):
 *             stock_code = utils.getFullStockCode(simple_stock_code)             # <<<<<<<<<<<<<<
 *         else:
 *             stock_code = simple_stock_code
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_simple_stock_code};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_stock_code = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":909
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):             # <<<<<<<<<<<<<<
 *             stock_code = utils.getFullStockCode(simple_stock_code)
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":912
 *             stock_code = utils.getFullStockCode(simple_stock_code)
 *         else:
 *             stock_code = simple_stock_code             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_v_simple_stock_code);
    __pyx_v_stock_code = __pyx_v_simple_stock_code;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":914
 *             stock_code = simple_stock_code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,
 *                                                            end_date=end_date,
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_8);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":915
 * 
 *         try:
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=end_date,
 *                                                            adjust="")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_zh_a_daily); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 915, __pyx_L4_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 915, __pyx_L4_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":916
 *         try:
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,
 *                                                            end_date=end_date,             # <<<<<<<<<<<<<<
 *                                                            adjust="")
 *             if stock_zh_a_hist_sina_bfq.empty:
 */
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_date, __pyx_v_end_date) < 0) __PYX_ERR(0, 915, __pyx_L4_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_adjust, __pyx_kp_s__30) < 0) __PYX_ERR(0, 915, __pyx_L4_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":915
 * 
 *         try:
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                            end_date=end_date,
 *                                                            adjust="")
 */
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 915, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_stock_zh_a_hist_sina_bfq = __pyx_t_3;
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":918
 *                                                            end_date=end_date,
 *                                                            adjust="")
 *             if stock_zh_a_hist_sina_bfq.empty:             # <<<<<<<<<<<<<<
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 918, __pyx_L4_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":919
 *                                                            adjust="")
 *             if stock_zh_a_hist_sina_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 919, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_v_simple_stock_code, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 919, __pyx_L4_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (__pyx_t_5) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":920
 *             if stock_zh_a_hist_sina_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")             # <<<<<<<<<<<<<<
 *                     return True
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_9 = 0;
          __pyx_t_10 = 127;
          __Pyx_INCREF(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          __pyx_t_9 += 61;
          __Pyx_GIVEREF(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
          __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
          __Pyx_GIVEREF(__pyx_t_11);
          PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_11);
          __pyx_t_11 = 0;
          __Pyx_INCREF(__pyx_kp_u_it_has_been_suspended);
          __pyx_t_9 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_it_has_been_suspended);
          PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_it_has_been_suspended);
          __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 920, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __pyx_t_2 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_2)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_2);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_11};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 920, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":921
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True             # <<<<<<<<<<<<<<
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_True);
          __pyx_r = Py_True;
          goto __pyx_L8_try_return;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":919
 *                                                            adjust="")
 *             if stock_zh_a_hist_sina_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":923
 *                     return True
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")             # <<<<<<<<<<<<<<
 *                     return False
 *             # TODO akshare
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 923, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 923, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 923, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_11);
          __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 923, __pyx_L4_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          __pyx_t_11 = NULL;
          __pyx_t_4 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_1))) {
            __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
            if (likely(__pyx_t_11)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
              __Pyx_INCREF(__pyx_t_11);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_1, function);
              __pyx_t_4 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_2};
            __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
            __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 923, __pyx_L4_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          }
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":924
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")
 *                     return False             # <<<<<<<<<<<<<<
 *             # TODO akshare
 *             stock_zh_a_hist_sina_bfq.sort_values('date', inplace=True, ascending=True)  #
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          goto __pyx_L8_try_return;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":918
 *                                                            end_date=end_date,
 *                                                            adjust="")
 *             if stock_zh_a_hist_sina_bfq.empty:             # <<<<<<<<<<<<<<
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":926
 *                     return False
 *             # TODO akshare
 *             stock_zh_a_hist_sina_bfq.sort_values('date', inplace=True, ascending=True)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily for stock_code = {simple_stock_code}: {e} ')
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 926, __pyx_L4_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_ascending, Py_True) < 0) __PYX_ERR(0, 926, __pyx_L4_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__38, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L4_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":914
 *             stock_code = simple_stock_code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,
 *                                                            end_date=end_date,
 */
    }
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":927
 *             # TODO akshare
 *             stock_zh_a_hist_sina_bfq.sort_values('date', inplace=True, ascending=True)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoSina", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 927, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":928
 *             stock_zh_a_hist_sina_bfq.sort_values('date', inplace=True, ascending=True)  #
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily for stock_code = {simple_stock_code}: {e} ')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_utils); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3);
        __pyx_t_9 += 52;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3);
        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_9 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_kp_u__21);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_kp_u__22);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 928, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 928, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":929
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily for stock_code = {simple_stock_code}: {e} ')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         min_date_sina = stock_zh_a_hist_sina_bfq.loc[0, 'date']
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L16_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":927
 *             # TODO akshare
 *             stock_zh_a_hist_sina_bfq.sort_values('date', inplace=True, ascending=True)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_daily for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
      /*finally:*/ {
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L6_except_error;
        }
        __pyx_L16_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":914
 *             stock_code = simple_stock_code
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_sina_bfq = ak.stock_zh_a_daily(symbol=stock_code, start_date=start_date,
 *                                                            end_date=end_date,
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L1_error;
    __pyx_L8_try_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":931
 *             return False
 * 
 *         min_date_sina = stock_zh_a_hist_sina_bfq.loc[0, 'date']             # <<<<<<<<<<<<<<
 *         min_date_sina_str = min_date_sina.strftime('%Y%m%d')
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_tuple__26); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 931, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_min_date_sina = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":932
 * 
 *         min_date_sina = stock_zh_a_hist_sina_bfq.loc[0, 'date']
 *         min_date_sina_str = min_date_sina.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *         # get pre_close
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_min_date_sina, __pyx_n_s_strftime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 932, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_min_date_sina_str = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":935
 * 
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_sina_bfq['close'].shift(1)             # <<<<<<<<<<<<<<
 *         if pre_close_first != 0:
 *             pre_close[0] = pre_close_first
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_1};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_pre_close = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":936
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_sina_bfq['close'].shift(1)
 *         if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *             pre_close[0] = pre_close_first
 * 
 */
  __pyx_t_5 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_pre_close_first, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 936, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":937
 *         pre_close = stock_zh_a_hist_sina_bfq['close'].shift(1)
 *         if pre_close_first != 0:
 *             pre_close[0] = pre_close_first             # <<<<<<<<<<<<<<
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 */
    if (unlikely((__Pyx_SetItemInt(__pyx_v_pre_close, 0, __pyx_v_pre_close_first, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 937, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":936
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_sina_bfq['close'].shift(1)
 *         if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *             pre_close[0] = pre_close_first
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":939
 *             pre_close[0] = pre_close_first
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe             # <<<<<<<<<<<<<<
 *         if res_fq == 0:
 *             return False
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockFqfactorInfo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_simple_stock_code);
  __Pyx_GIVEREF(__pyx_v_simple_stock_code);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_simple_stock_code)) __PYX_ERR(0, 939, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_mode, __pyx_n_s_origin_factor) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 939, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
    PyObject* sequence = __pyx_t_11;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 939, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 939, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_24 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_3 = __pyx_t_24(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L24_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_3);
    index = 1; __pyx_t_1 = __pyx_t_24(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L24_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_2), 2) < 0) __PYX_ERR(0, 939, __pyx_L1_error)
    __pyx_t_24 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L25_unpacking_done;
    __pyx_L24_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_24 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 939, __pyx_L1_error)
    __pyx_L25_unpacking_done:;
  }
  __pyx_v_res_fq = __pyx_t_3;
  __pyx_t_3 = 0;
  __pyx_v_fq_factor_origin = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":940
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:             # <<<<<<<<<<<<<<
 *             return False
 *         elif res_fq == 1:
 */
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_res_fq, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 940, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":941
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:
 *             return False             # <<<<<<<<<<<<<<
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":940
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:             # <<<<<<<<<<<<<<
 *             return False
 *         elif res_fq == 1:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":942
 *         if res_fq == 0:
 *             return False
 *         elif res_fq == 1:             # <<<<<<<<<<<<<<
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 */
  __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_res_fq, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 942, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":943
 *             return False
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():             # <<<<<<<<<<<<<<
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fq_factor_origin, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
      __pyx_t_1 = __pyx_t_11; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_9 = 0;
      __pyx_t_25 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 943, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 943, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    for (;;) {
      if (likely(!__pyx_t_25)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 943, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_11 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 943, __pyx_L1_error)
          #else
          __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 943, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 943, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_11); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 943, __pyx_L1_error)
          #else
          __pyx_t_11 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 943, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          #endif
        }
      } else {
        __pyx_t_11 = __pyx_t_25(__pyx_t_1);
        if (unlikely(!__pyx_t_11)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 943, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_11);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
        PyObject* sequence = __pyx_t_11;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 943, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_2 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        #else
        __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 943, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_24 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13);
        index = 0; __pyx_t_3 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_3)) goto __pyx_L29_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_3);
        index = 1; __pyx_t_2 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_2)) goto __pyx_L29_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_2);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_13), 2) < 0) __PYX_ERR(0, 943, __pyx_L1_error)
        __pyx_t_24 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L30_unpacking_done;
        __pyx_L29_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_24 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 943, __pyx_L1_error)
        __pyx_L30_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_3);
      __pyx_t_3 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":944
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']             # <<<<<<<<<<<<<<
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 */
      __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 944, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_v_fq_row_date, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":945
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_fq_row_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 945, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_kp_s_Y_m_d};
        __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 945, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_fq_row_date_str, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":946
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']             # <<<<<<<<<<<<<<
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 */
      __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_qfq_factor); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 946, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_XDECREF_SET(__pyx_v_row_qfq_factor, __pyx_t_11);
      __pyx_t_11 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":947
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 */
      __pyx_t_5 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_row_qfq_factor, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 947, __pyx_L1_error)
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":948
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")             # <<<<<<<<<<<<<<
 *                     return False
 *                 if fq_row_date_str < start_date:  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_26 = 0;
        __pyx_t_10 = 127;
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_10;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_13);
        __pyx_t_13 = 0;
        __Pyx_INCREF(__pyx_kp_u_row_qfq_factor_equal_zero_when);
        __pyx_t_26 += 39;
        __Pyx_GIVEREF(__pyx_kp_u_row_qfq_factor_equal_zero_when);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_row_qfq_factor_equal_zero_when);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_fq_row_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_10;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_26, __pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 948, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_13};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 948, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":949
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False             # <<<<<<<<<<<<<<
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":947
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":950
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 *                 if fq_row_date_str < start_date:  #             # <<<<<<<<<<<<<<
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:
 */
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_start_date, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 950, __pyx_L1_error)
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 950, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":951
 *                     return False
 *                 if fq_row_date_str < start_date:  #
 *                     continue             # <<<<<<<<<<<<<<
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]
 */
        goto __pyx_L27_continue;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":950
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 *                 if fq_row_date_str < start_date:  #             # <<<<<<<<<<<<<<
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":952
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:             # <<<<<<<<<<<<<<
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 */
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_start_date, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 952, __pyx_L1_error)
      __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_27 < 0))) __PYX_ERR(0, 952, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      if (__pyx_t_27) {
      } else {
        __pyx_t_5 = __pyx_t_27;
        goto __pyx_L33_bool_binop_done;
      }
      __pyx_t_11 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_min_date_sina_str, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 952, __pyx_L1_error)
      __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely((__pyx_t_27 < 0))) __PYX_ERR(0, 952, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_5 = __pyx_t_27;
      __pyx_L33_bool_binop_done:;
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":953
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]             # <<<<<<<<<<<<<<
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 *                 elif fq_row_date_str > self.latest_trade_day:
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_index); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = PyObject_RichCompare(__pyx_t_2, __pyx_v_min_date_sina, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 953, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_indice, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":954
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor             # <<<<<<<<<<<<<<
 *                 elif fq_row_date_str > self.latest_trade_day:
 *                     pass
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_row_indice); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_v_row_qfq_factor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (unlikely((PyObject_SetItem(__pyx_t_13, __pyx_v_row_indice, __pyx_t_2) < 0))) __PYX_ERR(0, 954, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":952
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_sina_str:             # <<<<<<<<<<<<<<
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 */
        goto __pyx_L32;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":955
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] == min_date_sina].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 *                 elif fq_row_date_str > self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     pass
 *                 else:
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_13 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 955, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_5) {
        goto __pyx_L32;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":958
 *                     pass
 *                 else:
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] >= fq_row_date].values[0]             # <<<<<<<<<<<<<<
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 * 
 */
      /*else*/ {
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_index); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = PyObject_RichCompare(__pyx_t_2, __pyx_v_fq_row_date, Py_GE); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_values); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_indice, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":959
 *                 else:
 *                     row_indice = stock_zh_a_hist_sina_bfq.index[stock_zh_a_hist_sina_bfq['date'] >= fq_row_date].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor             # <<<<<<<<<<<<<<
 * 
 *         pre_close.fillna(0, inplace=True)
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_row_indice); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_t_11, __pyx_v_row_qfq_factor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_11);
        if (unlikely((PyObject_SetItem(__pyx_t_11, __pyx_v_row_indice, __pyx_t_2) < 0))) __PYX_ERR(0, 959, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_L32:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":943
 *             return False
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():             # <<<<<<<<<<<<<<
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 */
      __pyx_L27_continue:;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":942
 *         if res_fq == 0:
 *             return False
 *         elif res_fq == 1:             # <<<<<<<<<<<<<<
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":961
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 * 
 *         pre_close.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         # set new colum
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_fillna); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 961, __pyx_L1_error)
  __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__52, __pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":964
 * 
 *         # set new colum
 *         stock_zh_a_hist_sina_bfq.insert(5, 'pre_close', pre_close.round(2))             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_sina_bfq.insert(0, 'code', simple_stock_code)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_insert); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_round); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 964, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_13))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_13);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_13, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_int_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
  }
  __pyx_t_13 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_13, __pyx_int_5, __pyx_n_s_pre_close, __pyx_t_1};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 964, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":965
 *         # set new colum
 *         stock_zh_a_hist_sina_bfq.insert(5, 'pre_close', pre_close.round(2))
 *         stock_zh_a_hist_sina_bfq.insert(0, 'code', simple_stock_code)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_insert); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 965, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_int_0, __pyx_n_s_code, __pyx_v_simple_stock_code};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":968
 * 
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_stock_trade_day_2018); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_13 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_1};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_11;
  __pyx_t_11 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":969
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_sina_bfq.columns = list(dtype_mapping.keys())
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 969, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":970
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_sina_bfq.columns = list(dtype_mapping.keys())
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_id};
      __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 970, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":969
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_sina_bfq.columns = list(dtype_mapping.keys())
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":971
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_sina_bfq.columns = list(dtype_mapping.keys())             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 971, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  if (__Pyx_PyObject_SetAttrStr(__pyx_v_stock_zh_a_hist_sina_bfq, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 971, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":974
 * 
 *         #
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_sina_bfq)             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_splitDataframeByYear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_stock_zh_a_hist_sina_bfq};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 974, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_split_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":976
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_sina_bfq)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_7, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_8);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":977
 * 
 *         try:
 *             for year, year_stock_data in split_dict.items():             # <<<<<<<<<<<<<<
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      __pyx_t_9 = 0;
      if (unlikely(__pyx_v_split_dict == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 977, __pyx_L37_error)
      }
      __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_split_dict, 0, __pyx_n_s_items, (&__pyx_t_26), (&__pyx_t_16)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 977, __pyx_L37_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_2);
      __pyx_t_2 = __pyx_t_1;
      __pyx_t_1 = 0;
      while (1) {
        __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_26, &__pyx_t_9, &__pyx_t_1, &__pyx_t_11, NULL, __pyx_t_16);
        if (unlikely(__pyx_t_12 == 0)) break;
        if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 977, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_XDECREF_SET(__pyx_v_year, __pyx_t_1);
        __pyx_t_1 = 0;
        __Pyx_XDECREF_SET(__pyx_v_year_stock_data, __pyx_t_11);
        __pyx_t_11 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":978
 *         try:
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)             # <<<<<<<<<<<<<<
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 */
        __pyx_t_11 = __Pyx_PyObject_Str(__pyx_v_year); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 978, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_1 = PyNumber_Add(__pyx_n_s_stock_trade_day, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 978, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_XDECREF_SET(__pyx_v_table_name_year, __pyx_t_1);
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":979
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception as e:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_year_stock_data, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_INCREF(__pyx_v_table_name_year);
        __Pyx_GIVEREF(__pyx_v_table_name_year);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_table_name_year)) __PYX_ERR(0, 979, __pyx_L37_error);
        __pyx_t_13 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_engine); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_con, __pyx_t_3) < 0) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 979, __pyx_L37_error)
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 979, __pyx_L37_error)
        if (PyDict_SetItem(__pyx_t_13, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 979, __pyx_L37_error)
        __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, __pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 979, __pyx_L37_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":980
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L41_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":976
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_sina_bfq)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    }
    __pyx_L37_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":981
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoSina", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_3, &__pyx_t_13) < 0) __PYX_ERR(0, 981, __pyx_L39_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_e = __pyx_t_3;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":982
 *             return True
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_26 = 0;
        __pyx_t_10 = 127;
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_10;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_26 += 45;
        __Pyx_GIVEREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_10;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_26 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_kp_u__5);
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, __pyx_t_26, __pyx_t_10); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 982, __pyx_L50_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
          __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 982, __pyx_L50_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":983
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L49_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":981
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
      /*finally:*/ {
        __pyx_L50_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_28;
          goto __pyx_L39_except_error;
        }
        __pyx_L49_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L40_except_return;
        }
      }
    }
    goto __pyx_L39_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":976
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_sina_bfq)
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    __pyx_L39_except_error:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L41_try_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L40_except_return:;
    __Pyx_XGIVEREF(__pyx_t_8);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_7, __pyx_t_6);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":907
 *         return suspended_stock_list
 * 
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',             # <<<<<<<<<<<<<<
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoSina", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_sina_bfq);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_min_date_sina);
  __Pyx_XDECREF(__pyx_v_min_date_sina_str);
  __Pyx_XDECREF(__pyx_v_pre_close);
  __Pyx_XDECREF(__pyx_v_res_fq);
  __Pyx_XDECREF(__pyx_v_fq_factor_origin);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_fq_row_date);
  __Pyx_XDECREF(__pyx_v_fq_row_date_str);
  __Pyx_XDECREF(__pyx_v_row_qfq_factor);
  __Pyx_XDECREF(__pyx_v_row_indice);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_split_dict);
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_year_stock_data);
  __Pyx_XDECREF(__pyx_v_table_name_year);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":985
 *             return False
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):             # <<<<<<<<<<<<<<
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_33saveHistTradeDayInfoBaostock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_33saveHistTradeDayInfoBaostock = {"saveHistTradeDayInfoBaostock", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_33saveHistTradeDayInfoBaostock, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_33saveHistTradeDayInfoBaostock(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_simple_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  CYTHON_UNUSED PyObject *__pyx_v_pre_close_first = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[5] = {0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoBaostock (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_simple_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_pre_close_first,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simple_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoBaostock", 0, 4, 5, 1); __PYX_ERR(0, 985, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoBaostock", 0, 4, 5, 2); __PYX_ERR(0, 985, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoBaostock", 0, 4, 5, 3); __PYX_ERR(0, 985, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pre_close_first);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "saveHistTradeDayInfoBaostock") < 0)) __PYX_ERR(0, 985, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_simple_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
    __pyx_v_pre_close_first = values[4];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoBaostock", 0, 4, 5, __pyx_nargs); __PYX_ERR(0, 985, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoBaostock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_32saveHistTradeDayInfoBaostock(__pyx_self, __pyx_v_self, __pyx_v_simple_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_pre_close_first);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_32saveHistTradeDayInfoBaostock(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, CYTHON_UNUSED PyObject *__pyx_v_pre_close_first) {
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_rs = NULL;
  PyObject *__pyx_v_data_list = NULL;
  PyObject *__pyx_v_result_day_data = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_cols_to_convert = NULL;
  PyObject *__pyx_v_split_dict = NULL;
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_year_stock_data = NULL;
  PyObject *__pyx_v_table_name_year = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_t_11;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  Py_ssize_t __pyx_t_14;
  Py_UCS4 __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  Py_ssize_t __pyx_t_25;
  char const *__pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoBaostock", 0);
  __Pyx_INCREF(__pyx_v_start_date);
  __Pyx_INCREF(__pyx_v_end_date);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":986
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')             # <<<<<<<<<<<<<<
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 986, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_2, __pyx_v_simple_stock_code, __pyx_kp_s_xx};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_stock_code = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":987
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]             # <<<<<<<<<<<<<<
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_start_date, 0, 4, NULL, NULL, &__pyx_slice__53, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__54); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_start_date, 4, 6, NULL, NULL, &__pyx_slice__55, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_kp_s__54); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_start_date, 6, 0, NULL, NULL, &__pyx_slice__56, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":988
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_end_date, 0, 4, NULL, NULL, &__pyx_slice__53, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_kp_s__54); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_v_end_date, 4, 6, NULL, NULL, &__pyx_slice__55, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_kp_s__54); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_end_date, 6, 0, NULL, NULL, &__pyx_slice__56, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 988, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF_SET(__pyx_v_end_date, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":990
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # adjustflag: 3: 12
 *             rs = bs.query_history_k_data_plus(stock_code,
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_7);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":992
 *         try:
 *             # adjustflag: 3: 12
 *             rs = bs.query_history_k_data_plus(stock_code,             # <<<<<<<<<<<<<<
 *                                               "date,code,open,high,low,close,preclose,volume,amount,adjustflag,turn,tradestatus,pctChg,isST",
 *                                               start_date=start_date, end_date=end_date,
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_query_history_k_data_plus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_stock_code);
      __Pyx_GIVEREF(__pyx_v_stock_code);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_stock_code)) __PYX_ERR(0, 992, __pyx_L3_error);
      __Pyx_INCREF(__pyx_kp_s_date_code_open_high_low_close_pr);
      __Pyx_GIVEREF(__pyx_kp_s_date_code_open_high_low_close_pr);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_kp_s_date_code_open_high_low_close_pr)) __PYX_ERR(0, 992, __pyx_L3_error);

      /* "tbstock/dataAcquisition/saveDataToMysql.py":994
 *             rs = bs.query_history_k_data_plus(stock_code,
 *                                               "date,code,open,high,low,close,preclose,volume,amount,adjustflag,turn,tradestatus,pctChg,isST",
 *                                               start_date=start_date, end_date=end_date,             # <<<<<<<<<<<<<<
 *                                               frequency="d", adjustflag="3")
 *             data_list = []
 */
      __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 994, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 994, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_end_date, __pyx_v_end_date) < 0) __PYX_ERR(0, 994, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_frequency, __pyx_n_s_d) < 0) __PYX_ERR(0, 994, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_adjustflag, __pyx_kp_s_3) < 0) __PYX_ERR(0, 994, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":992
 *         try:
 *             # adjustflag: 3: 12
 *             rs = bs.query_history_k_data_plus(stock_code,             # <<<<<<<<<<<<<<
 *                                               "date,code,open,high,low,close,preclose,volume,amount,adjustflag,turn,tradestatus,pctChg,isST",
 *                                               start_date=start_date, end_date=end_date,
 */
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 992, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_rs = __pyx_t_8;
      __pyx_t_8 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":996
 *                                               start_date=start_date, end_date=end_date,
 *                                               frequency="d", adjustflag="3")
 *             data_list = []             # <<<<<<<<<<<<<<
 *             while (rs.error_code == '0') & rs.next():
 *                 data_list.append(rs.get_row_data())
 */
      __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 996, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_v_data_list = ((PyObject*)__pyx_t_8);
      __pyx_t_8 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":997
 *                                               frequency="d", adjustflag="3")
 *             data_list = []
 *             while (rs.error_code == '0') & rs.next():             # <<<<<<<<<<<<<<
 *                 data_list.append(rs.get_row_data())
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)
 */
      while (1) {
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_rs, __pyx_n_s_error_code); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = PyObject_RichCompare(__pyx_t_8, __pyx_kp_s_0, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 997, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rs, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 997, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_t_2 = PyNumber_And(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 997, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 997, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (!__pyx_t_9) break;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":998
 *             data_list = []
 *             while (rs.error_code == '0') & rs.next():
 *                 data_list.append(rs.get_row_data())             # <<<<<<<<<<<<<<
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)
 *         except Exception as e:
 */
        __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_rs, __pyx_n_s_get_row_data); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 998, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_8);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_8))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_8, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        }
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_data_list, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 998, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":999
 *             while (rs.error_code == '0') & rs.next():
 *                 data_list.append(rs.get_row_data())
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call bs.query_history_k_data_plus for stock_code = {simple_stock_code}: {e} ')
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_data_list);
      __Pyx_GIVEREF(__pyx_v_data_list);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_data_list)) __PYX_ERR(0, 999, __pyx_L3_error);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rs, __pyx_n_s_fields); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_t_1) < 0) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_v_result_day_data = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":990
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # adjustflag: 3: 12
 *             rs = bs.query_history_k_data_plus(stock_code,
 */
    }
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1000
 *                 data_list.append(rs.get_row_data())
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call bs.query_history_k_data_plus for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
    __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_11) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoBaostock", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_2) < 0) __PYX_ERR(0, 1000, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_e = __pyx_t_3;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1001
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call bs.query_history_k_data_plus for stock_code = {simple_stock_code}: {e} ')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_utils); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_logger); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_error); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = PyTuple_New(5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = 0;
        __pyx_t_15 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_bs_query_history);
        __pyx_t_14 += 61;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_bs_query_history);
        PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_kp_u_Failed_to_call_bs_query_history);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_14 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_kp_u__21);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_15;
        __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_14 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_13, 4, __pyx_kp_u__22);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_13, 5, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1001, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_12))) {
          __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_12);
          if (likely(__pyx_t_13)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
            __Pyx_INCREF(__pyx_t_13);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_12, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_16};
          __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1001, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_8);
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        }
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1002
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call bs.query_history_k_data_plus for stock_code = {simple_stock_code}: {e} ')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         if result_day_data.empty:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L15_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1000
 *                 data_list.append(rs.get_row_data())
 *             result_day_data = pd.DataFrame(data_list, columns=rs.fields)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call bs.query_history_k_data_plus for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_11 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_11; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L5_except_error;
        }
        __pyx_L15_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":990
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             # adjustflag: 3: 12
 *             rs = bs.query_history_k_data_plus(stock_code,
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1004
 *             return False
 * 
 *         if result_day_data.empty:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'DataFrame result_day_data is empty for stock_code = {simple_stock_code}')
 *             return False
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_day_data, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1004, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1005
 * 
 *         if result_day_data.empty:
 *             utils.logger.error(f'DataFrame result_day_data is empty for stock_code = {simple_stock_code}')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_DataFrame_result_day_data_is_emp, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1005, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1005, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1006
 *         if result_day_data.empty:
 *             utils.logger.error(f'DataFrame result_day_data is empty for stock_code = {simple_stock_code}')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         result_day_data = result_day_data[result_day_data['tradestatus'] != '0']
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1004
 *             return False
 * 
 *         if result_day_data.empty:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'DataFrame result_day_data is empty for stock_code = {simple_stock_code}')
 *             return False
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1008
 *             return False
 * 
 *         result_day_data = result_day_data[result_day_data['tradestatus'] != '0']             # <<<<<<<<<<<<<<
 * 
 *         if result_day_data.empty:
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_day_data, __pyx_n_s_tradestatus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_kp_s_0, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_result_day_data, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1008, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_result_day_data, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1010
 *         result_day_data = result_day_data[result_day_data['tradestatus'] != '0']
 * 
 *         if result_day_data.empty:             # <<<<<<<<<<<<<<
 *             if simple_stock_code in self.suspended_stock_list:
 *                 utils.logger.warning(
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_day_data, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1010, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1011
 * 
 *         if result_day_data.empty:
 *             if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(
 *                     f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_simple_stock_code, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1011, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1012
 *         if result_day_data.empty:
 *             if simple_stock_code in self.suspended_stock_list:
 *                 utils.logger.warning(             # <<<<<<<<<<<<<<
 *                     f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                 return True
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_warning); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1012, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1013
 *             if simple_stock_code in self.suspended_stock_list:
 *                 utils.logger.warning(
 *                     f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_14 = 0;
      __pyx_t_15 = 127;
      __Pyx_INCREF(__pyx_kp_u_Call_bs_query_history_k_data_plu);
      __pyx_t_14 += 70;
      __Pyx_GIVEREF(__pyx_kp_u_Call_bs_query_history_k_data_plu);
      PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_kp_u_Call_bs_query_history_k_data_plu);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_15;
      __pyx_t_14 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u_it_has_been_suspended);
      __pyx_t_14 += 23;
      __Pyx_GIVEREF(__pyx_kp_u_it_has_been_suspended);
      PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_kp_u_it_has_been_suspended);
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_8, 3, __pyx_t_14, __pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __pyx_t_8 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_1};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1012, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1014
 *                 utils.logger.warning(
 *                     f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 utils.logger.error(f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1011
 * 
 *         if result_day_data.empty:
 *             if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                 utils.logger.warning(
 *                     f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1016
 *                 return True
 *             else:
 *                 utils.logger.error(f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}")             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    /*else*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_error); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Call_bs_query_history_k_data_plu, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1016, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1016, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1017
 *             else:
 *                 utils.logger.error(f"Call bs.query_history_k_data_plus dataframe is empty for stock_code = {simple_stock_code}")
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         # dataframe
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_False);
      __pyx_r = Py_False;
      goto __pyx_L0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1010
 *         result_day_data = result_day_data[result_day_data['tradestatus'] != '0']
 * 
 *         if result_day_data.empty:             # <<<<<<<<<<<<<<
 *             if simple_stock_code in self.suspended_stock_list:
 *                 utils.logger.warning(
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1020
 * 
 *         # dataframe
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_stock_trade_day_2018); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1020, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_8};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1020, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1021
 *         # dataframe
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1021, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1022
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         result_day_data['outstand_share'] = 0
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_n_s_id};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1021
 *         # dataframe
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1024
 *             dtype_mapping.pop('id')
 * 
 *         result_day_data['outstand_share'] = 0             # <<<<<<<<<<<<<<
 *         result_day_data['code'] = simple_stock_code
 *         result_day_data.rename(columns={'preclose': 'pre_close', 'turn': 'turn_over'}, inplace=True)
 */
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_n_s_outstand_share, __pyx_int_0) < 0))) __PYX_ERR(0, 1024, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1025
 * 
 *         result_day_data['outstand_share'] = 0
 *         result_day_data['code'] = simple_stock_code             # <<<<<<<<<<<<<<
 *         result_day_data.rename(columns={'preclose': 'pre_close', 'turn': 'turn_over'}, inplace=True)
 *         result_day_data = result_day_data[list(dtype_mapping.keys())]
 */
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_n_s_code, __pyx_v_simple_stock_code) < 0))) __PYX_ERR(0, 1025, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1026
 *         result_day_data['outstand_share'] = 0
 *         result_day_data['code'] = simple_stock_code
 *         result_day_data.rename(columns={'preclose': 'pre_close', 'turn': 'turn_over'}, inplace=True)             # <<<<<<<<<<<<<<
 *         result_day_data = result_day_data[list(dtype_mapping.keys())]
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_day_data, __pyx_n_s_rename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_preclose, __pyx_n_s_pre_close) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_turn, __pyx_n_s_turn_over) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_columns, __pyx_t_8) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1026, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1026, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1027
 *         result_day_data['code'] = simple_stock_code
 *         result_day_data.rename(columns={'preclose': 'pre_close', 'turn': 'turn_over'}, inplace=True)
 *         result_day_data = result_day_data[list(dtype_mapping.keys())]             # <<<<<<<<<<<<<<
 * 
 *         result_day_data["date"] = pd.to_datetime(result_day_data["date"], errors="coerce")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PySequence_ListKeepNew(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_result_day_data, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1027, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF_SET(__pyx_v_result_day_data, __pyx_t_8);
  __pyx_t_8 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1029
 *         result_day_data = result_day_data[list(dtype_mapping.keys())]
 * 
 *         result_day_data["date"] = pd.to_datetime(result_day_data["date"], errors="coerce")             # <<<<<<<<<<<<<<
 *         cols_to_convert = result_day_data.columns[2:]
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_to_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_day_data, __pyx_n_s_date); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_8);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8)) __PYX_ERR(0, 1029, __pyx_L1_error);
  __pyx_t_8 = 0;
  __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_errors, __pyx_n_s_coerce) < 0) __PYX_ERR(0, 1029, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_n_s_date, __pyx_t_1) < 0))) __PYX_ERR(0, 1029, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1030
 * 
 *         result_day_data["date"] = pd.to_datetime(result_day_data["date"], errors="coerce")
 *         cols_to_convert = result_day_data.columns[2:]             # <<<<<<<<<<<<<<
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")
 *         result_day_data['turn_over'] = result_day_data['turn_over'] / 100.0
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_result_day_data, __pyx_n_s_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_t_1, 2, 0, NULL, NULL, &__pyx_slice__57, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_cols_to_convert = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1031
 *         result_day_data["date"] = pd.to_datetime(result_day_data["date"], errors="coerce")
 *         cols_to_convert = result_day_data.columns[2:]
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")             # <<<<<<<<<<<<<<
 *         result_day_data['turn_over'] = result_day_data['turn_over'] / 100.0
 *         result_day_data['outstand_share'] = result_day_data['volume'] / result_day_data['turn_over']
 */
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_v_result_day_data, __pyx_v_cols_to_convert); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_apply); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pd); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_to_numeric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_errors, __pyx_n_s_coerce) < 0) __PYX_ERR(0, 1031, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_v_cols_to_convert, __pyx_t_3) < 0))) __PYX_ERR(0, 1031, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1032
 *         cols_to_convert = result_day_data.columns[2:]
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")
 *         result_day_data['turn_over'] = result_day_data['turn_over'] / 100.0             # <<<<<<<<<<<<<<
 *         result_day_data['outstand_share'] = result_day_data['volume'] / result_day_data['turn_over']
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_day_data, __pyx_n_s_turn_over); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_3, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_n_s_turn_over, __pyx_t_2) < 0))) __PYX_ERR(0, 1032, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1033
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")
 *         result_day_data['turn_over'] = result_day_data['turn_over'] / 100.0
 *         result_day_data['outstand_share'] = result_day_data['volume'] / result_day_data['turn_over']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_day_data, __pyx_n_s_volume); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_result_day_data, __pyx_n_s_turn_over); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_result_day_data, __pyx_n_s_outstand_share, __pyx_t_8) < 0))) __PYX_ERR(0, 1033, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1036
 * 
 *         #
 *         split_dict = utils.splitDataframeByYear(result_day_data)             # <<<<<<<<<<<<<<
 *         try:
 *             for year, year_stock_data in split_dict.items():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_splitDataframeByYear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1036, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_result_day_data};
    __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_split_dict = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1037
 *         #
 *         split_dict = utils.splitDataframeByYear(result_day_data)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_7);
    __Pyx_XGOTREF(__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_5);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1038
 *         split_dict = utils.splitDataframeByYear(result_day_data)
 *         try:
 *             for year, year_stock_data in split_dict.items():             # <<<<<<<<<<<<<<
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      __pyx_t_14 = 0;
      if (unlikely(__pyx_v_split_dict == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 1038, __pyx_L26_error)
      }
      __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_split_dict, 0, __pyx_n_s_items, (&__pyx_t_25), (&__pyx_t_17)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L26_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_8);
      __pyx_t_8 = __pyx_t_2;
      __pyx_t_2 = 0;
      while (1) {
        __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_8, __pyx_t_25, &__pyx_t_14, &__pyx_t_2, &__pyx_t_3, NULL, __pyx_t_17);
        if (unlikely(__pyx_t_11 == 0)) break;
        if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 1038, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_XDECREF_SET(__pyx_v_year, __pyx_t_2);
        __pyx_t_2 = 0;
        __Pyx_XDECREF_SET(__pyx_v_year_stock_data, __pyx_t_3);
        __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1039
 *         try:
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)             # <<<<<<<<<<<<<<
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 */
        __pyx_t_3 = __Pyx_PyObject_Str(__pyx_v_year); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1039, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = PyNumber_Add(__pyx_n_s_stock_trade_day, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_XDECREF_SET(__pyx_v_table_name_year, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1040
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception as e:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_year_stock_data, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_INCREF(__pyx_v_table_name_year);
        __Pyx_GIVEREF(__pyx_v_table_name_year);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_table_name_year)) __PYX_ERR(0, 1040, __pyx_L26_error);
        __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_GetModuleGlobalName(__pyx_t_12, __pyx_n_s_engine); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_12);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_con, __pyx_t_12) < 0) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1040, __pyx_L26_error)
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1040, __pyx_L26_error)
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1040, __pyx_L26_error)
        __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1040, __pyx_L26_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      }
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1041
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L30_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1037
 *         #
 *         split_dict = utils.splitDataframeByYear(result_day_data)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    }
    __pyx_L26_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1042
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
    __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_17) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoBaostock", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_8, &__pyx_t_12, &__pyx_t_1) < 0) __PYX_ERR(0, 1042, __pyx_L28_except_error)
      __Pyx_XGOTREF(__pyx_t_8);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_12);
      __pyx_v_e = __pyx_t_12;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1043
 *             return True
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_error); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = PyTuple_New(4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_25 = 0;
        __pyx_t_15 = 127;
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_15;
        __pyx_t_25 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_13);
        __pyx_t_13 = 0;
        __Pyx_INCREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_25 += 45;
        __Pyx_GIVEREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_15 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_15) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_15;
        __pyx_t_25 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_16, 2, __pyx_t_13);
        __pyx_t_13 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_25 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_16, 3, __pyx_kp_u__5);
        __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_16, 4, __pyx_t_25, __pyx_t_15); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1043, __pyx_L39_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_16)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_16);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_16, __pyx_t_13};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1043, __pyx_L39_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1044
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        goto __pyx_L38_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1042
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
      /*finally:*/ {
        __pyx_L39_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_17 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          }
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_26;
          goto __pyx_L28_except_error;
        }
        __pyx_L38_return: {
          __pyx_t_19 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_19;
          __pyx_t_19 = 0;
          goto __pyx_L29_except_return;
        }
      }
    }
    goto __pyx_L28_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1037
 *         #
 *         split_dict = utils.splitDataframeByYear(result_day_data)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    __pyx_L28_except_error:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    goto __pyx_L1_error;
    __pyx_L30_try_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    goto __pyx_L0;
    __pyx_L29_except_return:;
    __Pyx_XGIVEREF(__pyx_t_7);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":985
 *             return False
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):             # <<<<<<<<<<<<<<
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoBaostock", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_rs);
  __Pyx_XDECREF(__pyx_v_data_list);
  __Pyx_XDECREF(__pyx_v_result_day_data);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_cols_to_convert);
  __Pyx_XDECREF(__pyx_v_split_dict);
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_year_stock_data);
  __Pyx_XDECREF(__pyx_v_table_name_year);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_end_date);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1046
 *             return False
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):             # <<<<<<<<<<<<<<
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35saveHistTradeDayInfoEm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35saveHistTradeDayInfoEm = {"saveHistTradeDayInfoEm", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35saveHistTradeDayInfoEm, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35saveHistTradeDayInfoEm(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_simple_stock_code = 0;
  PyObject *__pyx_v_start_date = 0;
  PyObject *__pyx_v_end_date = 0;
  PyObject *__pyx_v_pre_close_first = 0;
  PyObject *__pyx_v_period = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[6] = {0,0,0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoEm (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_simple_stock_code,&__pyx_n_s_start_date,&__pyx_n_s_end_date,&__pyx_n_s_pre_close_first,&__pyx_n_s_period,0};
    values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_0)));
    values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_daily)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_simple_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoEm", 0, 4, 6, 1); __PYX_ERR(0, 1046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoEm", 0, 4, 6, 2); __PYX_ERR(0, 1046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (likely((values[3] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_date)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[3]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoEm", 0, 4, 6, 3); __PYX_ERR(0, 1046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  4:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pre_close_first);
          if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  5:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_period);
          if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1046, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "saveHistTradeDayInfoEm") < 0)) __PYX_ERR(0, 1046, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
        CYTHON_FALLTHROUGH;
        case  5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
        CYTHON_FALLTHROUGH;
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_simple_stock_code = values[1];
    __pyx_v_start_date = values[2];
    __pyx_v_end_date = values[3];
    __pyx_v_pre_close_first = values[4];
    __pyx_v_period = values[5];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("saveHistTradeDayInfoEm", 0, 4, 6, __pyx_nargs); __PYX_ERR(0, 1046, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoEm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34saveHistTradeDayInfoEm(__pyx_self, __pyx_v_self, __pyx_v_simple_stock_code, __pyx_v_start_date, __pyx_v_end_date, __pyx_v_pre_close_first, __pyx_v_period);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34saveHistTradeDayInfoEm(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_simple_stock_code, PyObject *__pyx_v_start_date, PyObject *__pyx_v_end_date, PyObject *__pyx_v_pre_close_first, PyObject *__pyx_v_period) {
  PyObject *__pyx_v_stock_zh_a_hist_em_bfq = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_min_date_em = NULL;
  PyObject *__pyx_v_min_date_em_str = NULL;
  PyObject *__pyx_v_pre_close = NULL;
  PyObject *__pyx_v_res_fq = NULL;
  PyObject *__pyx_v_fq_factor_origin = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_fq_row_date = NULL;
  PyObject *__pyx_v_fq_row_date_str = NULL;
  PyObject *__pyx_v_row_qfq_factor = NULL;
  PyObject *__pyx_v_row_indice = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_split_dict = NULL;
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_year_stock_data = NULL;
  PyObject *__pyx_v_table_name_year = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *(*__pyx_t_24)(PyObject *);
  PyObject *(*__pyx_t_25)(PyObject *);
  Py_ssize_t __pyx_t_26;
  int __pyx_t_27;
  char const *__pyx_t_28;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("saveHistTradeDayInfoEm", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1047
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 *                                                         end_date=end_date,
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1048
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                         end_date=end_date,
 *                                                         adjust="")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_ak); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stock_zh_a_hist); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1048, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1048, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_symbol, __pyx_v_simple_stock_code) < 0) __PYX_ERR(0, 1048, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_period, __pyx_v_period) < 0) __PYX_ERR(0, 1048, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 1048, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1049
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 *                                                         end_date=end_date,             # <<<<<<<<<<<<<<
 *                                                         adjust="")
 *             if stock_zh_a_hist_em_bfq.empty:
 */
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_end_date, __pyx_v_end_date) < 0) __PYX_ERR(0, 1048, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_adjust, __pyx_kp_s__30) < 0) __PYX_ERR(0, 1048, __pyx_L3_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1048
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                         end_date=end_date,
 *                                                         adjust="")
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1048, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_stock_zh_a_hist_em_bfq = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1051
 *                                                         end_date=end_date,
 *                                                         adjust="")
 *             if stock_zh_a_hist_em_bfq.empty:             # <<<<<<<<<<<<<<
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1051, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1051, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1052
 *                                                         adjust="")
 *             if stock_zh_a_hist_em_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True
 */
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1052, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_simple_stock_code, __pyx_t_6, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1052, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_7) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1053
 *             if stock_zh_a_hist_em_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")             # <<<<<<<<<<<<<<
 *                     return True
 *                 else:
 */
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_8 = 0;
          __pyx_t_9 = 127;
          __Pyx_INCREF(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          __pyx_t_8 += 61;
          __Pyx_GIVEREF(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u_Call_ak_stock_zh_a_daily_datafra);
          __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_9;
          __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
          __Pyx_GIVEREF(__pyx_t_10);
          PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_10);
          __pyx_t_10 = 0;
          __Pyx_INCREF(__pyx_kp_u_it_has_been_suspended);
          __pyx_t_8 += 23;
          __Pyx_GIVEREF(__pyx_kp_u_it_has_been_suspended);
          PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u_it_has_been_suspended);
          __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_5, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1053, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_5 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_5)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_5);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1054
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True             # <<<<<<<<<<<<<<
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_True);
          __pyx_r = Py_True;
          goto __pyx_L7_try_return;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1052
 *                                                         adjust="")
 *             if stock_zh_a_hist_em_bfq.empty:
 *                 if simple_stock_code in self.suspended_stock_list:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 *                     return True
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1056
 *                     return True
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")             # <<<<<<<<<<<<<<
 *                     return False
 *             # TODO akshare
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1056, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1056, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1056, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          __pyx_t_10 = NULL;
          __pyx_t_11 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_4))) {
            __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
            if (likely(__pyx_t_10)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
              __Pyx_INCREF(__pyx_t_10);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_4, function);
              __pyx_t_11 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_5};
            __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
            __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1056, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          }
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1057
 *                 else:
 *                     utils.logger.error(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}")
 *                     return False             # <<<<<<<<<<<<<<
 *             # TODO akshare
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          goto __pyx_L7_try_return;
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1051
 *                                                         end_date=end_date,
 *                                                         adjust="")
 *             if stock_zh_a_hist_em_bfq.empty:             # <<<<<<<<<<<<<<
 *                 if simple_stock_code in self.suspended_stock_list:
 *                     utils.logger.warning(f"Call ak.stock_zh_a_daily dataframe is empty for stock_code = {simple_stock_code}, it has been suspended")
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1059
 *                     return False
 *             # TODO akshare
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_sort_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1059, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1059, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1059, __pyx_L3_error)
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_ascending, Py_True) < 0) __PYX_ERR(0, 1059, __pyx_L3_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__58, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1059, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1047
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 *                                                         end_date=end_date,
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1060
 *             # TODO akshare
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
    __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_12) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoEm", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 1060, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1061
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_13, __pyx_n_s_utils); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_8 = 0;
        __pyx_t_9 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his);
        __pyx_t_8 += 51;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his);
        PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_kp_u_Failed_to_call_ak_stock_zh_a_his);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
        __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_8 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_kp_u__21);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_9;
        __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_8 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_kp_u__22);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1061, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_13))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_13, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_15};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_13, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1061, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1062
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         min_date_em = stock_zh_a_hist_em_bfq.loc[0, '']
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L15_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1060
 *             # TODO akshare
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')
 *             return False
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_12 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
        __pyx_L15_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1047
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):
 *         try:             # <<<<<<<<<<<<<<
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 *                                                         end_date=end_date,
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1064
 *             return False
 * 
 *         min_date_em = stock_zh_a_hist_em_bfq.loc[0, '']             # <<<<<<<<<<<<<<
 *         min_date_em_str = min_date_em.strftime('%Y%m%d')
 * 
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__59); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_v_min_date_em = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1065
 * 
 *         min_date_em = stock_zh_a_hist_em_bfq.loc[0, '']
 *         min_date_em_str = min_date_em.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 * 
 *         # get pre_close
 */
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_min_date_em, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1065, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_Y_m_d};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1065, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_min_date_em_str = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1068
 * 
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_em_bfq[''].shift(1)             # <<<<<<<<<<<<<<
 *         if pre_close_first != 0:
 *             pre_close[0] = pre_close_first
 */
  __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_kp_s__31); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_shift); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1068, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_int_1};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1068, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_pre_close = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1069
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_em_bfq[''].shift(1)
 *         if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *             pre_close[0] = pre_close_first
 * 
 */
  __pyx_t_7 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_pre_close_first, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1069, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1070
 *         pre_close = stock_zh_a_hist_em_bfq[''].shift(1)
 *         if pre_close_first != 0:
 *             pre_close[0] = pre_close_first             # <<<<<<<<<<<<<<
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 */
    if (unlikely((__Pyx_SetItemInt(__pyx_v_pre_close, 0, __pyx_v_pre_close_first, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 1070, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1069
 *         # get pre_close
 *         pre_close = stock_zh_a_hist_em_bfq[''].shift(1)
 *         if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *             pre_close[0] = pre_close_first
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1072
 *             pre_close[0] = pre_close_first
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe             # <<<<<<<<<<<<<<
 *         if res_fq == 0:
 *             return False
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getStockFqfactorInfo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_INCREF(__pyx_v_simple_stock_code);
  __Pyx_GIVEREF(__pyx_v_simple_stock_code);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_simple_stock_code)) __PYX_ERR(0, 1072, __pyx_L1_error);
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_mode, __pyx_n_s_origin_factor) < 0) __PYX_ERR(0, 1072, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1072, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
    PyObject* sequence = __pyx_t_10;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1072, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_4 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_6);
    __Pyx_INCREF(__pyx_t_4);
    #else
    __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    #endif
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_5 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1072, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_24 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5);
    index = 0; __pyx_t_6 = __pyx_t_24(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L23_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_6);
    index = 1; __pyx_t_4 = __pyx_t_24(__pyx_t_5); if (unlikely(!__pyx_t_4)) goto __pyx_L23_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_4);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_5), 2) < 0) __PYX_ERR(0, 1072, __pyx_L1_error)
    __pyx_t_24 = NULL;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    goto __pyx_L24_unpacking_done;
    __pyx_L23_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_24 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1072, __pyx_L1_error)
    __pyx_L24_unpacking_done:;
  }
  __pyx_v_res_fq = __pyx_t_6;
  __pyx_t_6 = 0;
  __pyx_v_fq_factor_origin = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1073
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:             # <<<<<<<<<<<<<<
 *             return False
 *         elif res_fq == 1:
 */
  __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_res_fq, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1073, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1074
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:
 *             return False             # <<<<<<<<<<<<<<
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1073
 * 
 *         res_fq, fq_factor_origin = self.dataproc.getStockFqfactorInfo(simple_stock_code, mode='origin_factor')  # dataframe
 *         if res_fq == 0:             # <<<<<<<<<<<<<<
 *             return False
 *         elif res_fq == 1:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1075
 *         if res_fq == 0:
 *             return False
 *         elif res_fq == 1:             # <<<<<<<<<<<<<<
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 */
  __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_res_fq, __pyx_int_1, 1, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1075, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1076
 *             return False
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():             # <<<<<<<<<<<<<<
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fq_factor_origin, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    }
    if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
      __pyx_t_4 = __pyx_t_10; __Pyx_INCREF(__pyx_t_4);
      __pyx_t_8 = 0;
      __pyx_t_25 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1076, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_25 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_4); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1076, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    for (;;) {
      if (likely(!__pyx_t_25)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1076, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_4);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
            #endif
            if (__pyx_t_8 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_8); __Pyx_INCREF(__pyx_t_10); __pyx_t_8++; if (unlikely((0 < 0))) __PYX_ERR(0, 1076, __pyx_L1_error)
          #else
          __pyx_t_10 = __Pyx_PySequence_ITEM(__pyx_t_4, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1076, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          #endif
        }
      } else {
        __pyx_t_10 = __pyx_t_25(__pyx_t_4);
        if (unlikely(!__pyx_t_10)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1076, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_10);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
        PyObject* sequence = __pyx_t_10;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 1076, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_5 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_5);
        #else
        __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        #endif
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_13 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1076, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_24 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_13);
        index = 0; __pyx_t_6 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_6)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_6);
        index = 1; __pyx_t_5 = __pyx_t_24(__pyx_t_13); if (unlikely(!__pyx_t_5)) goto __pyx_L28_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_5);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_24(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1076, __pyx_L1_error)
        __pyx_t_24 = NULL;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L29_unpacking_done;
        __pyx_L28_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_24 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 1076, __pyx_L1_error)
        __pyx_L29_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1077
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']             # <<<<<<<<<<<<<<
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 */
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1077, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_fq_row_date, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1078
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fq_row_date, __pyx_n_s_strftime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1078, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
        __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1078, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_fq_row_date_str, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1079
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']             # <<<<<<<<<<<<<<
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 */
      __pyx_t_10 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_qfq_factor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1079, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF_SET(__pyx_v_row_qfq_factor, __pyx_t_10);
      __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1080
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 */
      __pyx_t_7 = (__Pyx_PyInt_BoolEqObjC(__pyx_v_row_qfq_factor, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1080, __pyx_L1_error)
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1081
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")             # <<<<<<<<<<<<<<
 *                     return False
 *                 if fq_row_date_str < start_date:  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_26 = 0;
        __pyx_t_9 = 127;
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_9;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_13);
        __pyx_t_13 = 0;
        __Pyx_INCREF(__pyx_kp_u_row_qfq_factor_equal_zero_when);
        __pyx_t_26 += 39;
        __Pyx_GIVEREF(__pyx_kp_u_row_qfq_factor_equal_zero_when);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_row_qfq_factor_equal_zero_when);
        __pyx_t_13 = __Pyx_PyObject_FormatSimple(__pyx_v_fq_row_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_13) : __pyx_t_9;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_13);
        __Pyx_GIVEREF(__pyx_t_13);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_13);
        __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_26, __pyx_t_9); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1081, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_13};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1081, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1082
 *                 if row_qfq_factor == 0:
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False             # <<<<<<<<<<<<<<
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        goto __pyx_L0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1080
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 *                 row_qfq_factor = row['qfq_factor']
 *                 if row_qfq_factor == 0:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1083
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 *                 if fq_row_date_str < start_date:  #             # <<<<<<<<<<<<<<
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:
 */
      __pyx_t_10 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_start_date, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1083, __pyx_L1_error)
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1083, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1084
 *                     return False
 *                 if fq_row_date_str < start_date:  #
 *                     continue             # <<<<<<<<<<<<<<
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]
 */
        goto __pyx_L26_continue;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1083
 *                     utils.logger.error(f"{simple_stock_code} row_qfq_factor equal zero when date = {fq_row_date}")
 *                     return False
 *                 if fq_row_date_str < start_date:  #             # <<<<<<<<<<<<<<
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1085
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:             # <<<<<<<<<<<<<<
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 */
      __pyx_t_10 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_start_date, Py_GE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1085, __pyx_L1_error)
      __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_27 < 0))) __PYX_ERR(0, 1085, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_27) {
      } else {
        __pyx_t_7 = __pyx_t_27;
        goto __pyx_L32_bool_binop_done;
      }
      __pyx_t_10 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_v_min_date_em_str, Py_LT); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1085, __pyx_L1_error)
      __pyx_t_27 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely((__pyx_t_27 < 0))) __PYX_ERR(0, 1085, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      __pyx_t_7 = __pyx_t_27;
      __pyx_L32_bool_binop_done:;
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1086
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]             # <<<<<<<<<<<<<<
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 *                 elif fq_row_date_str > self.latest_trade_day:
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_index); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_kp_s__35); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = PyObject_RichCompare(__pyx_t_5, __pyx_v_min_date_em, Py_EQ); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_13, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1086, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_indice, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1087
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor             # <<<<<<<<<<<<<<
 *                 elif fq_row_date_str > self.latest_trade_day:
 *                     pass
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_13 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_row_indice); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_13, __pyx_v_row_qfq_factor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        if (unlikely((PyObject_SetItem(__pyx_t_13, __pyx_v_row_indice, __pyx_t_5) < 0))) __PYX_ERR(0, 1087, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1085
 *                 if fq_row_date_str < start_date:  #
 *                     continue
 *                 elif fq_row_date_str >= start_date and fq_row_date_str < min_date_em_str:             # <<<<<<<<<<<<<<
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 */
        goto __pyx_L31;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1088
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] == min_date_em].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 *                 elif fq_row_date_str > self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     pass
 *                 else:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = PyObject_RichCompare(__pyx_v_fq_row_date_str, __pyx_t_5, Py_GT); __Pyx_XGOTREF(__pyx_t_13); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_13); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1088, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      if (__pyx_t_7) {
        goto __pyx_L31;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1091
 *                     pass
 *                 else:
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] >= fq_row_date].values[0]             # <<<<<<<<<<<<<<
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 * 
 */
      /*else*/ {
        __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_index); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_13);
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_kp_s__35); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_v_fq_row_date, Py_GE); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_13, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_10, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_XDECREF_SET(__pyx_v_row_indice, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1092
 *                 else:
 *                     row_indice = stock_zh_a_hist_em_bfq.index[stock_zh_a_hist_em_bfq[''] >= fq_row_date].values[0]
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor             # <<<<<<<<<<<<<<
 * 
 *         pre_close.fillna(0, inplace=True)
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_row_indice); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_t_10, __pyx_v_row_qfq_factor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_loc); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_10);
        if (unlikely((PyObject_SetItem(__pyx_t_10, __pyx_v_row_indice, __pyx_t_5) < 0))) __PYX_ERR(0, 1092, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_L31:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1076
 *             return False
 *         elif res_fq == 1:
 *             for index, row in fq_factor_origin.iterrows():             # <<<<<<<<<<<<<<
 *                 fq_row_date = row['date']
 *                 fq_row_date_str = fq_row_date.strftime('%Y%m%d')
 */
      __pyx_L26_continue:;
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1075
 *         if res_fq == 0:
 *             return False
 *         elif res_fq == 1:             # <<<<<<<<<<<<<<
 *             for index, row in fq_factor_origin.iterrows():
 *                 fq_row_date = row['date']
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1094
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 * 
 *         pre_close.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         # set new colum
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_fillna); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1094, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__52, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1094, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1097
 * 
 *         # set new colum
 *         stock_zh_a_hist_em_bfq['pre_close'] = pre_close.round(2)             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq.rename(
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_round); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_int_2};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1097, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_pre_close, __pyx_t_10) < 0))) __PYX_ERR(0, 1097, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1098
 *         # set new colum
 *         stock_zh_a_hist_em_bfq['pre_close'] = pre_close.round(2)
 *         stock_zh_a_hist_em_bfq.rename(             # <<<<<<<<<<<<<<
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_rename); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1099
 *         stock_zh_a_hist_em_bfq['pre_close'] = pre_close.round(2)
 *         stock_zh_a_hist_em_bfq.rename(
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',             # <<<<<<<<<<<<<<
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)
 *         stock_zh_a_hist_em_bfq['volume'] = stock_zh_a_hist_em_bfq['volume'] * 100
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__35, __pyx_n_s_date) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__60, __pyx_n_s_code) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__61, __pyx_n_s_open) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__31, __pyx_n_s_close) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__62, __pyx_n_s_high) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__63, __pyx_n_s_low) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__64, __pyx_n_s_volume) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__65, __pyx_n_s_amount) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_4, __pyx_kp_s__66, __pyx_n_s_turn_over) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_columns, __pyx_t_4) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1100
 *         stock_zh_a_hist_em_bfq.rename(
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq['volume'] = stock_zh_a_hist_em_bfq['volume'] * 100
 *         stock_zh_a_hist_em_bfq['turn_over'] = stock_zh_a_hist_em_bfq['turn_over'] / 100.0
 */
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1099, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1098
 *         # set new colum
 *         stock_zh_a_hist_em_bfq['pre_close'] = pre_close.round(2)
 *         stock_zh_a_hist_em_bfq.rename(             # <<<<<<<<<<<<<<
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)
 */
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1098, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1101
 *             columns={'': 'date', '': 'code', '': 'open', '': 'close', '': 'high', '': 'low',
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)
 *         stock_zh_a_hist_em_bfq['volume'] = stock_zh_a_hist_em_bfq['volume'] * 100             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq['turn_over'] = stock_zh_a_hist_em_bfq['turn_over'] / 100.0
 *         stock_zh_a_hist_em_bfq['outstand_share'] = stock_zh_a_hist_em_bfq['volume'] / stock_zh_a_hist_em_bfq['turn_over']
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_volume); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyInt_MultiplyObjC(__pyx_t_4, __pyx_int_100, 0x64, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_volume, __pyx_t_5) < 0))) __PYX_ERR(0, 1101, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1102
 *                      '': 'volume', '': 'amount', '': 'turn_over'}, inplace=True)
 *         stock_zh_a_hist_em_bfq['volume'] = stock_zh_a_hist_em_bfq['volume'] * 100
 *         stock_zh_a_hist_em_bfq['turn_over'] = stock_zh_a_hist_em_bfq['turn_over'] / 100.0             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq['outstand_share'] = stock_zh_a_hist_em_bfq['volume'] / stock_zh_a_hist_em_bfq['turn_over']
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_turn_over); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = __Pyx_PyFloat_TrueDivideObjC(__pyx_t_5, __pyx_float_100_0, 100.0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_turn_over, __pyx_t_4) < 0))) __PYX_ERR(0, 1102, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1103
 *         stock_zh_a_hist_em_bfq['volume'] = stock_zh_a_hist_em_bfq['volume'] * 100
 *         stock_zh_a_hist_em_bfq['turn_over'] = stock_zh_a_hist_em_bfq['turn_over'] / 100.0
 *         stock_zh_a_hist_em_bfq['outstand_share'] = stock_zh_a_hist_em_bfq['volume'] / stock_zh_a_hist_em_bfq['turn_over']             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_volume); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_turn_over); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (unlikely((PyObject_SetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_outstand_share, __pyx_t_10) < 0))) __PYX_ERR(0, 1103, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1106
 * 
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_stock_trade_day_2018); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1106, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_13)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_13);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_13, __pyx_t_4};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1106, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_10;
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1107
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq[list(dtype_mapping.keys())]
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1107, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1108
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq[list(dtype_mapping.keys())]
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1108, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_4 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_n_s_id};
      __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1108, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1107
 *         #
 *         dtype_mapping = get_table_columns(stock_trade_day_2018)
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq[list(dtype_mapping.keys())]
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1109
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq[list(dtype_mapping.keys())]             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_4 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1109, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PySequence_ListKeepNew(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1109, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF_SET(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1112
 * 
 *         #
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq.replace([np.inf, -np.inf], np.nan)             # <<<<<<<<<<<<<<
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_replace); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inf); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_inf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_GIVEREF(__pyx_t_13);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_13)) __PYX_ERR(0, 1112, __pyx_L1_error);
  __Pyx_GIVEREF(__pyx_t_4);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error);
  __pyx_t_13 = 0;
  __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_nan); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1112, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_4, __pyx_t_6, __pyx_t_13};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1112, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_DECREF_SET(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_t_10);
  __pyx_t_10 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1113
 *         #
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq.replace([np.inf, -np.inf], np.nan)
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 *         try:
 */
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_em_bfq, __pyx_n_s_fillna); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1113, __pyx_L1_error)
  __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__52, __pyx_t_5); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1113, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_13);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1114
 *         stock_zh_a_hist_em_bfq = stock_zh_a_hist_em_bfq.replace([np.inf, -np.inf], np.nan)
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)             # <<<<<<<<<<<<<<
 *         try:
 *             for year, year_stock_data in split_dict.items():
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_splitDataframeByYear); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1114, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_11 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_10))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_10);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_10, function);
      __pyx_t_11 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_stock_zh_a_hist_em_bfq};
    __pyx_t_13 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1114, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_13);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  }
  __pyx_v_split_dict = __pyx_t_13;
  __pyx_t_13 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1115
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1116
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 *         try:
 *             for year, year_stock_data in split_dict.items():             # <<<<<<<<<<<<<<
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      __pyx_t_8 = 0;
      if (unlikely(__pyx_v_split_dict == Py_None)) {
        PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
        __PYX_ERR(0, 1116, __pyx_L36_error)
      }
      __pyx_t_10 = __Pyx_dict_iterator(__pyx_v_split_dict, 0, __pyx_n_s_items, (&__pyx_t_26), (&__pyx_t_16)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1116, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_13);
      __pyx_t_13 = __pyx_t_10;
      __pyx_t_10 = 0;
      while (1) {
        __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_13, __pyx_t_26, &__pyx_t_8, &__pyx_t_10, &__pyx_t_5, NULL, __pyx_t_16);
        if (unlikely(__pyx_t_12 == 0)) break;
        if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 1116, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_XDECREF_SET(__pyx_v_year, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_XDECREF_SET(__pyx_v_year_stock_data, __pyx_t_5);
        __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1117
 *         try:
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)             # <<<<<<<<<<<<<<
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 */
        __pyx_t_5 = __Pyx_PyObject_Str(__pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1117, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_10 = PyNumber_Add(__pyx_n_s_stock_trade_day, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1117, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF_SET(__pyx_v_table_name_year, __pyx_t_10);
        __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1118
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             return True
 *         except Exception as e:
 */
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_year_stock_data, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_INCREF(__pyx_v_table_name_year);
        __Pyx_GIVEREF(__pyx_v_table_name_year);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_table_name_year)) __PYX_ERR(0, 1118, __pyx_L36_error);
        __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_engine); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_con, __pyx_t_4) < 0) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1118, __pyx_L36_error)
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1118, __pyx_L36_error)
        if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1118, __pyx_L36_error)
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1118, __pyx_L36_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1119
 *                 table_name_year = 'stock_trade_day_' + str(year)
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L40_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1115
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    }
    __pyx_L36_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1120
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoEm", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_4, &__pyx_t_6) < 0) __PYX_ERR(0, 1120, __pyx_L38_except_error)
      __Pyx_XGOTREF(__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1121
 *             return True
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_26 = 0;
        __pyx_t_9 = 127;
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_simple_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_9;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_26 += 45;
        __Pyx_GIVEREF(__pyx_kp_u_trade_data_failed_to_save_in_ta);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_kp_u_trade_data_failed_to_save_in_ta);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_9;
        __pyx_t_26 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_26 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_kp_u__5);
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_15, 4, __pyx_t_26, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1121, __pyx_L49_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_14};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1121, __pyx_L49_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1122
 *         except Exception as e:
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
        goto __pyx_L48_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1120
 *                 year_stock_data.to_sql(table_name_year, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             return True
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{simple_stock_code} trade data failed to save in tables, err is {e}.')
 *             return False
 */
      /*finally:*/ {
        __pyx_L49_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_20, &__pyx_t_19, &__pyx_t_18);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_23, &__pyx_t_22, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_18);
          __pyx_t_16 = __pyx_lineno; __pyx_t_12 = __pyx_clineno; __pyx_t_28 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_XGIVEREF(__pyx_t_18);
            __Pyx_ExceptionReset(__pyx_t_20, __pyx_t_19, __pyx_t_18);
          }
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_23, __pyx_t_22, __pyx_t_21);
          __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0; __pyx_t_18 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_12; __pyx_filename = __pyx_t_28;
          goto __pyx_L38_except_error;
        }
        __pyx_L48_return: {
          __pyx_t_18 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_18;
          __pyx_t_18 = 0;
          goto __pyx_L39_except_return;
        }
      }
    }
    goto __pyx_L38_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1115
 *         stock_zh_a_hist_em_bfq.fillna(0, inplace=True)
 *         split_dict = utils.splitDataframeByYear(stock_zh_a_hist_em_bfq)
 *         try:             # <<<<<<<<<<<<<<
 *             for year, year_stock_data in split_dict.items():
 *                 table_name_year = 'stock_trade_day_' + str(year)
 */
    __pyx_L38_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L40_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
    __pyx_L39_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1046
 *             return False
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):             # <<<<<<<<<<<<<<
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_13);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.saveHistTradeDayInfoEm", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_em_bfq);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_min_date_em);
  __Pyx_XDECREF(__pyx_v_min_date_em_str);
  __Pyx_XDECREF(__pyx_v_pre_close);
  __Pyx_XDECREF(__pyx_v_res_fq);
  __Pyx_XDECREF(__pyx_v_fq_factor_origin);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_fq_row_date);
  __Pyx_XDECREF(__pyx_v_fq_row_date_str);
  __Pyx_XDECREF(__pyx_v_row_qfq_factor);
  __Pyx_XDECREF(__pyx_v_row_indice);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_split_dict);
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_year_stock_data);
  __Pyx_XDECREF(__pyx_v_table_name_year);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_37updateStockTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_36updateStockTradeDayInfo, "\n        method='sina': \344\275\277\347\224\250\346\226\260\346\265\252\346\216\245\345\217\243\350\216\267\345\217\226\350\202\241\347\245\250\346\227\245\344\272\244\346\230\223\346\225\260\346\215\256\n        method='baostock': \344\275\277\347\224\250baostock\345\272\223\350\216\267\345\217\226\350\202\241\347\245\250\346\227\245\344\272\244\346\230\223\346\225\260\346\215\256\n        method='em': \344\275\277\347\224\250\344\270\234\346\226\271\350\264\242\345\257\214\350\216\267\345\217\226\350\202\241\347\245\250\346\227\245\344\272\244\346\230\223\346\225\260\346\215\256\n        :param method:\n        :param multi_thread:\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_37updateStockTradeDayInfo = {"updateStockTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_37updateStockTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_36updateStockTradeDayInfo};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_37updateStockTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_method = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_method,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_sina)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_method);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1124, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockTradeDayInfo") < 0)) __PYX_ERR(0, 1124, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_method = values[1];
    __pyx_v_multi_thread = values[2];
    __pyx_v_workers = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockTradeDayInfo", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1124, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_36updateStockTradeDayInfo(__pyx_self, __pyx_v_self, __pyx_v_method, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1167
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockTradeDayInfo(code_str, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             # ,
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_1updateSingleStockTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_1updateSingleStockTradeDayInfo = {"updateSingleStockTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_1updateSingleStockTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_1updateSingleStockTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_code_str = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_code_str,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code_str)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockTradeDayInfo", 1, 2, 2, 1); __PYX_ERR(0, 1167, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockTradeDayInfo") < 0)) __PYX_ERR(0, 1167, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_code_str = values[0];
    __pyx_v_update_dict = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockTradeDayInfo", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1167, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockTradeDayInfo.updateSingleStockTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_updateSingleStockTradeDayInfo(__pyx_self, __pyx_v_code_str, __pyx_v_update_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_updateSingleStockTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_code_str, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *__pyx_outer_scope;
  PyObject *__pyx_v_pre_close_first = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_mysql_table_name = NULL;
  PyObject *__pyx_v_max_date_row = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  unsigned int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_UCS4 __pyx_t_16;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockTradeDayInfo", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1170
 *             nonlocal no_fault
 *             # ,
 *             pre_close_first = 0             # <<<<<<<<<<<<<<
 *             start_date = self.start_date
 *             for year in reversed(self.year_list):
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_pre_close_first = __pyx_int_0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1171
 *             # ,
 *             pre_close_first = 0
 *             start_date = self.start_date             # <<<<<<<<<<<<<<
 *             for year in reversed(self.year_list):
 *                 mysql_table_name = table_base_name + '_' + year
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1171, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_start_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1172
 *             pre_close_first = 0
 *             start_date = self.start_date
 *             for year in reversed(self.year_list):             # <<<<<<<<<<<<<<
 *                 mysql_table_name = table_base_name + '_' + year
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1172, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_year_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_reversed, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1172, __pyx_L1_error)
        #else
        __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        #endif
      }
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1172, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF_SET(__pyx_v_year, __pyx_t_2);
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1173
 *             start_date = self.start_date
 *             for year in reversed(self.year_list):
 *                 mysql_table_name = table_base_name + '_' + year             # <<<<<<<<<<<<<<
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 *                     globals()[mysql_table_name].date.desc()).first()
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_table_base_name)) { __Pyx_RaiseClosureNameError("table_base_name"); __PYX_ERR(0, 1173, __pyx_L1_error) }
    __pyx_t_2 = PyNumber_Add(__pyx_cur_scope->__pyx_v_table_base_name, __pyx_n_s__67); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyNumber_Add(__pyx_t_2, __pyx_v_year); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1173, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF_SET(__pyx_v_mysql_table_name, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1174
 *             for year in reversed(self.year_list):
 *                 mysql_table_name = table_base_name + '_' + year
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(             # <<<<<<<<<<<<<<
 *                     globals()[mysql_table_name].date.desc()).first()
 *                 if not max_date_row:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_session); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_query); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_Globals(); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_mysql_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __pyx_t_8 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_10};
      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_filter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_mysql_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = PyObject_RichCompare(__pyx_t_7, __pyx_v_code_str, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_10};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_order_by); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1174, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1175
 *                 mysql_table_name = table_base_name + '_' + year
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 *                     globals()[mysql_table_name].date.desc()).first()             # <<<<<<<<<<<<<<
 *                 if not max_date_row:
 *                     continue
 */
    __pyx_t_10 = __Pyx_Globals(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_mysql_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_desc); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __pyx_t_10 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_10)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_10);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_first); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 0+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1175, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_max_date_row, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1176
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 *                     globals()[mysql_table_name].date.desc()).first()
 *                 if not max_date_row:             # <<<<<<<<<<<<<<
 *                     continue
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 */
    __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_row); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1176, __pyx_L1_error)
    __pyx_t_13 = (!__pyx_t_12);
    if (__pyx_t_13) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1177
 *                     globals()[mysql_table_name].date.desc()).first()
 *                 if not max_date_row:
 *                     continue             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 */
      goto __pyx_L3_continue;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1176
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 *                     globals()[mysql_table_name].date.desc()).first()
 *                 if not max_date_row:             # <<<<<<<<<<<<<<
 *                     continue
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1178
 *                 if not max_date_row:
 *                     continue
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")             # <<<<<<<<<<<<<<
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 */
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_date); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1178, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_kp_s_Y_m_d};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1178, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_max_date_table = __pyx_t_5;
    __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1179
 *                     continue
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close             # <<<<<<<<<<<<<<
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_close); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF_SET(__pyx_v_pre_close_first, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1180
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1180, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1180, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_13) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1181
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_is_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_max_date_table};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1181, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_13) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1182
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.dataproc.clearTableContentByCode(mysql_table_name, code_str)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_next_session); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_max_date_table};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strftime); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1182, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_kp_s_Y_m_d};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1181
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
        goto __pyx_L7;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1184
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 *                         self.dataproc.clearTableContentByCode(mysql_table_name, code_str)             # <<<<<<<<<<<<<<
 *                         if code_str not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(code_str)
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1184, __pyx_L1_error) }
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_clearTableContentByCode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1184, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_9, __pyx_v_mysql_table_name, __pyx_v_code_str};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 2+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1184, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1185
 *                     else:
 *                         self.dataproc.clearTableContentByCode(mysql_table_name, code_str)
 *                         if code_str not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(code_str)
 *                         no_fault = False
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1185, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1185, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_13) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1186
 *                         self.dataproc.clearTableContentByCode(mysql_table_name, code_str)
 *                         if code_str not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(code_str)             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")
 */
          __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1186, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_code_str); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1186, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1185
 *                     else:
 *                         self.dataproc.clearTableContentByCode(mysql_table_name, code_str)
 *                         if code_str not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(code_str)
 *                         no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1187
 *                         if code_str not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(code_str)
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")
 *                         return False
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1188
 *                             update_dict['failed_list'].append(code_str)
 *                         no_fault = False
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif max_date_table == self.latest_trade_day:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_15 = 0;
        __pyx_t_16 = 127;
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_code_str, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_INCREF(__pyx_kp_u_data_is_wrong_in);
        __pyx_t_15 += 18;
        __Pyx_GIVEREF(__pyx_kp_u_data_is_wrong_in);
        PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_kp_u_data_is_wrong_in);
        __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_mysql_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_6);
        PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_6);
        __pyx_t_6 = 0;
        __Pyx_INCREF(__pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_15 += 33;
        __Pyx_GIVEREF(__pyx_kp_u_so_execute_delete_its_all_data);
        PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1188, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        __pyx_t_9 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_6};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1188, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1189
 *                         no_fault = False
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")
 *                         return False             # <<<<<<<<<<<<<<
 *                 elif max_date_table == self.latest_trade_day:
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        goto __pyx_L0;
      }
      __pyx_L7:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1180
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
      goto __pyx_L6;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1190
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")
 *                         return False
 *                 elif max_date_table == self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 *                     if code_str not in update_dict['update_list']:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1190, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1190, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_13) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1191
 *                         return False
 *                 elif max_date_table == self.latest_trade_day:
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')             # <<<<<<<<<<<<<<
 *                     if code_str not in update_dict['update_list']:
 *                         update_dict['update_list'].append(code_str)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_15 = 0;
      __pyx_t_16 = 127;
      __Pyx_INCREF(__pyx_kp_u_StockTradeDayInfo_of);
      __pyx_t_15 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_StockTradeDayInfo_of);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_StockTradeDayInfo_of);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_code_str, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_16;
      __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_dont_need_to_update);
      __pyx_t_15 += 22;
      __Pyx_GIVEREF(__pyx_kp_u_dont_need_to_update);
      PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_dont_need_to_update);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1191, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_11 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_11 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_9};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1192
 *                 elif max_date_table == self.latest_trade_day:
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 *                     if code_str not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(code_str)
 *                     if code_str in update_dict['failed_list']:
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1192, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_13) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1193
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 *                     if code_str not in update_dict['update_list']:
 *                         update_dict['update_list'].append(code_str)             # <<<<<<<<<<<<<<
 *                     if code_str in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(code_str)
 */
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_code_str); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1192
 *                 elif max_date_table == self.latest_trade_day:
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 *                     if code_str not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(code_str)
 *                     if code_str in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1194
 *                     if code_str not in update_dict['update_list']:
 *                         update_dict['update_list'].append(code_str)
 *                     if code_str in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(code_str)
 *                     return True
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1194, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_13) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1195
 *                         update_dict['update_list'].append(code_str)
 *                     if code_str in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(code_str)             # <<<<<<<<<<<<<<
 *                     return True
 *                 break
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1195, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_11 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_11 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_code_str};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1195, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1194
 *                     if code_str not in update_dict['update_list']:
 *                         update_dict['update_list'].append(code_str)
 *                     if code_str in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(code_str)
 *                     return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1196
 *                     if code_str in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(code_str)
 *                     return True             # <<<<<<<<<<<<<<
 *                 break
 *             #
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1190
 *                         utils.logger.error(f"{code_str} data is wrong in {mysql_table_name}, so execute delete its all data.")
 *                         return False
 *                 elif max_date_table == self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f'StockTradeDayInfo of {code_str} dont need to update. ')
 *                     if code_str not in update_dict['update_list']:
 */
    }
    __pyx_L6:;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1197
 *                         update_dict['failed_list'].remove(code_str)
 *                     return True
 *                 break             # <<<<<<<<<<<<<<
 *             #
 *             res = False
 */
    goto __pyx_L4_break;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1172
 *             pre_close_first = 0
 *             start_date = self.start_date
 *             for year in reversed(self.year_list):             # <<<<<<<<<<<<<<
 *                 mysql_table_name = table_base_name + '_' + year
 *                 max_date_row = session.query(globals()[mysql_table_name]).filter(globals()[mysql_table_name].code == code_str).order_by(
 */
    __pyx_L3_continue:;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L11_for_end;
  __pyx_L4_break:;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  goto __pyx_L11_for_end;
  __pyx_L11_for_end:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1199
 *                 break
 *             #
 *             res = False             # <<<<<<<<<<<<<<
 *             if method == 'sina':
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 */
  __Pyx_INCREF(Py_False);
  __pyx_v_res = Py_False;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1200
 *             #
 *             res = False
 *             if method == 'sina':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'baostock':
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_method)) { __Pyx_RaiseClosureNameError("method"); __PYX_ERR(0, 1200, __pyx_L1_error) }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_method, __pyx_n_s_sina, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1200, __pyx_L1_error)
  if (__pyx_t_13) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1201
 *             res = False
 *             if method == 'sina':
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)             # <<<<<<<<<<<<<<
 *             elif method == 'baostock':
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1201, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_saveHistTradeDayInfoSina); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1201, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1201, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_code_str, __pyx_v_start_date, __pyx_t_9, __pyx_v_pre_close_first};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 4+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1201, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1200
 *             #
 *             res = False
 *             if method == 'sina':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'baostock':
 */
    goto __pyx_L12;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1202
 *             if method == 'sina':
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'baostock':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'em':
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_method)) { __Pyx_RaiseClosureNameError("method"); __PYX_ERR(0, 1202, __pyx_L1_error) }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_method, __pyx_n_s_baostock, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1202, __pyx_L1_error)
  if (__pyx_t_13) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1203
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'baostock':
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)             # <<<<<<<<<<<<<<
 *             elif method == 'em':
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1203, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_saveHistTradeDayInfoBaostock); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1203, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1203, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_code_str, __pyx_v_start_date, __pyx_t_9, __pyx_v_pre_close_first};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 4+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1203, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1202
 *             if method == 'sina':
 *                 res = self.saveHistTradeDayInfoSina(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'baostock':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'em':
 */
    goto __pyx_L12;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1204
 *             elif method == 'baostock':
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'em':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)
 * 
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_method)) { __Pyx_RaiseClosureNameError("method"); __PYX_ERR(0, 1204, __pyx_L1_error) }
  __pyx_t_13 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_method, __pyx_n_s_em, Py_EQ)); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
  if (__pyx_t_13) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1205
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'em':
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)             # <<<<<<<<<<<<<<
 * 
 *             if not res:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1205, __pyx_L1_error) }
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_saveHistTradeDayInfoEm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1205, __pyx_L1_error) }
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1205, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_code_str, __pyx_v_start_date, __pyx_t_9, __pyx_v_pre_close_first};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_11, 4+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1205, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    }
    __Pyx_DECREF_SET(__pyx_v_res, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1204
 *             elif method == 'baostock':
 *                 res = self.saveHistTradeDayInfoBaostock(code_str, start_date, self.latest_trade_day, pre_close_first)
 *             elif method == 'em':             # <<<<<<<<<<<<<<
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)
 * 
 */
  }
  __pyx_L12:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1207
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)
 * 
 *             if not res:             # <<<<<<<<<<<<<<
 *                 if code_str not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(code_str)
 */
  __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_13 < 0))) __PYX_ERR(0, 1207, __pyx_L1_error)
  __pyx_t_12 = (!__pyx_t_13);
  if (__pyx_t_12) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1208
 * 
 *             if not res:
 *                 if code_str not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(code_str)
 *                 no_fault = False
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1208, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_12) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1209
 *             if not res:
 *                 if code_str not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(code_str)             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 return False
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1209, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_code_str); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1209, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1208
 * 
 *             if not res:
 *                 if code_str not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(code_str)
 *                 no_fault = False
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1210
 *                 if code_str not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(code_str)
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
    __pyx_cur_scope->__pyx_v_no_fault = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1211
 *                     update_dict['failed_list'].append(code_str)
 *                 no_fault = False
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *             # update json file
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_False);
    __pyx_r = Py_False;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1207
 *                 res = self.saveHistTradeDayInfoEm(code_str, start_date, self.latest_trade_day, pre_close_first)
 * 
 *             if not res:             # <<<<<<<<<<<<<<
 *                 if code_str not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(code_str)
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1214
 * 
 *             # update json file
 *             if code_str not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['update_list'].append(code_str)
 *             if code_str in update_dict['failed_list']:
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1214, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_12) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1215
 *             # update json file
 *             if code_str not in update_dict['update_list']:
 *                 update_dict['update_list'].append(code_str)             # <<<<<<<<<<<<<<
 *             if code_str in update_dict['failed_list']:
 *                 update_dict['failed_list'].remove(code_str)
 */
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_code_str); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1215, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1214
 * 
 *             # update json file
 *             if code_str not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['update_list'].append(code_str)
 *             if code_str in update_dict['failed_list']:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1216
 *             if code_str not in update_dict['update_list']:
 *                 update_dict['update_list'].append(code_str)
 *             if code_str in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].remove(code_str)
 *             return True
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_code_str, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_12 < 0))) __PYX_ERR(0, 1216, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_12) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1217
 *                 update_dict['update_list'].append(code_str)
 *             if code_str in update_dict['failed_list']:
 *                 update_dict['failed_list'].remove(code_str)             # <<<<<<<<<<<<<<
 *             return True
 *             # utils.logger.info(f'Succeed to save {code_str} trade day info to table, index = {index}.')
 */
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1217, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_11 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_11 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_code_str};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_11, 1+__pyx_t_11);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1217, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1216
 *             if code_str not in update_dict['update_list']:
 *                 update_dict['update_list'].append(code_str)
 *             if code_str in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                 update_dict['failed_list'].remove(code_str)
 *             return True
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1218
 *             if code_str in update_dict['failed_list']:
 *                 update_dict['failed_list'].remove(code_str)
 *             return True             # <<<<<<<<<<<<<<
 *             # utils.logger.info(f'Succeed to save {code_str} trade day info to table, index = {index}.')
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1167
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockTradeDayInfo(code_str, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             # ,
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockTradeDayInfo.updateSingleStockTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pre_close_first);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_mysql_table_name);
  __Pyx_XDECREF(__pyx_v_max_date_row);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_36updateStockTradeDayInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_method, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_lg = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_updateSingleStockTradeDayInfo = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr3__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockTradeDayInfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1124, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_method = __pyx_v_method;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_method);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_method);
  __Pyx_INCREF(__pyx_v_multi_thread);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1134
 *         :return:
 *         '''
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_base_name = 'stock_trade_day'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1135
 *         '''
 *         fun_name = sys._getframe().f_code.co_name
 *         table_base_name = 'stock_trade_day'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_trade_day_2);
  __Pyx_GIVEREF(__pyx_n_s_stock_trade_day_2);
  __pyx_cur_scope->__pyx_v_table_base_name = __pyx_n_s_stock_trade_day_2;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1136
 *         fun_name = sys._getframe().f_code.co_name
 *         table_base_name = 'stock_trade_day'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         if method == 'baostock':
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1138
 *         no_fault = True
 * 
 *         if method == 'baostock':             # <<<<<<<<<<<<<<
 *             multi_thread = False
 *             ####  baostock  ####
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_method, __pyx_n_s_baostock, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1138, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1139
 * 
 *         if method == 'baostock':
 *             multi_thread = False             # <<<<<<<<<<<<<<
 *             ####  baostock  ####
 *             lg = bs.login()
 */
    __Pyx_INCREF(Py_False);
    __Pyx_DECREF_SET(__pyx_v_multi_thread, Py_False);

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1141
 *             multi_thread = False
 *             ####  baostock  ####
 *             lg = bs.login()             # <<<<<<<<<<<<<<
 *             print('baostock: login respond error_code:' + lg.error_code)
 *             print('baostock: login respond  error_msg:' + lg.error_msg)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_bs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_login); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_lg = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1142
 *             ####  baostock  ####
 *             lg = bs.login()
 *             print('baostock: login respond error_code:' + lg.error_code)             # <<<<<<<<<<<<<<
 *             print('baostock: login respond  error_msg:' + lg.error_msg)
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lg, __pyx_n_s_error_code); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_kp_s_baostock_login_respond_error_cod, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1143
 *             lg = bs.login()
 *             print('baostock: login respond error_code:' + lg.error_code)
 *             print('baostock: login respond  error_msg:' + lg.error_msg)             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lg, __pyx_n_s_error_msg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Add(__pyx_kp_s_baostock_login_respond_error_msg, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1138
 *         no_fault = True
 * 
 *         if method == 'baostock':             # <<<<<<<<<<<<<<
 *             multi_thread = False
 *             ####  baostock  ####
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1146
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1147
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1148
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_2) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1149
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_2) < 0) __PYX_ERR(0, 1147, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1152
 *                        }
 * 
 *         if self.has_update_file and (table_base_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_base_name]['updated']:
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_base_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1152, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1153
 * 
 *         if self.has_update_file and (table_base_name in self.update_json):
 *             if self.update_json[table_base_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_base_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1153, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1154
 *         if self.has_update_file and (table_base_name in self.update_json):
 *             if self.update_json[table_base_name]['updated']:
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_base_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1154, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1155
 *             if self.update_json[table_base_name]['updated']:
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_base_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1153
 * 
 *         if self.has_update_file and (table_base_name in self.update_json):
 *             if self.update_json[table_base_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1157
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_base_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_base_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_base_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1157, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1158
 *             else:
 *                 update_dict = self.update_json[table_base_name]
 *                 updated_list = self.update_json[table_base_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {method}")
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_base_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_2);
      __pyx_t_2 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1152
 *                        }
 * 
 *         if self.has_update_file and (table_base_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_base_name]['updated']:
 *                 utils.logger.info(f'The {table_base_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1160
 *                 updated_list = self.update_json[table_base_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {method}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Beginning);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__21);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_method, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1163
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1164
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_update_range = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1165
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleStockTradeDayInfo(code_str, update_dict):
 */
  { /* enter inner scope */
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_2);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1165, __pyx_L10_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1165, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1165, __pyx_L10_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1165, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1165, __pyx_L10_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1165, __pyx_L10_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_x, __pyx_t_3);
      __pyx_t_3 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr3__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1165, __pyx_L10_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_8genexpr3__pyx_v_x))) __PYX_ERR(0, 1165, __pyx_L10_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_x); __pyx_8genexpr3__pyx_v_x = 0;
    goto __pyx_L15_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_x); __pyx_8genexpr3__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L15_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1167
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockTradeDayInfo(code_str, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             # ,
 */
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_1updateSingleStockTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateStockTradeDayI, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_updateSingleStockTradeDayInfo = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1221
 *             # utils.logger.info(f'Succeed to save {code_str} trade day info to table, index = {index}.')
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1221, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1223
 *         if not multi_thread:
 *             #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1223, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_start_time = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1224
 *             #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 *                 current_time = time.time()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_update_range)) __PYX_ERR(0, 1224, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 1224, __pyx_L1_error)
    __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
      __pyx_t_1 = __pyx_t_9; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1224, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1224, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1224, __pyx_L1_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1224, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1224, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1225
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      __pyx_t_9 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockTradeDayInfo_updateSingleStockTradeDayInfo(__pyx_v_updateSingleStockTradeDayInfo, __pyx_v_stock_code, __pyx_v_update_dict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1225, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1226
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_base_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1226, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1226, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_9);
      __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1227
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_base_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_9 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyObject_RichCompare(__pyx_t_9, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1227, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1228
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_base_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1228, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_base_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1228, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1229
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_base_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         else:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1229, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_9)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_9);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1229, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1230
 *                     self.update_json[table_base_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1227
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_base_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1224
 *             #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockTradeDayInfo(stock_code, update_dict)
 *                 current_time = time.time()
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1221
 *             # utils.logger.info(f'Succeed to save {code_str} trade day info to table, index = {index}.')
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1233
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1233, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1233, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1234
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_v_futures = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1235
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1235, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1235, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_v_start_time = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1236
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 *                     futures.append(future)
 */
            __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1236, __pyx_L25_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1236, __pyx_L25_error)
              #else
              __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1236, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_3);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1237
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1237, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_updateSingleStockTradeDayInfo, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1237, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1238
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1238, __pyx_L25_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1236
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1239
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L25_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 1239, __pyx_L25_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1239, __pyx_L25_error)
            __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_9) < 0) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1239, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
              __pyx_t_3 = __pyx_t_9; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1239, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1239, __pyx_L25_error)
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1239, __pyx_L25_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1239, __pyx_L25_error)
                  #else
                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1239, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1239, __pyx_L25_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1239, __pyx_L25_error)
                  #else
                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1239, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                }
              } else {
                __pyx_t_9 = __pyx_t_10(__pyx_t_3);
                if (unlikely(!__pyx_t_9)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1239, __pyx_L25_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_9);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1240
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_base_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1240, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1240, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1241
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_base_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_9 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1241, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = PyObject_RichCompare(__pyx_t_9, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1241, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1241, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (__pyx_t_6) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1242
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_base_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_2);
                if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_base_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1242, __pyx_L25_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1243
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_base_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         if no_fault:
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1243, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_9 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_9)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_9);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1243, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1244
 *                         self.update_json[table_base_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1241
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_base_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1239
 *                     future = executor.submit(updateSingleStockTradeDayInfo, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1233
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L30_try_end;
          __pyx_L25_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1233, __pyx_L27_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_9 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1233, __pyx_L27_except_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1233, __pyx_L27_except_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1233, __pyx_L27_except_error)
            __pyx_t_5 = (!__pyx_t_6);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_2, __pyx_t_1);
              __pyx_t_3 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 1233, __pyx_L27_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L26_exception_handled;
          }
          __pyx_L27_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L26_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L30_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_11) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1233, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L24;
        }
        __pyx_L24:;
      }
      goto __pyx_L41;
      __pyx_L21_error:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L1_error;
      __pyx_L41:;
    }
  }
  __pyx_L16:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1245
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_base_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1246
 *                         start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_base_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1246, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1245
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_base_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1247
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_base_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 *         if method == 'baostock':
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_base_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1247, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1248
 *             update_dict['updated'] = True
 *         self.update_json[table_base_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         if method == 'baostock':
 *             bs.logout()  #
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1248, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1249
 *         self.update_json[table_base_name] = update_dict
 *         self.dumpJsonToFile()
 *         if method == 'baostock':             # <<<<<<<<<<<<<<
 *             bs.logout()  #
 * 
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_method, __pyx_n_s_baostock, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1249, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1250
 *         self.dumpJsonToFile()
 *         if method == 'baostock':
 *             bs.logout()  #             # <<<<<<<<<<<<<<
 * 
 *     def fixTradeDayNullValue(self):
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logout); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1250, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1250, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1249
 *         self.update_json[table_base_name] = update_dict
 *         self.dumpJsonToFile()
 *         if method == 'baostock':             # <<<<<<<<<<<<<<
 *             bs.logout()  #
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_lg);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_updateSingleStockTradeDayInfo);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr3__pyx_v_x);
  __Pyx_XDECREF(__pyx_v_multi_thread);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1252
 *             bs.logout()  #
 * 
 *     def fixTradeDayNullValue(self):             # <<<<<<<<<<<<<<
 *         '''
 *         null
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_39fixTradeDayNullValue(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38fixTradeDayNullValue, "\n        \345\233\240\344\270\272\346\233\264\346\226\260\346\227\245\344\272\244\346\230\223\346\225\260\346\215\256\345\220\216\357\274\214\344\274\232\345\255\230\345\234\250\346\234\200\350\277\221\344\270\200\344\270\252\344\272\244\346\230\223\346\227\245\345\220\216\345\244\215\346\235\203\346\224\266\347\233\230\344\273\267\344\270\272null\347\232\204\346\203\205\345\206\265\357\274\214\350\277\231\344\270\252\345\207\275\346\225\260\345\257\271\345\205\266\350\277\233\350\241\214\344\277\256\345\244\215\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_39fixTradeDayNullValue = {"fixTradeDayNullValue", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_39fixTradeDayNullValue, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38fixTradeDayNullValue};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_39fixTradeDayNullValue(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("fixTradeDayNullValue (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fixTradeDayNullValue") < 0)) __PYX_ERR(0, 1252, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("fixTradeDayNullValue", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1252, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.fixTradeDayNullValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38fixTradeDayNullValue(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38fixTradeDayNullValue(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_v_null_list = NULL;
  PyObject *__pyx_v_year = NULL;
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_null_rows = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_row_date = NULL;
  PyObject *__pyx_v_row_code = NULL;
  PyObject *__pyx_v_stock_zh_a_hist_sina_qfq = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  unsigned int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  PyObject *(*__pyx_t_12)(PyObject *);
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_t_19;
  Py_ssize_t __pyx_t_20;
  Py_UCS4 __pyx_t_21;
  int __pyx_t_22;
  char const *__pyx_t_23;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  PyObject *__pyx_t_27 = NULL;
  PyObject *__pyx_t_28 = NULL;
  PyObject *__pyx_t_29 = NULL;
  int __pyx_t_30;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("fixTradeDayNullValue", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1257
 *         :return:
 *         '''
 *         null_list = []             # <<<<<<<<<<<<<<
 *         for year in self.year_list:
 *             table_name = 'stock_trade_day_' + year
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_null_list = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1258
 *         '''
 *         null_list = []
 *         for year in self.year_list:             # <<<<<<<<<<<<<<
 *             table_name = 'stock_trade_day_' + year
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_year_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1258, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1258, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_4)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
          #endif
          if (__pyx_t_3 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely((0 < 0))) __PYX_ERR(0, 1258, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 1258, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF_SET(__pyx_v_year, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1259
 *         null_list = []
 *         for year in self.year_list:
 *             table_name = 'stock_trade_day_' + year             # <<<<<<<<<<<<<<
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()
 * 
 */
    __pyx_t_1 = PyNumber_Add(__pyx_n_s_stock_trade_day, __pyx_v_year); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1259, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF_SET(__pyx_v_table_name, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1260
 *         for year in self.year_list:
 *             table_name = 'stock_trade_day_' + year
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()             # <<<<<<<<<<<<<<
 * 
 *             for row in null_rows:
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_session); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_query); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_9};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_filter); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_9 = __Pyx_Globals(); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_qfq_close); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_is); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, Py_None};
      __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_6};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_all); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1260, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_null_rows, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1262
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()
 * 
 *             for row in null_rows:             # <<<<<<<<<<<<<<
 *                 print("null value: row_id=%d, row_date=%s, row_code=%s" % (row.id, row.date, row.code))
 *                 row_date = row.date.strftime('%Y%m%d')
 */
    if (likely(PyList_CheckExact(__pyx_v_null_rows)) || PyTuple_CheckExact(__pyx_v_null_rows)) {
      __pyx_t_1 = __pyx_v_null_rows; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_11 = 0;
      __pyx_t_12 = NULL;
    } else {
      __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_null_rows); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_12 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1262, __pyx_L1_error)
    }
    for (;;) {
      if (likely(!__pyx_t_12)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
            #endif
            if (__pyx_t_11 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_8); __pyx_t_11++; if (unlikely((0 < 0))) __PYX_ERR(0, 1262, __pyx_L1_error)
          #else
          __pyx_t_8 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1262, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_8);
          #endif
        }
      } else {
        __pyx_t_8 = __pyx_t_12(__pyx_t_1);
        if (unlikely(!__pyx_t_8)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1262, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_8);
      }
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_8);
      __pyx_t_8 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1263
 * 
 *             for row in null_rows:
 *                 print("null value: row_id=%d, row_date=%s, row_code=%s" % (row.id, row.date, row.code))             # <<<<<<<<<<<<<<
 *                 row_date = row.date.strftime('%Y%m%d')
 *                 row_code = utils.getFullStockCode(row.code)
 */
      __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_n_s_id); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_8);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_n_s_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_8);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_5);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5)) __PYX_ERR(0, 1263, __pyx_L1_error);
      __Pyx_GIVEREF(__pyx_t_6);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error);
      __pyx_t_8 = 0;
      __pyx_t_5 = 0;
      __pyx_t_6 = 0;
      __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_null_value_row_id_d_row_date_s_r, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1263, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1264
 *             for row in null_rows:
 *                 print("null value: row_id=%d, row_date=%s, row_code=%s" % (row.id, row.date, row.code))
 *                 row_date = row.date.strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1264, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_row_date, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1265
 *                 print("null value: row_id=%d, row_date=%s, row_code=%s" % (row.id, row.date, row.code))
 *                 row_date = row.date.strftime('%Y%m%d')
 *                 row_code = utils.getFullStockCode(row.code)             # <<<<<<<<<<<<<<
 *                 try:
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_row, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = NULL;
      __pyx_t_10 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_8)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_8);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_10 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_5};
        __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1265, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_row_code, __pyx_t_7);
      __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1266
 *                 row_date = row.date.strftime('%Y%m%d')
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:             # <<<<<<<<<<<<<<
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,
 *                                                                    end_date=row_date,
 */
      {
        __Pyx_PyThreadState_declare
        __Pyx_PyThreadState_assign
        __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
        __Pyx_XGOTREF(__pyx_t_13);
        __Pyx_XGOTREF(__pyx_t_14);
        __Pyx_XGOTREF(__pyx_t_15);
        /*try:*/ {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1267
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,             # <<<<<<<<<<<<<<
 *                                                                    end_date=row_date,
 *                                                                    adjust="qfq")
 */
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ak); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1267, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_stock_zh_a_daily); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1267, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_7);
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_symbol, __pyx_v_row_code) < 0) __PYX_ERR(0, 1267, __pyx_L7_error)
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_start_date, __pyx_v_row_date) < 0) __PYX_ERR(0, 1267, __pyx_L7_error)

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1268
 *                 try:
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,
 *                                                                    end_date=row_date,             # <<<<<<<<<<<<<<
 *                                                                    adjust="qfq")
 *                 except Exception as e:
 */
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_end_date, __pyx_v_row_date) < 0) __PYX_ERR(0, 1267, __pyx_L7_error)
          if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_adjust, __pyx_n_s_qfq) < 0) __PYX_ERR(0, 1267, __pyx_L7_error)

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1267
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,             # <<<<<<<<<<<<<<
 *                                                                    end_date=row_date,
 *                                                                    adjust="qfq")
 */
          __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1267, __pyx_L7_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF_SET(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_t_5);
          __pyx_t_5 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1266
 *                 row_date = row.date.strftime('%Y%m%d')
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:             # <<<<<<<<<<<<<<
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,
 *                                                                    end_date=row_date,
 */
        }
        __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
        goto __pyx_L14_try_end;
        __pyx_L7_error:;
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1270
 *                                                                    end_date=row_date,
 *                                                                    adjust="qfq")
 *                 except Exception as e:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f'Failed to call ak.stock_zh_a_daily: {e}')
 *                     null_list.append((row_date, row_code))
 */
        __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
        if (__pyx_t_16) {
          __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.fixTradeDayNullValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
          if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_7, &__pyx_t_6) < 0) __PYX_ERR(0, 1270, __pyx_L9_except_error)
          __Pyx_XGOTREF(__pyx_t_5);
          __Pyx_XGOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_7);
          __pyx_v_e = __pyx_t_7;
          /*try:*/ {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1271
 *                                                                    adjust="qfq")
 *                 except Exception as e:
 *                     utils.logger.error(f'Failed to call ak.stock_zh_a_daily: {e}')             # <<<<<<<<<<<<<<
 *                     null_list.append((row_date, row_code))
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1271, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1271, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_17, __pyx_n_s_error); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1271, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1271, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_18 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1271, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            __pyx_t_17 = NULL;
            __pyx_t_10 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_17)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_17);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_10 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_17, __pyx_t_18};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1271, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1272
 *                 except Exception as e:
 *                     utils.logger.error(f'Failed to call ak.stock_zh_a_daily: {e}')
 *                     null_list.append((row_date, row_code))             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')
 *                     continue
 */
            __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1272, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_8);
            __Pyx_INCREF(__pyx_v_row_date);
            __Pyx_GIVEREF(__pyx_v_row_date);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_row_date)) __PYX_ERR(0, 1272, __pyx_L20_error);
            __Pyx_INCREF(__pyx_v_row_code);
            __Pyx_GIVEREF(__pyx_v_row_code);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_row_code)) __PYX_ERR(0, 1272, __pyx_L20_error);
            __pyx_t_19 = __Pyx_PyList_Append(__pyx_v_null_list, __pyx_t_8); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1272, __pyx_L20_error)
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1273
 *                     utils.logger.error(f'Failed to call ak.stock_zh_a_daily: {e}')
 *                     null_list.append((row_date, row_code))
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')             # <<<<<<<<<<<<<<
 *                     continue
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_18 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = PyTuple_New(5); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_20 = 0;
            __pyx_t_21 = 127;
            __Pyx_INCREF(__pyx_kp_u_Failed_date_is);
            __pyx_t_20 += 15;
            __Pyx_GIVEREF(__pyx_kp_u_Failed_date_is);
            PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_kp_u_Failed_date_is);
            __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_row_date, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_21 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_21) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_21;
            __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
            __Pyx_GIVEREF(__pyx_t_17);
            PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_17);
            __pyx_t_17 = 0;
            __Pyx_INCREF(__pyx_kp_u_code_is);
            __pyx_t_20 += 10;
            __Pyx_GIVEREF(__pyx_kp_u_code_is);
            PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_kp_u_code_is);
            __pyx_t_17 = __Pyx_PyObject_FormatSimple(__pyx_v_row_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_21 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) > __pyx_t_21) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_17) : __pyx_t_21;
            __pyx_t_20 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_17);
            __Pyx_GIVEREF(__pyx_t_17);
            PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_17);
            __pyx_t_17 = 0;
            __Pyx_INCREF(__pyx_kp_u__5);
            __pyx_t_20 += 1;
            __Pyx_GIVEREF(__pyx_kp_u__5);
            PyTuple_SET_ITEM(__pyx_t_18, 4, __pyx_kp_u__5);
            __pyx_t_17 = __Pyx_PyUnicode_Join(__pyx_t_18, 5, __pyx_t_20, __pyx_t_21); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1273, __pyx_L20_error)
            __Pyx_GOTREF(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            __pyx_t_18 = NULL;
            __pyx_t_10 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_18)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_18);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_10 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_18, __pyx_t_17};
              __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
              if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1273, __pyx_L20_error)
              __Pyx_GOTREF(__pyx_t_8);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1274
 *                     null_list.append((row_date, row_code))
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')
 *                     continue             # <<<<<<<<<<<<<<
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']
 *             session.commit()
 */
            goto __pyx_L17_continue;
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1270
 *                                                                    end_date=row_date,
 *                                                                    adjust="qfq")
 *                 except Exception as e:             # <<<<<<<<<<<<<<
 *                     utils.logger.error(f'Failed to call ak.stock_zh_a_daily: {e}')
 *                     null_list.append((row_date, row_code))
 */
          /*finally:*/ {
            __pyx_L20_error:;
            /*exception exit:*/{
              __Pyx_PyThreadState_declare
              __Pyx_PyThreadState_assign
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
              __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
              __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_27, &__pyx_t_28, &__pyx_t_29);
              if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_24);
              __Pyx_XGOTREF(__pyx_t_25);
              __Pyx_XGOTREF(__pyx_t_26);
              __Pyx_XGOTREF(__pyx_t_27);
              __Pyx_XGOTREF(__pyx_t_28);
              __Pyx_XGOTREF(__pyx_t_29);
              __pyx_t_16 = __pyx_lineno; __pyx_t_22 = __pyx_clineno; __pyx_t_23 = __pyx_filename;
              {
                __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
              }
              if (PY_MAJOR_VERSION >= 3) {
                __Pyx_XGIVEREF(__pyx_t_27);
                __Pyx_XGIVEREF(__pyx_t_28);
                __Pyx_XGIVEREF(__pyx_t_29);
                __Pyx_ExceptionReset(__pyx_t_27, __pyx_t_28, __pyx_t_29);
              }
              __Pyx_XGIVEREF(__pyx_t_24);
              __Pyx_XGIVEREF(__pyx_t_25);
              __Pyx_XGIVEREF(__pyx_t_26);
              __Pyx_ErrRestore(__pyx_t_24, __pyx_t_25, __pyx_t_26);
              __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0; __pyx_t_27 = 0; __pyx_t_28 = 0; __pyx_t_29 = 0;
              __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_22; __pyx_filename = __pyx_t_23;
              goto __pyx_L9_except_error;
            }
            __pyx_L17_continue: {
              __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
              goto __pyx_L15_except_continue;
            }
          }
          __pyx_L15_except_continue:;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          goto __pyx_L13_try_continue;
        }
        goto __pyx_L9_except_error;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1266
 *                 row_date = row.date.strftime('%Y%m%d')
 *                 row_code = utils.getFullStockCode(row.code)
 *                 try:             # <<<<<<<<<<<<<<
 *                     stock_zh_a_hist_sina_qfq = ak.stock_zh_a_daily(symbol=row_code, start_date=row_date,
 *                                                                    end_date=row_date,
 */
        __pyx_L9_except_error:;
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        goto __pyx_L1_error;
        __pyx_L13_try_continue:;
        __Pyx_XGIVEREF(__pyx_t_13);
        __Pyx_XGIVEREF(__pyx_t_14);
        __Pyx_XGIVEREF(__pyx_t_15);
        __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
        goto __pyx_L5_continue;
        __pyx_L14_try_end:;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1275
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')
 *                     continue
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']             # <<<<<<<<<<<<<<
 *             session.commit()
 *         session.close()
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_hist_sina_qfq, __pyx_n_s_loc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_tuple__70); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1275, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_row, __pyx_n_s_qfq_close, __pyx_t_7) < 0) __PYX_ERR(0, 1275, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1262
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()
 * 
 *             for row in null_rows:             # <<<<<<<<<<<<<<
 *                 print("null value: row_id=%d, row_date=%s, row_code=%s" % (row.id, row.date, row.code))
 *                 row_date = row.date.strftime('%Y%m%d')
 */
      __pyx_L5_continue:;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1276
 *                     continue
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']
 *             session.commit()             # <<<<<<<<<<<<<<
 *         session.close()
 * 
 */
    __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_session); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_commit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1276, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __pyx_t_7 = NULL;
    __pyx_t_10 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
        __pyx_t_10 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1258
 *         '''
 *         null_list = []
 *         for year in self.year_list:             # <<<<<<<<<<<<<<
 *             table_name = 'stock_trade_day_' + year
 *             null_rows = session.query(globals()[table_name]).filter(globals()[table_name].qfq_close.is_(None)).all()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1277
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']
 *             session.commit()
 *         session.close()             # <<<<<<<<<<<<<<
 * 
 *         if len(null_list) == 0:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_10 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_10 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_10, 0+__pyx_t_10);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1277, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1279
 *         session.close()
 * 
 *         if len(null_list) == 0:             # <<<<<<<<<<<<<<
 *             return True, []
 *         else:
 */
  __pyx_t_3 = __Pyx_PyList_GET_SIZE(__pyx_v_null_list); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1279, __pyx_L1_error)
  __pyx_t_30 = (__pyx_t_3 == 0);
  if (__pyx_t_30) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1280
 * 
 *         if len(null_list) == 0:
 *             return True, []             # <<<<<<<<<<<<<<
 *         else:
 *             return False, null_list
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1280, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(Py_True);
    __Pyx_GIVEREF(Py_True);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_True)) __PYX_ERR(0, 1280, __pyx_L1_error);
    __Pyx_GIVEREF(__pyx_t_2);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2)) __PYX_ERR(0, 1280, __pyx_L1_error);
    __pyx_t_2 = 0;
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1279
 *         session.close()
 * 
 *         if len(null_list) == 0:             # <<<<<<<<<<<<<<
 *             return True, []
 *         else:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1282
 *             return True, []
 *         else:
 *             return False, null_list             # <<<<<<<<<<<<<<
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:
 */
  /*else*/ {
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_INCREF(Py_False);
    __Pyx_GIVEREF(Py_False);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, Py_False)) __PYX_ERR(0, 1282, __pyx_L1_error);
    __Pyx_INCREF(__pyx_v_null_list);
    __Pyx_GIVEREF(__pyx_v_null_list);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_null_list)) __PYX_ERR(0, 1282, __pyx_L1_error);
    __pyx_r = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1252
 *             bs.logout()  #
 * 
 *     def fixTradeDayNullValue(self):             # <<<<<<<<<<<<<<
 *         '''
 *         null
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_17);
  __Pyx_XDECREF(__pyx_t_18);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.fixTradeDayNullValue", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_null_list);
  __Pyx_XDECREF(__pyx_v_year);
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_null_rows);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_row_date);
  __Pyx_XDECREF(__pyx_v_row_code);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_hist_sina_qfq);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_41updateStockIndustryConceptBasicInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_41updateStockIndustryConceptBasicInfo = {"updateStockIndustryConceptBasicInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_41updateStockIndustryConceptBasicInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_41updateStockIndustryConceptBasicInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockIndustryConceptBasicInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mode,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_industry)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockIndustryConceptBasicInfo") < 0)) __PYX_ERR(0, 1284, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_multi_thread = values[2];
    __pyx_v_workers = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockIndustryConceptBasicInfo", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1284, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_40updateStockIndustryConceptBasicInfo(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1317
 *         update_range = range(0, rows)
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:             # <<<<<<<<<<<<<<
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_1getIndustryConceptConsText(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_1getIndustryConceptConsText = {"getIndustryConceptConsText", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_1getIndustryConceptConsText, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_1getIndustryConceptConsText(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_industry_concept_basic = 0;
  PyObject *__pyx_v_i = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getIndustryConceptConsText (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_industry_concept_basic,&__pyx_n_s_i,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_industry_concept_basic)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_i)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getIndustryConceptConsText", 1, 2, 2, 1); __PYX_ERR(0, 1317, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getIndustryConceptConsText") < 0)) __PYX_ERR(0, 1317, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_stock_industry_concept_basic = values[0];
    __pyx_v_i = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getIndustryConceptConsText", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1317, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo.getIndustryConceptConsText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_getIndustryConceptConsText(__pyx_self, __pyx_v_stock_industry_concept_basic, __pyx_v_i);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_getIndustryConceptConsText(PyObject *__pyx_self, PyObject *__pyx_v_stock_industry_concept_basic, PyObject *__pyx_v_i) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *__pyx_outer_scope;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_industry_or_concept_cons_df = NULL;
  PyObject *__pyx_v_combined_codes = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  Py_ssize_t __pyx_t_12;
  Py_UCS4 __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  unsigned int __pyx_t_15;
  int __pyx_t_16;
  char const *__pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getIndustryConceptConsText", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1318
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:
 *             name = stock_industry_concept_basic.loc[i, 'name']             # <<<<<<<<<<<<<<
 *             try:
 *                 # ---
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_concept_basic, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i)) __PYX_ERR(0, 1318, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_name);
  __Pyx_GIVEREF(__pyx_n_s_name);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_name)) __PYX_ERR(0, 1318, __pyx_L1_error);
  __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1318, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_name = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1319
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
    __Pyx_XGOTREF(__pyx_t_4);
    __Pyx_XGOTREF(__pyx_t_5);
    __Pyx_XGOTREF(__pyx_t_6);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1321
 *             try:
 *                 # ---
 *                 if mode == 'industry':             # <<<<<<<<<<<<<<
 *                     industry_or_concept_cons_df = ak.stock_board_industry_cons_em(symbol=name)
 *                 else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1321, __pyx_L3_error) }
      __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1321, __pyx_L3_error)
      if (__pyx_t_7) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1322
 *                 # ---
 *                 if mode == 'industry':
 *                     industry_or_concept_cons_df = ak.stock_board_industry_cons_em(symbol=name)             # <<<<<<<<<<<<<<
 *                 else:
 *                     industry_or_concept_cons_df = ak.stock_board_concept_cons_em(symbol=name)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ak); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stock_board_industry_cons_em); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_symbol, __pyx_v_name) < 0) __PYX_ERR(0, 1322, __pyx_L3_error)
        __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_v_industry_or_concept_cons_df = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1321
 *             try:
 *                 # ---
 *                 if mode == 'industry':             # <<<<<<<<<<<<<<
 *                     industry_or_concept_cons_df = ak.stock_board_industry_cons_em(symbol=name)
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1324
 *                     industry_or_concept_cons_df = ak.stock_board_industry_cons_em(symbol=name)
 *                 else:
 *                     industry_or_concept_cons_df = ak.stock_board_concept_cons_em(symbol=name)             # <<<<<<<<<<<<<<
 * 
 *                 combined_codes = ','.join(industry_or_concept_cons_df[''])
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_board_concept_cons_em); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1324, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_name) < 0) __PYX_ERR(0, 1324, __pyx_L3_error)
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_industry_or_concept_cons_df = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      __pyx_L9:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1326
 *                     industry_or_concept_cons_df = ak.stock_board_concept_cons_em(symbol=name)
 * 
 *                 combined_codes = ','.join(industry_or_concept_cons_df[''])             # <<<<<<<<<<<<<<
 *                 stock_industry_concept_basic.loc[i, 'cons_stocks'] = combined_codes
 *             except Exception as e:
 */
      __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_industry_or_concept_cons_df, __pyx_kp_s__51); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyString_Join(__pyx_kp_s__8, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_v_combined_codes = ((PyObject*)__pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1327
 * 
 *                 combined_codes = ','.join(industry_or_concept_cons_df[''])
 *                 stock_industry_concept_basic.loc[i, 'cons_stocks'] = combined_codes             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_concept_basic, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_i)) __PYX_ERR(0, 1327, __pyx_L3_error);
      __Pyx_INCREF(__pyx_n_s_cons_stocks);
      __Pyx_GIVEREF(__pyx_n_s_cons_stocks);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_cons_stocks)) __PYX_ERR(0, 1327, __pyx_L3_error);
      if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_v_combined_codes) < 0))) __PYX_ERR(0, 1327, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1319
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
    }
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1328
 *                 combined_codes = ','.join(industry_or_concept_cons_df[''])
 *                 stock_industry_concept_basic.loc[i, 'cons_stocks'] = combined_codes
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")
 *                 return False
 */
    __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_8) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo.getIndustryConceptConsText", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 1328, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1329
 *                 stock_industry_concept_basic.loc[i, 'cons_stocks'] = combined_codes
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")             # <<<<<<<<<<<<<<
 *                 return False
 *             return True
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = PyTuple_New(6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = 0;
        __pyx_t_13 = 127;
        if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1329, __pyx_L15_error) }
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_board_c);
        __pyx_t_12 += 51;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_board_c);
        PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_kp_u_Failed_to_call_ak_stock_board_c);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 2, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_12 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_kp_u__21);
        __pyx_t_14 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_13 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) > __pyx_t_13) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_14) : __pyx_t_13;
        __pyx_t_12 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_14);
        __Pyx_GIVEREF(__pyx_t_14);
        PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_14);
        __pyx_t_14 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_12 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_kp_u__22);
        __pyx_t_14 = __Pyx_PyUnicode_Join(__pyx_t_11, 6, __pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1329, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_15 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_15 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_14};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_15, 1+__pyx_t_15);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1329, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1330
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")
 *                 return False             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L14_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1328
 *                 combined_codes = ','.join(industry_or_concept_cons_df[''])
 *                 stock_industry_concept_basic.loc[i, 'cons_stocks'] = combined_codes
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")
 *                 return False
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_22, &__pyx_t_23);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20) < 0)) __Pyx_ErrFetch(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_18);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __pyx_t_8 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_17 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_22, __pyx_t_23);
          }
          __Pyx_XGIVEREF(__pyx_t_18);
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_ErrRestore(__pyx_t_18, __pyx_t_19, __pyx_t_20);
          __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0;
          __pyx_lineno = __pyx_t_8; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_17;
          goto __pyx_L5_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_23 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_23;
          __pyx_t_23 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1319
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_4);
    __Pyx_XGIVEREF(__pyx_t_5);
    __Pyx_XGIVEREF(__pyx_t_6);
    __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1331
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_cons_em for name = {name}: {e} ")
 *                 return False
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1317
 *         update_range = range(0, rows)
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:             # <<<<<<<<<<<<<<
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo.getIndustryConceptConsText", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_industry_or_concept_cons_df);
  __Pyx_XDECREF(__pyx_v_combined_codes);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_40updateStockIndustryConceptBasicInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_stock_industry_concept_basic = NULL;
  PyObject *__pyx_v_industry_or_concept_name_df = NULL;
  PyObject *__pyx_v_rows = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_getIndustryConceptConsText = 0;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_default_date = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  int __pyx_t_21;
  char const *__pyx_t_22;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  PyObject *__pyx_t_26 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockIndustryConceptBasicInfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1284, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_mode = __pyx_v_mode;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mode);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mode);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1285
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         if mode == 'industry':
 *             table_name = 'stock_industry_basic_info'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1285, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1286
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_industry_basic_info'
 *         else:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1286, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1287
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 *             table_name = 'stock_industry_basic_info'             # <<<<<<<<<<<<<<
 *         else:
 *             table_name = 'stock_concept_basic_info'
 */
    __Pyx_INCREF(__pyx_n_s_stock_industry_basic_info);
    __pyx_v_table_name = __pyx_n_s_stock_industry_basic_info;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1286
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_industry_basic_info'
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1289
 *             table_name = 'stock_industry_basic_info'
 *         else:
 *             table_name = 'stock_concept_basic_info'             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_stock_concept_basic_info);
    __pyx_v_table_name = __pyx_n_s_stock_concept_basic_info;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1292
 * 
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1292, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1293
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1293, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1294
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1294, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1295
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1293
 *         #
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1292
 * 
 *         #
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1297
 *                 return True
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")             # <<<<<<<<<<<<<<
 * 
 *         dtype_mapping = get_table_columns(globals()[table_name])
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Beginning);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__21);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1297, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1299
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")
 * 
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1299, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1299, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1300
 * 
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_industry_concept_basic = pd.DataFrame(columns=list(dtype_mapping.keys()))
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1300, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1301
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 *         stock_industry_concept_basic = pd.DataFrame(columns=list(dtype_mapping.keys()))
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1301, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1301, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1300
 * 
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 *         stock_industry_concept_basic = pd.DataFrame(columns=list(dtype_mapping.keys()))
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1302
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 *         stock_industry_concept_basic = pd.DataFrame(columns=list(dtype_mapping.keys()))             # <<<<<<<<<<<<<<
 * 
 *         # ---
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_pd); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_DataFrame); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_10 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_10)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_10);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1302, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_stock_industry_concept_basic = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1305
 * 
 *         # ---
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             industry_or_concept_name_df = ak.stock_board_industry_name_em()
 *         else:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1305, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1306
 *         # ---
 *         if mode == 'industry':
 *             industry_or_concept_name_df = ak.stock_board_industry_name_em()             # <<<<<<<<<<<<<<
 *         else:
 *             industry_or_concept_name_df = ak.stock_board_concept_name_em()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_board_industry_name_em); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1306, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1306, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_industry_or_concept_name_df = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1305
 * 
 *         # ---
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             industry_or_concept_name_df = ak.stock_board_industry_name_em()
 *         else:
 */
    goto __pyx_L9;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1308
 *             industry_or_concept_name_df = ak.stock_board_industry_name_em()
 *         else:
 *             industry_or_concept_name_df = ak.stock_board_concept_name_em()             # <<<<<<<<<<<<<<
 *         stock_industry_concept_basic['code'] = industry_or_concept_name_df['']
 *         stock_industry_concept_basic['name'] = industry_or_concept_name_df['']
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ak); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stock_board_concept_name_em); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1308, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_industry_or_concept_name_df = __pyx_t_2;
    __pyx_t_2 = 0;
  }
  __pyx_L9:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1309
 *         else:
 *             industry_or_concept_name_df = ak.stock_board_concept_name_em()
 *         stock_industry_concept_basic['code'] = industry_or_concept_name_df['']             # <<<<<<<<<<<<<<
 *         stock_industry_concept_basic['name'] = industry_or_concept_name_df['']
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_industry_or_concept_name_df, __pyx_kp_s__71); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely((PyObject_SetItem(__pyx_v_stock_industry_concept_basic, __pyx_n_s_code, __pyx_t_2) < 0))) __PYX_ERR(0, 1309, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1310
 *             industry_or_concept_name_df = ak.stock_board_concept_name_em()
 *         stock_industry_concept_basic['code'] = industry_or_concept_name_df['']
 *         stock_industry_concept_basic['name'] = industry_or_concept_name_df['']             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_industry_or_concept_name_df, __pyx_kp_s__72); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely((PyObject_SetItem(__pyx_v_stock_industry_concept_basic, __pyx_n_s_name, __pyx_t_2) < 0))) __PYX_ERR(0, 1310, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1313
 * 
 *         # jsonjson
 *         rows = stock_industry_concept_basic.shape[0]             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False, "size": rows}
 *         update_range = range(0, rows)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_concept_basic, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_rows = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1314
 *         # jsonjson
 *         rows = stock_industry_concept_basic.shape[0]
 *         update_dict = {"updated": False, "size": rows}             # <<<<<<<<<<<<<<
 *         update_range = range(0, rows)
 * 
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_size, __pyx_v_rows) < 0) __PYX_ERR(0, 1314, __pyx_L1_error)
  __pyx_v_update_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1315
 *         rows = stock_industry_concept_basic.shape[0]
 *         update_dict = {"updated": False, "size": rows}
 *         update_range = range(0, rows)             # <<<<<<<<<<<<<<
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0)) __PYX_ERR(0, 1315, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_rows);
  __Pyx_GIVEREF(__pyx_v_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_rows)) __PYX_ERR(0, 1315, __pyx_L1_error);
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_update_range = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1317
 *         update_range = range(0, rows)
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:             # <<<<<<<<<<<<<<
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 1317, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_1getIndustryConceptConsText, 0, __pyx_n_s_DataToMysql_updateStockIndustryC, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__74)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_getIndustryConceptConsText = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1334
 * 
 *         #
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1334, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1335
 *         #
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for i in update_range:  #
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1335, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1335, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L11_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1336
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 for i in update_range:  #
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_v_futures = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1337
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for i in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 *                     futures.append(future)
 */
            if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
              __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_7 = 0;
              __pyx_t_15 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1337, __pyx_L15_error)
            }
            for (;;) {
              if (likely(!__pyx_t_15)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1337, __pyx_L15_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1337, __pyx_L15_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1337, __pyx_L15_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1337, __pyx_L15_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1337, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_15(__pyx_t_1);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1337, __pyx_L15_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1338
 *                 futures = []
 *                 for i in update_range:  #
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_9, __pyx_v_getIndustryConceptConsText, __pyx_v_stock_industry_concept_basic, __pyx_v_i};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L15_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1339
 *                 for i in update_range:  #
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     res = future.result()
 */
              __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1339, __pyx_L15_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1337
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 for i in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1340
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     res = future.result()
 *                     if not res:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_9 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_9)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_9);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L15_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_table_name) < 0) __PYX_ERR(0, 1340, __pyx_L15_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1340, __pyx_L15_error)
            __pyx_t_9 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_9) < 0) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L15_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_9)) || PyTuple_CheckExact(__pyx_t_9)) {
              __pyx_t_3 = __pyx_t_9; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_7 = 0;
              __pyx_t_15 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1340, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1340, __pyx_L15_error)
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            for (;;) {
              if (likely(!__pyx_t_15)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1340, __pyx_L15_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1340, __pyx_L15_error)
                  #else
                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1340, __pyx_L15_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1340, __pyx_L15_error)
                  #else
                  __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1340, __pyx_L15_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  #endif
                }
              } else {
                __pyx_t_9 = __pyx_t_15(__pyx_t_3);
                if (unlikely(!__pyx_t_9)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1340, __pyx_L15_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_9);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1341
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     res = future.result()             # <<<<<<<<<<<<<<
 *                     if not res:
 *                         return False
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future, __pyx_n_s_result); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L15_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1341, __pyx_L15_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1342
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     res = future.result()
 *                     if not res:             # <<<<<<<<<<<<<<
 *                         return False
 *         else:
 */
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1342, __pyx_L15_error)
              __pyx_t_6 = (!__pyx_t_5);
              if (__pyx_t_6) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1343
 *                     res = future.result()
 *                     if not res:
 *                         return False             # <<<<<<<<<<<<<<
 *         else:
 *             for i in tqdm(update_range, desc=table_name):  #
 */
                __Pyx_XDECREF(__pyx_r);
                __Pyx_INCREF(Py_False);
                __pyx_r = Py_False;
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                goto __pyx_L19_try_return;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1342
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     res = future.result()
 *                     if not res:             # <<<<<<<<<<<<<<
 *                         return False
 *         else:
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1340
 *                     future = executor.submit(getIndustryConceptConsText, stock_industry_concept_basic, i)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     res = future.result()
 *                     if not res:
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1335
 *         #
 *         if multi_thread:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 for i in update_range:  #
 */
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L20_try_end;
          __pyx_L15_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_2) < 0) __PYX_ERR(0, 1335, __pyx_L17_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_2);
            __pyx_t_1 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1335, __pyx_L17_except_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1335, __pyx_L17_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1335, __pyx_L17_except_error)
            __pyx_t_5 = (!__pyx_t_6);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_2);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_9, __pyx_t_2);
              __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_2 = 0; 
              __PYX_ERR(0, 1335, __pyx_L17_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L16_exception_handled;
          }
          __pyx_L17_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L19_try_return:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L12_return;
          __pyx_L16_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L20_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_11) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L14;
        }
        __pyx_L12_return: {
          __pyx_t_14 = __pyx_r;
          __pyx_r = 0;
          if (__pyx_t_11) {
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1335, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
          __pyx_r = __pyx_t_14;
          __pyx_t_14 = 0;
          goto __pyx_L0;
        }
        __pyx_L14:;
      }
      goto __pyx_L31;
      __pyx_L11_error:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L1_error;
      __pyx_L31:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1334
 * 
 *         #
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 */
    goto __pyx_L10;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1345
 *                         return False
 *         else:
 *             for i in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)
 *                 if not res:
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 1345, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_table_name) < 0) __PYX_ERR(0, 1345, __pyx_L1_error)
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_15 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1345, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1345, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (likely(!__pyx_t_15)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1345, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1345, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1345, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1345, __pyx_L1_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1345, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_15(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1345, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1346
 *         else:
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)             # <<<<<<<<<<<<<<
 *                 if not res:
 *                     return False
 */
      __pyx_t_1 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35updateStockIndustryConceptBasicInfo_getIndustryConceptConsText(__pyx_v_getIndustryConceptConsText, __pyx_v_stock_industry_concept_basic, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1346, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1347
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)
 *                 if not res:             # <<<<<<<<<<<<<<
 *                     return False
 * 
 */
      __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1347, __pyx_L1_error)
      __pyx_t_6 = (!__pyx_t_5);
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1348
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)
 *                 if not res:
 *                     return False             # <<<<<<<<<<<<<<
 * 
 *         default_date = datetime(2100, 1, 1)
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1347
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)
 *                 if not res:             # <<<<<<<<<<<<<<
 *                     return False
 * 
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1345
 *                         return False
 *         else:
 *             for i in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 res = getIndustryConceptConsText(stock_industry_concept_basic, i)
 *                 if not res:
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L10:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1350
 *                     return False
 * 
 *         default_date = datetime(2100, 1, 1)             # <<<<<<<<<<<<<<
 *         stock_industry_concept_basic.fillna(default_date, inplace=True)
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__75, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_default_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1351
 * 
 *         default_date = datetime(2100, 1, 1)
 *         stock_industry_concept_basic.fillna(default_date, inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_concept_basic, __pyx_n_s_fillna); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_v_default_date);
  __Pyx_GIVEREF(__pyx_v_default_date);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_default_date)) __PYX_ERR(0, 1351, __pyx_L1_error);
  __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 1351, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1354
 * 
 *         #
 *         self.dataproc.clearTableContent(table_name)  #             # <<<<<<<<<<<<<<
 *         try:
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1354, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_table_name};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1354, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1355
 *         #
 *         self.dataproc.clearTableContent(table_name)  #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_14, &__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_13);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1356
 *         self.dataproc.clearTableContent(table_name)  #
 *         try:
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'{table_name} failed to save in tables, err is {e}.')
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_industry_concept_basic, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_table_name)) __PYX_ERR(0, 1356, __pyx_L36_error);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_engine); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_con, __pyx_t_1) < 0) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1356, __pyx_L36_error)
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1356, __pyx_L36_error)
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1356, __pyx_L36_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L36_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1355
 *         #
 *         self.dataproc.clearTableContent(table_name)  #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:
 */
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    goto __pyx_L41_try_end;
    __pyx_L36_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1357
 *         try:
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{table_name} failed to save in tables, err is {e}.')
 *             return False
 */
    __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_18) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_9, &__pyx_t_3) < 0) __PYX_ERR(0, 1357, __pyx_L38_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __pyx_v_e = __pyx_t_9;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1358
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:
 *             utils.logger.error(f'{table_name} failed to save in tables, err is {e}.')             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_utils); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_logger); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_19);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_error); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __pyx_t_19 = PyTuple_New(4); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_19);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __pyx_t_20 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_20);
        __pyx_t_20 = 0;
        __Pyx_INCREF(__pyx_kp_u_failed_to_save_in_tables_err_is);
        __pyx_t_7 += 34;
        __Pyx_GIVEREF(__pyx_kp_u_failed_to_save_in_tables_err_is);
        PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_kp_u_failed_to_save_in_tables_err_is);
        __pyx_t_20 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_20);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_20) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_20);
        __Pyx_GIVEREF(__pyx_t_20);
        PyTuple_SET_ITEM(__pyx_t_19, 2, __pyx_t_20);
        __pyx_t_20 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_7 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_19, 3, __pyx_kp_u__5);
        __pyx_t_20 = __Pyx_PyUnicode_Join(__pyx_t_19, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 1358, __pyx_L47_error)
        __Pyx_GOTREF(__pyx_t_20);
        __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
        __pyx_t_19 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_10))) {
          __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_10);
          if (likely(__pyx_t_19)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
            __Pyx_INCREF(__pyx_t_19);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_10, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_19, __pyx_t_20};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_10, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L47_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1359
 *         except Exception as e:
 *             utils.logger.error(f'{table_name} failed to save in tables, err is {e}.')
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         update_dict['updated'] = True
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L46_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1357
 *         try:
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f'{table_name} failed to save in tables, err is {e}.')
 *             return False
 */
      /*finally:*/ {
        __pyx_L47_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_20); __pyx_t_20 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_24, &__pyx_t_25, &__pyx_t_26);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_12, &__pyx_t_17, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_12, &__pyx_t_17, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_17);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_26);
          __pyx_t_18 = __pyx_lineno; __pyx_t_21 = __pyx_clineno; __pyx_t_22 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_XGIVEREF(__pyx_t_26);
            __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
          }
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_17);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_12, __pyx_t_17, __pyx_t_23);
          __pyx_t_12 = 0; __pyx_t_17 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0; __pyx_t_26 = 0;
          __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_21; __pyx_filename = __pyx_t_22;
          goto __pyx_L38_except_error;
        }
        __pyx_L46_return: {
          __pyx_t_26 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_26;
          __pyx_t_26 = 0;
          goto __pyx_L39_except_return;
        }
      }
    }
    goto __pyx_L38_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1355
 *         #
 *         self.dataproc.clearTableContent(table_name)  #
 *         try:             # <<<<<<<<<<<<<<
 *             stock_industry_concept_basic.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *         except Exception as e:
 */
    __pyx_L38_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_14, __pyx_t_13);
    goto __pyx_L1_error;
    __pyx_L39_except_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_14, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L41_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1361
 *             return False
 * 
 *         update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
  if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1361, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1362
 * 
 *         update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 *         utils.logger.info(f"update {table_name} succeed.")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1362, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1362, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1363
 *         update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"update {table_name} succeed.")
 *         return True
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1363, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1363, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1364
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 *         utils.logger.info(f"update {table_name} succeed.")             # <<<<<<<<<<<<<<
 *         return True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_utils); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_update);
  __pyx_t_7 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_update);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_update);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u_succeed_2);
  __pyx_t_7 += 9;
  __Pyx_GIVEREF(__pyx_kp_u_succeed_2);
  PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_succeed_2);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1364, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1365
 *         self.dumpJsonToFile()
 *         utils.logger.info(f"update {table_name} succeed.")
 *         return True             # <<<<<<<<<<<<<<
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_19);
  __Pyx_XDECREF(__pyx_t_20);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptBasicInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_stock_industry_concept_basic);
  __Pyx_XDECREF(__pyx_v_industry_or_concept_name_df);
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_getIndustryConceptConsText);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_default_date);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_43updateStockIndustryConceptTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_43updateStockIndustryConceptTradeDayInfo = {"updateStockIndustryConceptTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_43updateStockIndustryConceptTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_43updateStockIndustryConceptTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockIndustryConceptTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mode,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_industry)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockIndustryConceptTradeDayInfo") < 0)) __PYX_ERR(0, 1367, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_multi_thread = values[2];
    __pyx_v_workers = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockIndustryConceptTradeDayInfo", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1367, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_42updateStockIndustryConceptTradeDayInfo(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1409
 *         update_range = [x for x in update_range if x not in updated_list_index]
 * 
 *         def getSingleIndustryConceptTradeDayInfo(name, code, update_dict) -> bool:             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_1getSingleIndustryConceptTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_1getSingleIndustryConceptTradeDayInfo = {"getSingleIndustryConceptTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_1getSingleIndustryConceptTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_1getSingleIndustryConceptTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_code = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("getSingleIndustryConceptTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_code,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleIndustryConceptTradeDayInfo", 1, 3, 3, 1); __PYX_ERR(0, 1409, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1409, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("getSingleIndustryConceptTradeDayInfo", 1, 3, 3, 2); __PYX_ERR(0, 1409, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "getSingleIndustryConceptTradeDayInfo") < 0)) __PYX_ERR(0, 1409, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_name = values[0];
    __pyx_v_code = values[1];
    __pyx_v_update_dict = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("getSingleIndustryConceptTradeDayInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1409, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo.getSingleIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_getSingleIndustryConceptTradeDayInfo(__pyx_self, __pyx_v_name, __pyx_v_code, __pyx_v_update_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_getSingleIndustryConceptTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_name, PyObject *__pyx_v_code, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_outer_scope;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_max_date_row = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_industry_or_concept_hist_em_df = NULL;
  PyObject *__pyx_v_new_order = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  Py_ssize_t __pyx_t_11;
  Py_UCS4 __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("getSingleIndustryConceptTradeDayInfo", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1412
 *             nonlocal no_fault
 *             #
 *             start_date = self.start_date             # <<<<<<<<<<<<<<
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == code).order_by(
 *                 globals()[table_name].date.desc()).first()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1412, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_start_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1413
 *             #
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == code).order_by(             # <<<<<<<<<<<<<<
 *                 globals()[table_name].date.desc()).first()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_query); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1413, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1413, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_v_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_order_by); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1413, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1414
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == code).order_by(
 *                 globals()[table_name].date.desc()).first()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_row:
 */
  __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1414, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_desc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1413, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_first); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1414, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1414, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_max_date_row = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1416
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_row); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1416, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1417
 * 
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")             # <<<<<<<<<<<<<<
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1417, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_max_date_table = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1418
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1418, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1418, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1419
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_max_date_table};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1419, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1419, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1420
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_next_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_max_date_table};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1420, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1420, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1419
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
        goto __pyx_L5;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1422
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, code)             # <<<<<<<<<<<<<<
 *                         if name not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(name)
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1422, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clearTableContentByCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1422, __pyx_L1_error) }
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_code};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1422, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1423
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, code)
 *                         if name not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(name)
 *                         no_fault = False
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1423, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1424
 *                         self.dataproc.clearTableContentByCode(table_name, code)
 *                         if name not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(name)             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")
 */
          __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1424, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1424, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1423
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, code)
 *                         if name not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(name)
 *                         no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1425
 *                         if name not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(name)
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")
 *                         return False
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1426
 *                             update_dict['failed_list'].append(name)
 *                         no_fault = False
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_11 = 0;
        __pyx_t_12 = 127;
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_data_wrong_in);
        __pyx_t_11 += 15;
        __Pyx_GIVEREF(__pyx_kp_u_data_wrong_in);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_data_wrong_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1426, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_11 += 33;
        __Pyx_GIVEREF(__pyx_kp_u_so_execute_delete_its_all_data);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1427
 *                         no_fault = False
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")
 *                         return False             # <<<<<<<<<<<<<<
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
      __pyx_L5:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1418
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
      goto __pyx_L4;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1428
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 *                     if name not in update_dict['update_list']:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1428, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1428, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1429
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")             # <<<<<<<<<<<<<<
 *                     if name not in update_dict['update_list']:
 *                         update_dict['update_list'].append(name)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = 0;
      __pyx_t_12 = 127;
      if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1429, __pyx_L1_error) }
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_12;
      __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_TradeDayInfo_of);
      __pyx_t_11 += 18;
      __Pyx_GIVEREF(__pyx_kp_u_TradeDayInfo_of);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u_TradeDayInfo_of);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_12;
      __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_dont_need_to_update_2);
      __pyx_t_11 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_dont_need_to_update_2);
      PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_dont_need_to_update_2);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 4, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1429, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1430
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 *                     if name not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(name)
 *                     if name in update_dict['failed_list']:
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1430, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1431
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 *                     if name not in update_dict['update_list']:
 *                         update_dict['update_list'].append(name)             # <<<<<<<<<<<<<<
 *                     if name in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(name)
 */
        __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1431, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1430
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 *                     if name not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(name)
 *                     if name in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1432
 *                     if name not in update_dict['update_list']:
 *                         update_dict['update_list'].append(name)
 *                     if name in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(name)
 *                     return True
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1432, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1433
 *                         update_dict['update_list'].append(name)
 *                     if name in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(name)             # <<<<<<<<<<<<<<
 *                     return True
 * 
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1433, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_name};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1433, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1432
 *                     if name not in update_dict['update_list']:
 *                         update_dict['update_list'].append(name)
 *                     if name in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(name)
 *                     return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1434
 *                     if name in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(name)
 *                     return True             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1428
 *                         utils.logger.error(f"{code} data wrong in {table_name}, so execute delete its all data.")
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"{mode}: TradeDayInfo of {name} dont need to update.")
 *                     if name not in update_dict['update_list']:
 */
    }
    __pyx_L4:;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1416
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 if max_date_table < self.latest_trade_day:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1436
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1438
 *             try:
 *                 # ---
 *                 if mode == 'industry':             # <<<<<<<<<<<<<<
 *                     industry_or_concept_hist_em_df = ak.stock_board_industry_hist_em(symbol=name, start_date=start_date,
 *                                                                                      end_date=self.latest_trade_day, period="k",
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1438, __pyx_L9_error) }
      __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1438, __pyx_L9_error)
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1439
 *                 # ---
 *                 if mode == 'industry':
 *                     industry_or_concept_hist_em_df = ak.stock_board_industry_hist_em(symbol=name, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                                                      end_date=self.latest_trade_day, period="k",
 *                                                                                      adjust="qfq")
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_board_industry_hist_em); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1439, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1439, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_name) < 0) __PYX_ERR(0, 1439, __pyx_L9_error)
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 1439, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1440
 *                 if mode == 'industry':
 *                     industry_or_concept_hist_em_df = ak.stock_board_industry_hist_em(symbol=name, start_date=start_date,
 *                                                                                      end_date=self.latest_trade_day, period="k",             # <<<<<<<<<<<<<<
 *                                                                                      adjust="qfq")
 *                 else:
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1440, __pyx_L9_error) }
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1440, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_date, __pyx_t_2) < 0) __PYX_ERR(0, 1439, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_period, __pyx_kp_s_k) < 0) __PYX_ERR(0, 1439, __pyx_L9_error)
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_adjust, __pyx_n_s_qfq) < 0) __PYX_ERR(0, 1439, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1439
 *                 # ---
 *                 if mode == 'industry':
 *                     industry_or_concept_hist_em_df = ak.stock_board_industry_hist_em(symbol=name, start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                                                      end_date=self.latest_trade_day, period="k",
 *                                                                                      adjust="qfq")
 */
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1439, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_industry_or_concept_hist_em_df = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1438
 *             try:
 *                 # ---
 *                 if mode == 'industry':             # <<<<<<<<<<<<<<
 *                     industry_or_concept_hist_em_df = ak.stock_board_industry_hist_em(symbol=name, start_date=start_date,
 *                                                                                      end_date=self.latest_trade_day, period="k",
 */
        goto __pyx_L15;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1443
 *                                                                                      adjust="qfq")
 *                 else:
 *                     industry_or_concept_hist_em_df = ak.stock_board_concept_hist_em(symbol=name, period="daily", start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                                                     end_date=self.latest_trade_day,
 *                                                                                     adjust="qfq")
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ak); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_stock_board_concept_hist_em); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1443, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_symbol, __pyx_v_name) < 0) __PYX_ERR(0, 1443, __pyx_L9_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_period, __pyx_n_s_daily) < 0) __PYX_ERR(0, 1443, __pyx_L9_error)
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 1443, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1444
 *                 else:
 *                     industry_or_concept_hist_em_df = ak.stock_board_concept_hist_em(symbol=name, period="daily", start_date=start_date,
 *                                                                                     end_date=self.latest_trade_day,             # <<<<<<<<<<<<<<
 *                                                                                     adjust="qfq")
 * 
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1444, __pyx_L9_error) }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1444, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_end_date, __pyx_t_6) < 0) __PYX_ERR(0, 1443, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_adjust, __pyx_n_s_qfq) < 0) __PYX_ERR(0, 1443, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1443
 *                                                                                      adjust="qfq")
 *                 else:
 *                     industry_or_concept_hist_em_df = ak.stock_board_concept_hist_em(symbol=name, period="daily", start_date=start_date,             # <<<<<<<<<<<<<<
 *                                                                                     end_date=self.latest_trade_day,
 *                                                                                     adjust="qfq")
 */
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1443, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_industry_or_concept_hist_em_df = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __pyx_L15:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1448
 * 
 *                 #
 *                 new_order = ['', '', '', '', '', '', '', '', '']             # <<<<<<<<<<<<<<
 *                 industry_or_concept_hist_em_df = industry_or_concept_hist_em_df[new_order]
 *                 industry_or_concept_hist_em_df.insert(0, 'code', code)
 */
      __pyx_t_6 = PyList_New(9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1448, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_kp_s__35);
      __Pyx_GIVEREF(__pyx_kp_s__35);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 0, __pyx_kp_s__35)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__61);
      __Pyx_GIVEREF(__pyx_kp_s__61);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 1, __pyx_kp_s__61)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__62);
      __Pyx_GIVEREF(__pyx_kp_s__62);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 2, __pyx_kp_s__62)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__63);
      __Pyx_GIVEREF(__pyx_kp_s__63);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 3, __pyx_kp_s__63)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__31);
      __Pyx_GIVEREF(__pyx_kp_s__31);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 4, __pyx_kp_s__31)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__33);
      __Pyx_GIVEREF(__pyx_kp_s__33);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 5, __pyx_kp_s__33)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__65);
      __Pyx_GIVEREF(__pyx_kp_s__65);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 6, __pyx_kp_s__65)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__76);
      __Pyx_GIVEREF(__pyx_kp_s__76);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 7, __pyx_kp_s__76)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __Pyx_INCREF(__pyx_kp_s__66);
      __Pyx_GIVEREF(__pyx_kp_s__66);
      if (__Pyx_PyList_SET_ITEM(__pyx_t_6, 8, __pyx_kp_s__66)) __PYX_ERR(0, 1448, __pyx_L9_error);
      __pyx_v_new_order = ((PyObject*)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1449
 *                 #
 *                 new_order = ['', '', '', '', '', '', '', '', '']
 *                 industry_or_concept_hist_em_df = industry_or_concept_hist_em_df[new_order]             # <<<<<<<<<<<<<<
 *                 industry_or_concept_hist_em_df.insert(0, 'code', code)
 *                 industry_or_concept_hist_em_df.columns = list(dtype_mapping.keys())
 */
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_industry_or_concept_hist_em_df, __pyx_v_new_order); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1449, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF_SET(__pyx_v_industry_or_concept_hist_em_df, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1450
 *                 new_order = ['', '', '', '', '', '', '', '', '']
 *                 industry_or_concept_hist_em_df = industry_or_concept_hist_em_df[new_order]
 *                 industry_or_concept_hist_em_df.insert(0, 'code', code)             # <<<<<<<<<<<<<<
 *                 industry_or_concept_hist_em_df.columns = list(dtype_mapping.keys())
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_industry_or_concept_hist_em_df, __pyx_n_s_insert); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1450, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[4] = {__pyx_t_1, __pyx_int_0, __pyx_n_s_code, __pyx_v_code};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 3+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1450, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1451
 *                 industry_or_concept_hist_em_df = industry_or_concept_hist_em_df[new_order]
 *                 industry_or_concept_hist_em_df.insert(0, 'code', code)
 *                 industry_or_concept_hist_em_df.columns = list(dtype_mapping.keys())             # <<<<<<<<<<<<<<
 * 
 *                 industry_or_concept_hist_em_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1451, __pyx_L9_error) }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1451, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1451, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__Pyx_PyObject_SetAttrStr(__pyx_v_industry_or_concept_hist_em_df, __pyx_n_s_columns, __pyx_t_2) < 0) __PYX_ERR(0, 1451, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1453
 *                 industry_or_concept_hist_em_df.columns = list(dtype_mapping.keys())
 * 
 *                 industry_or_concept_hist_em_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 if name not in update_dict['update_list']:
 *                     update_dict['update_list'].append(name)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_industry_or_concept_hist_em_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1453, __pyx_L9_error) }
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 1453, __pyx_L9_error);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_engine); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_con, __pyx_t_3) < 0) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1453, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1453, __pyx_L9_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1453, __pyx_L9_error) }
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1453, __pyx_L9_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1453, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1454
 * 
 *                 industry_or_concept_hist_em_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if name not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(name)
 *                 if name in update_dict['failed_list']:
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1454, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1454, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1455
 *                 industry_or_concept_hist_em_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if name not in update_dict['update_list']:
 *                     update_dict['update_list'].append(name)             # <<<<<<<<<<<<<<
 *                 if name in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(name)
 */
        __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1455, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1455, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1454
 * 
 *                 industry_or_concept_hist_em_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if name not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(name)
 *                 if name in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1456
 *                 if name not in update_dict['update_list']:
 *                     update_dict['update_list'].append(name)
 *                 if name in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(name)
 *                 return True
 */
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1456, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1456, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1457
 *                     update_dict['update_list'].append(name)
 *                 if name in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(name)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
        __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1457, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_name};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1457, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1456
 *                 if name not in update_dict['update_list']:
 *                     update_dict['update_list'].append(name)
 *                 if name in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(name)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1458
 *                 if name in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(name)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L13_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1436
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
    }
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1460
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")
 *                 if name not in update_dict['failed_list']:
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo.getSingleIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_1) < 0) __PYX_ERR(0, 1460, __pyx_L11_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1461
 * 
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")             # <<<<<<<<<<<<<<
 *                 if name not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(name)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_11 = 0;
        __pyx_t_12 = 127;
        if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1461, __pyx_L23_error) }
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_stock_board_h);
        __pyx_t_11 += 51;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_stock_board_h);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_kp_u_Failed_to_call_ak_stock_board_h);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_11 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_kp_u__21);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_12) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_12;
        __pyx_t_11 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_11 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_kp_u__22);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 6, __pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1461, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1461, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1462
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")
 *                 if name not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(name)
 *                 no_fault = False
 */
        __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1462, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_name, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1462, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1463
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")
 *                 if name not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(name)             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 return False
 */
          __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1463, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_name); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 1463, __pyx_L23_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1462
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")
 *                 if name not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(name)
 *                 no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1464
 *                 if name not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(name)
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1465
 *                     update_dict['failed_list'].append(name)
 *                 no_fault = False
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if not multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L22_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1460
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call ak.stock_board_hist_em for name = {name}: {e} ")
 *                 if name not in update_dict['failed_list']:
 */
      /*finally:*/ {
        __pyx_L23_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L11_except_error;
        }
        __pyx_L22_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L12_except_return;
        }
      }
    }
    goto __pyx_L11_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1436
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 if mode == 'industry':
 */
    __pyx_L11_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L13_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L12_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1409
 *         update_range = [x for x in update_range if x not in updated_list_index]
 * 
 *         def getSingleIndustryConceptTradeDayInfo(name, code, update_dict) -> bool:             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             #
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo.getSingleIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_max_date_row);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_industry_or_concept_hist_em_df);
  __Pyx_XDECREF(__pyx_v_new_order);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1404
 *         rows, cols = stock_industry_concept_basic_info.shape
 * 
 *         func_index = lambda x: stock_industry_concept_basic_info.loc[stock_industry_concept_basic_info['name'] == x].index[0]             # <<<<<<<<<<<<<<
 *         updated_list_index = [func_index(x) for x in updated_list]
 *         update_range = range(0, rows)
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_2lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_2lambda = {"lambda", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_2lambda, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_2lambda(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_x = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("lambda (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_x)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1404, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "lambda") < 0)) __PYX_ERR(0, 1404, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_x = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("lambda", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1404, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_lambda_funcdef_lambda(__pyx_self, __pyx_v_x);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_lambda_funcdef_lambda(PyObject *__pyx_self, PyObject *__pyx_v_x) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_outer_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("lambda", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;
  __Pyx_XDECREF(__pyx_r);
  if (unlikely(!__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info)) { __Pyx_RaiseClosureNameError("stock_industry_concept_basic_info"); __PYX_ERR(0, 1404, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely(!__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info)) { __Pyx_RaiseClosureNameError("stock_industry_concept_basic_info"); __PYX_ERR(0, 1404, __pyx_L1_error) }
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_v_x, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo.lambda", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_42updateStockIndustryConceptTradeDayInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_basic_info_table_name = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_rows = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_cols = NULL;
  PyObject *__pyx_v_func_index = NULL;
  PyObject *__pyx_v_updated_list_index = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_getSingleIndustryConceptTradeDayInfo = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_v_name = NULL;
  PyObject *__pyx_v_code = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr4__pyx_v_x = NULL;
  PyObject *__pyx_8genexpr5__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockIndustryConceptTradeDayInfo", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1367, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_mode = __pyx_v_mode;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mode);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mode);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1368
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1369
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         if mode == 'industry':
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1371
 *         no_fault = True
 * 
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_industry_trade_day'
 *             basic_info_table_name = 'stock_industry_basic_info'
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_industry, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1371, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1372
 * 
 *         if mode == 'industry':
 *             table_name = 'stock_industry_trade_day'             # <<<<<<<<<<<<<<
 *             basic_info_table_name = 'stock_industry_basic_info'
 *         else:
 */
    __Pyx_INCREF(__pyx_n_s_stock_industry_trade_day);
    __Pyx_GIVEREF(__pyx_n_s_stock_industry_trade_day);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_industry_trade_day;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1373
 *         if mode == 'industry':
 *             table_name = 'stock_industry_trade_day'
 *             basic_info_table_name = 'stock_industry_basic_info'             # <<<<<<<<<<<<<<
 *         else:
 *             table_name = 'stock_concept_trade_day'
 */
    __Pyx_INCREF(__pyx_n_s_stock_industry_basic_info);
    __pyx_v_basic_info_table_name = __pyx_n_s_stock_industry_basic_info;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1371
 *         no_fault = True
 * 
 *         if mode == 'industry':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_industry_trade_day'
 *             basic_info_table_name = 'stock_industry_basic_info'
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1375
 *             basic_info_table_name = 'stock_industry_basic_info'
 *         else:
 *             table_name = 'stock_concept_trade_day'             # <<<<<<<<<<<<<<
 *             basic_info_table_name = 'stock_concept_basic_info'
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_stock_concept_trade_day);
    __Pyx_GIVEREF(__pyx_n_s_stock_concept_trade_day);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_concept_trade_day;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1376
 *         else:
 *             table_name = 'stock_concept_trade_day'
 *             basic_info_table_name = 'stock_concept_basic_info'             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
    __Pyx_INCREF(__pyx_n_s_stock_concept_basic_info);
    __pyx_v_basic_info_table_name = __pyx_n_s_stock_concept_basic_info;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1379
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1380
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1381
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1381, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1382
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1382, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 1380, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1385
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1385, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1386
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1386, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1387
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1387, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1388
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1386
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1390
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1390, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1391
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1391, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1385
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1393
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Beginning);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__21);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1393, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1396
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1396, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1396, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1397
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1397, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1398
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1398, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1397
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1401
 * 
 *         #
 *         stock_industry_concept_basic_info = self.dataproc.loadTable(basic_info_table_name)             # <<<<<<<<<<<<<<
 *         rows, cols = stock_industry_concept_basic_info.shape
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_loadTable); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1401, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_basic_info_table_name};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1401, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1402
 *         #
 *         stock_industry_concept_basic_info = self.dataproc.loadTable(basic_info_table_name)
 *         rows, cols = stock_industry_concept_basic_info.shape             # <<<<<<<<<<<<<<
 * 
 *         func_index = lambda x: stock_industry_concept_basic_info.loc[stock_industry_concept_basic_info['name'] == x].index[0]
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_shape); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
    PyObject* sequence = __pyx_t_3;
    Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
    if (unlikely(size != 2)) {
      if (size > 2) __Pyx_RaiseTooManyValuesError(2);
      else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
      __PYX_ERR(0, 1402, __pyx_L1_error)
    }
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    if (likely(PyTuple_CheckExact(sequence))) {
      __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
    } else {
      __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
      __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
    }
    __Pyx_INCREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_t_1);
    #else
    __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    #endif
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  } else {
    Py_ssize_t index = -1;
    __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
    index = 0; __pyx_t_9 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_9);
    index = 1; __pyx_t_1 = __pyx_t_10(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
    __Pyx_GOTREF(__pyx_t_1);
    if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_2), 2) < 0) __PYX_ERR(0, 1402, __pyx_L1_error)
    __pyx_t_10 = NULL;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L10_unpacking_done;
    __pyx_L9_unpacking_failed:;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_10 = NULL;
    if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
    __PYX_ERR(0, 1402, __pyx_L1_error)
    __pyx_L10_unpacking_done:;
  }
  __pyx_v_rows = __pyx_t_9;
  __pyx_t_9 = 0;
  __pyx_v_cols = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1404
 *         rows, cols = stock_industry_concept_basic_info.shape
 * 
 *         func_index = lambda x: stock_industry_concept_basic_info.loc[stock_industry_concept_basic_info['name'] == x].index[0]             # <<<<<<<<<<<<<<
 *         updated_list_index = [func_index(x) for x in updated_list]
 *         update_range = range(0, rows)
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_2lambda, 0, __pyx_n_s_DataToMysql_updateStockIndustryC_2, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_func_index = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1405
 * 
 *         func_index = lambda x: stock_industry_concept_basic_info.loc[stock_industry_concept_basic_info['name'] == x].index[0]
 *         updated_list_index = [func_index(x) for x in updated_list]             # <<<<<<<<<<<<<<
 *         update_range = range(0, rows)
 *         update_range = [x for x in update_range if x not in updated_list_index]
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1405, __pyx_L13_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_updated_list)) || PyTuple_CheckExact(__pyx_v_updated_list)) {
      __pyx_t_1 = __pyx_v_updated_list; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_updated_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1405, __pyx_L13_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1405, __pyx_L13_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1405, __pyx_L13_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1405, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1405, __pyx_L13_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1405, __pyx_L13_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1405, __pyx_L13_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_11(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1405, __pyx_L13_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_9 = __pyx_lambda_funcdef_lambda(__pyx_v_func_index, __pyx_8genexpr4__pyx_v_x); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1405, __pyx_L13_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1405, __pyx_L13_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0;
    goto __pyx_L17_exit_scope;
    __pyx_L13_error:;
    __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x); __pyx_8genexpr4__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L17_exit_scope:;
  } /* exit inner scope */
  __pyx_v_updated_list_index = ((PyObject*)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1406
 *         func_index = lambda x: stock_industry_concept_basic_info.loc[stock_industry_concept_basic_info['name'] == x].index[0]
 *         updated_list_index = [func_index(x) for x in updated_list]
 *         update_range = range(0, rows)             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list_index]
 * 
 */
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_int_0);
  __Pyx_GIVEREF(__pyx_int_0);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0)) __PYX_ERR(0, 1406, __pyx_L1_error);
  __Pyx_INCREF(__pyx_v_rows);
  __Pyx_GIVEREF(__pyx_v_rows);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rows)) __PYX_ERR(0, 1406, __pyx_L1_error);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_range = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1407
 *         updated_list_index = [func_index(x) for x in updated_list]
 *         update_range = range(0, rows)
 *         update_range = [x for x in update_range if x not in updated_list_index]             # <<<<<<<<<<<<<<
 * 
 *         def getSingleIndustryConceptTradeDayInfo(name, code, update_dict) -> bool:
 */
  { /* enter inner scope */
    __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L20_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_3 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1407, __pyx_L20_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1407, __pyx_L20_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1407, __pyx_L20_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1407, __pyx_L20_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1407, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1407, __pyx_L20_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1407, __pyx_L20_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1407, __pyx_L20_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_11(__pyx_t_3);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1407, __pyx_L20_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr5__pyx_v_x, __pyx_v_updated_list_index, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1407, __pyx_L20_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_x))) __PYX_ERR(0, 1407, __pyx_L20_error)
      }
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_x); __pyx_8genexpr5__pyx_v_x = 0;
    goto __pyx_L25_exit_scope;
    __pyx_L20_error:;
    __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_x); __pyx_8genexpr5__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L25_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1409
 *         update_range = [x for x in update_range if x not in updated_list_index]
 * 
 *         def getSingleIndustryConceptTradeDayInfo(name, code, update_dict) -> bool:             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             #
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 1409, __pyx_L1_error)
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_1getSingleIndustryConceptTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateStockIndustryC_3, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_3, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_getSingleIndustryConceptTradeDayInfo = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1467
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1467, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1469
 *         if not multi_thread:
 *             #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1469, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_start_time = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1470
 *             #
 *             start_time = time.time()
 *             for i in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 1470, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1470, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1470, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1470, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1470, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1470, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_11(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1470, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1471
 *             start_time = time.time()
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_i)) __PYX_ERR(0, 1471, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_name);
      __Pyx_GIVEREF(__pyx_n_s_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_name)) __PYX_ERR(0, 1471, __pyx_L1_error);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1471, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1472
 *             for i in tqdm(update_range, desc=table_name):  #
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']             # <<<<<<<<<<<<<<
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)
 *                 current_time = time.time()
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_INCREF(__pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_i)) __PYX_ERR(0, 1472, __pyx_L1_error);
      __Pyx_INCREF(__pyx_n_s_code);
      __Pyx_GIVEREF(__pyx_n_s_code);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_n_s_code)) __PYX_ERR(0, 1472, __pyx_L1_error);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1472, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1473
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      __pyx_t_2 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_38updateStockIndustryConceptTradeDayInfo_getSingleIndustryConceptTradeDayInfo(__pyx_v_getSingleIndustryConceptTradeDayInfo, __pyx_v_name, __pyx_v_code, __pyx_v_update_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1473, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1474
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1474, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1474, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1475
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1475, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1476
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1476, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1476, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1477
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         else:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1477, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1477, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1478
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1475
 *                 getSingleIndustryConceptTradeDayInfo(name, code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1470
 *             #
 *             start_time = time.time()
 *             for i in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 name = stock_industry_concept_basic_info.loc[i, 'name']
 *                 code = stock_industry_concept_basic_info.loc[i, 'code']
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1467
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
    goto __pyx_L26;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1481
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1481, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1481, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L31_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1481, __pyx_L31_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1482
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for i in update_range:  #
 */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1482, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_v_futures = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1483
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for i in update_range:  #
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1483, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1483, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_v_start_time = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1484
 *                 futures = []
 *                 start_time = time.time()
 *                 for i in update_range:  #             # <<<<<<<<<<<<<<
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']
 */
            __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1484, __pyx_L35_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1484, __pyx_L35_error)
              #else
              __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1484, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1485
 *                 start_time = time.time()
 *                 for i in update_range:  #
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']             # <<<<<<<<<<<<<<
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1485, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1485, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_v_i);
              __Pyx_GIVEREF(__pyx_v_i);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i)) __PYX_ERR(0, 1485, __pyx_L35_error);
              __Pyx_INCREF(__pyx_n_s_name);
              __Pyx_GIVEREF(__pyx_n_s_name);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_name)) __PYX_ERR(0, 1485, __pyx_L35_error);
              __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1485, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF_SET(__pyx_v_name, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1486
 *                 for i in update_range:  #
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']             # <<<<<<<<<<<<<<
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)
 *                     futures.append(future)
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_stock_industry_concept_basic_info, __pyx_n_s_loc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1486, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1486, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_INCREF(__pyx_v_i);
              __Pyx_GIVEREF(__pyx_v_i);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_i)) __PYX_ERR(0, 1486, __pyx_L35_error);
              __Pyx_INCREF(__pyx_n_s_code);
              __Pyx_GIVEREF(__pyx_n_s_code);
              if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_n_s_code)) __PYX_ERR(0, 1486, __pyx_L35_error);
              __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1486, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1487
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1487, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_getSingleIndustryConceptTradeDayInfo, __pyx_v_name, __pyx_v_code, __pyx_v_update_dict};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1487, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1488
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1488, __pyx_L35_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1484
 *                 futures = []
 *                 start_time = time.time()
 *                 for i in update_range:  #             # <<<<<<<<<<<<<<
 *                     name = stock_industry_concept_basic_info.loc[i, 'name']
 *                     code = stock_industry_concept_basic_info.loc[i, 'code']
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1489
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1489, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_9);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9)) __PYX_ERR(0, 1489, __pyx_L35_error);
            __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1489, __pyx_L35_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1489, __pyx_L35_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L35_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9);
              __pyx_t_7 = 0;
              __pyx_t_11 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1489, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1489, __pyx_L35_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_11)) {
                if (likely(PyList_CheckExact(__pyx_t_9))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1489, __pyx_L35_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1489, __pyx_L35_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L35_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1489, __pyx_L35_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1489, __pyx_L35_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1489, __pyx_L35_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_11(__pyx_t_9);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1489, __pyx_L35_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1490
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1490, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1490, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1490, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1491
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1491, __pyx_L35_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1491, __pyx_L35_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1491, __pyx_L35_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_6) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1492
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1492, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1492, __pyx_L35_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1493
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         if no_fault:
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L35_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1493, __pyx_L35_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1494
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1491
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1489
 *                     future = executor.submit(getSingleIndustryConceptTradeDayInfo, name, code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1481
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L40_try_end;
          __pyx_L35_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 1481, __pyx_L37_except_error)
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_9, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1481, __pyx_L37_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1481, __pyx_L37_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1481, __pyx_L37_except_error)
            __pyx_t_5 = (!__pyx_t_6);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_3, __pyx_t_1);
              __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 1481, __pyx_L37_except_error)
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L36_exception_handled;
          }
          __pyx_L37_except_error:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          goto __pyx_L1_error;
          __pyx_L36_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_L40_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_12) {
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1481, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          goto __pyx_L34;
        }
        __pyx_L34:;
      }
      goto __pyx_L51;
      __pyx_L31_error:;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L1_error;
      __pyx_L51:;
    }
  }
  __pyx_L26:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1495
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1496
 *                         start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1496, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1495
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1497
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 *         utils.logger.info(f"update {table_name} finished.")
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1497, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1498
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *         utils.logger.info(f"update {table_name} finished.")
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1498, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1499
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 *         utils.logger.info(f"update {table_name} finished.")             # <<<<<<<<<<<<<<
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_update);
  __pyx_t_7 += 7;
  __Pyx_GIVEREF(__pyx_kp_u_update);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_update);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u_finished);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_finished);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u_finished);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1499, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryConceptTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_basic_info_table_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_rows);
  __Pyx_XDECREF(__pyx_v_cols);
  __Pyx_XDECREF(__pyx_v_func_index);
  __Pyx_XDECREF(__pyx_v_updated_list_index);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_getSingleIndustryConceptTradeDayInfo);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_name);
  __Pyx_XDECREF(__pyx_v_code);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_x);
  __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1501
 *         utils.logger.info(f"update {table_name} finished.")
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_45updateStockIndustryInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_45updateStockIndustryInfo = {"updateStockIndustryInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_45updateStockIndustryInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_45updateStockIndustryInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockIndustryInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1501, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockIndustryInfo") < 0)) __PYX_ERR(0, 1501, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockIndustryInfo", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1501, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_44updateStockIndustryInfo(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_44updateStockIndustryInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockIndustryInfo", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1502
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)             # <<<<<<<<<<<<<<
 *         if res:
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStockIndustryConceptBasicI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1502, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_n_s_industry, Py_False, __pyx_v_workers};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1503
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:             # <<<<<<<<<<<<<<
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1503, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1504
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)             # <<<<<<<<<<<<<<
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStockIndustryConceptTradeD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1504, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_n_s_industry, __pyx_v_multi_thread, __pyx_v_workers};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1503
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:             # <<<<<<<<<<<<<<
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1501
 *         utils.logger.info(f"update {table_name} finished.")
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockIndustryInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1506
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_47updateStockConceptInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_47updateStockConceptInfo = {"updateStockConceptInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_47updateStockConceptInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_47updateStockConceptInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockConceptInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockConceptInfo") < 0)) __PYX_ERR(0, 1506, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockConceptInfo", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1506, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockConceptInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_46updateStockConceptInfo(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_46updateStockConceptInfo(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockConceptInfo", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1507
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)             # <<<<<<<<<<<<<<
 *         if res:
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStockIndustryConceptBasicI); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_n_s_concept, __pyx_v_multi_thread, __pyx_v_workers};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1508
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:             # <<<<<<<<<<<<<<
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1508, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1509
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)             # <<<<<<<<<<<<<<
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_updateStockIndustryConceptTradeD); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_n_s_concept, __pyx_v_multi_thread, __pyx_v_workers};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1509, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1508
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:             # <<<<<<<<<<<<<<
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1506
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockConceptInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_49updateStockFinancialToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
PyDoc_STRVAR(__pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_48updateStockFinancialToMysql, "\n        \346\233\264\346\226\260\346\226\271\345\274\217\357\274\232\n        1.\344\270\215\346\230\257\346\257\217\345\244\251\346\233\264\346\226\260\357\274\214\345\261\236\344\272\216\345\256\232\346\234\237\344\270\200\346\256\265\346\227\266\351\227\264\345\206\205\346\257\217\345\244\251\346\233\264\346\226\260\n        2.\346\257\217\346\254\241\346\233\264\346\226\260\357\274\214\351\230\262\346\255\242\350\242\253\344\270\255\346\226\255\357\274\214\344\275\277\347\224\250json.log\350\256\260\345\275\225\346\233\264\346\226\260\350\277\207\347\250\213\357\274\214\344\270\255\346\226\255\345\220\216\345\217\257\344\273\245\347\273\247\347\273\255\344\270\212\346\254\241\344\275\215\347\275\256\346\233\264\346\226\260\n        3.\346\257\217\346\254\241\346\233\264\346\226\260\357\274\214\350\216\267\345\217\226\346\225\260\346\215\256\345\220\216\357\274\214\345\234\250\346\225\260\346\215\256\350\241\250\344\270\255\345\210\244\346\226\255\347\211\271\345\256\232\350\202\241\347\245\250\347\232\204\346\234\200\350\277\221\346\225\260\346\215\256\346\227\245\346\234\237\357\274\214\345\246\202\346\236\234\346\234\211\346\233\264\346\226\260\357\274\214\346\211\215\350\277\233\350\241\214\344\273\245\345\220\216\347\232\204\346\223\215\344\275\234\n        :param multi_thread:\n        :param workers:\n        :return:\n        ");
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_49updateStockFinancialToMysql = {"updateStockFinancialToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_49updateStockFinancialToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_48updateStockFinancialToMysql};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_49updateStockFinancialToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_mode = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockFinancialToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_mode,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_report)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1511, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockFinancialToMysql") < 0)) __PYX_ERR(0, 1511, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_mode = values[1];
    __pyx_v_multi_thread = values[2];
    __pyx_v_workers = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockFinancialToMysql", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1511, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_48updateStockFinancialToMysql(__pyx_self, __pyx_v_self, __pyx_v_mode, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1556
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_1updateSingleStockFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_1updateSingleStockFinancialData = {"updateSingleStockFinancialData", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_1updateSingleStockFinancialData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_1updateSingleStockFinancialData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockFinancialData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1556, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1556, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockFinancialData", 1, 2, 2, 1); __PYX_ERR(0, 1556, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockFinancialData") < 0)) __PYX_ERR(0, 1556, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_stock_code = ((PyObject*)values[0]);
    __pyx_v_update_dict = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockFinancialData", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1556, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql.updateSingleStockFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_code), (&PyString_Type), 0, "stock_code", 1))) __PYX_ERR(0, 1556, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_update_dict), (&PyDict_Type), 0, "update_dict", 1))) __PYX_ERR(0, 1556, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_updateSingleStockFinancialData(__pyx_self, __pyx_v_stock_code, __pyx_v_update_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_updateSingleStockFinancialData(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_stock_code_back = NULL;
  PyObject *__pyx_v_main_fina_data_df = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_max_date_em = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_match_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  Py_ssize_t __pyx_t_13;
  Py_UCS4 __pyx_t_14;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  char const *__pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockFinancialData", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1558
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1559
 *             nonlocal no_fault
 *             try:
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')             # <<<<<<<<<<<<<<
 *                 if mode == 'report':
 *                     main_fina_data_df = sdc.stock_finance_mfd_report_em(symbol=stock_code_back)  #
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1559, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1559, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_stock_code, __pyx_kp_s_XX};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_v_stock_code_back = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1560
 *             try:
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':             # <<<<<<<<<<<<<<
 *                     main_fina_data_df = sdc.stock_finance_mfd_report_em(symbol=stock_code_back)  #
 *                 else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1560, __pyx_L3_error) }
      __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_report, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1560, __pyx_L3_error)
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1561
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':
 *                     main_fina_data_df = sdc.stock_finance_mfd_report_em(symbol=stock_code_back)  #             # <<<<<<<<<<<<<<
 *                 else:
 *                     main_fina_data_df = sdc.stock_finance_mfd_quarter_em(symbol=stock_code_back)  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sdc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stock_finance_mfd_report_em); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1561, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_symbol, __pyx_v_stock_code_back) < 0) __PYX_ERR(0, 1561, __pyx_L3_error)
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1561, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_v_main_fina_data_df = __pyx_t_5;
        __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1560
 *             try:
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':             # <<<<<<<<<<<<<<
 *                     main_fina_data_df = sdc.stock_finance_mfd_report_em(symbol=stock_code_back)  #
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1563
 *                     main_fina_data_df = sdc.stock_finance_mfd_report_em(symbol=stock_code_back)  #
 *                 else:
 *                     main_fina_data_df = sdc.stock_finance_mfd_quarter_em(symbol=stock_code_back)  #             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sdc); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_stock_finance_mfd_quarter_em); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1563, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_symbol, __pyx_v_stock_code_back) < 0) __PYX_ERR(0, 1563, __pyx_L3_error)
        __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1563, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_v_main_fina_data_df = __pyx_t_6;
        __pyx_t_6 = 0;
      }
      __pyx_L9:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1558
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1564
 *                 else:
 *                     main_fina_data_df = sdc.stock_finance_mfd_quarter_em(symbol=stock_code_back)  #
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 */
    __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_9) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql.updateSingleStockFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1564, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1565
 *                     main_fina_data_df = sdc.stock_finance_mfd_quarter_em(symbol=stock_code_back)  #
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = 0;
        __pyx_t_14 = 127;
        if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1565, __pyx_L15_error) }
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_stock_finance_mf);
        __pyx_t_13 += 49;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_stock_finance_mf);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_kp_u_Failed_to_call_stock_finance_mf);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_13 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_kp_u__21);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_13 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_kp_u__22);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_12, 6, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1565, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_15};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1565, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1566
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1567
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L15_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_10, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1567, __pyx_L15_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1568
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1568, __pyx_L15_error)
          __Pyx_GOTREF(__pyx_t_10);
          __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_10, __pyx_v_stock_code); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1568, __pyx_L15_error)
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1567
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1569
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *             #
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L14_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1564
 *                 else:
 *                     main_fina_data_df = sdc.stock_finance_mfd_quarter_em(symbol=stock_code_back)  #
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L15_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_9 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_9; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L5_except_error;
        }
        __pyx_L14_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1558
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 if mode == 'report':
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1572
 * 
 *             #
 *             max_date_em = main_fina_data_df['report_date'].max()             # <<<<<<<<<<<<<<
 *             max_date_table = session.query(func.max(globals()[table_name].report_date)).filter(globals()[table_name].code == stock_code).scalar()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_main_fina_data_df, __pyx_n_s_report_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_max); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1572, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1572, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_max_date_em = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1573
 *             #
 *             max_date_em = main_fina_data_df['report_date'].max()
 *             max_date_table = session.query(func.max(globals()[table_name].report_date)).filter(globals()[table_name].code == stock_code).scalar()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_table is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_session); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_query); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_func); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_max); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_Globals(); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1573, __pyx_L1_error) }
  __pyx_t_25 = __Pyx_PyObject_GetItem(__pyx_t_15, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_report_date); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_12))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_12);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_12, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_25, __pyx_t_15};
    __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_12, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_10);
    __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  }
  __pyx_t_12 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_filter); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1573, __pyx_L1_error) }
  __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_code); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = PyObject_RichCompare(__pyx_t_5, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_10};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_scalar); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1573, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_v_max_date_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1575
 *             max_date_table = session.query(func.max(globals()[table_name].report_date)).filter(globals()[table_name].code == stock_code).scalar()
 * 
 *             if max_date_table is None:             # <<<<<<<<<<<<<<
 *                 pass
 *             elif max_date_table < max_date_em:
 */
  __pyx_t_8 = (__pyx_v_max_date_table == Py_None);
  if (__pyx_t_8) {
    goto __pyx_L22;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1577
 *             if max_date_table is None:
 *                 pass
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 match_index = main_fina_data_df.index[main_fina_data_df['report_date'] == max_date_table].values[0]
 *                 main_fina_data_df = main_fina_data_df.iloc[0:match_index]
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_v_max_date_em, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1577, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1577, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1578
 *                 pass
 *             elif max_date_table < max_date_em:
 *                 match_index = main_fina_data_df.index[main_fina_data_df['report_date'] == max_date_table].values[0]             # <<<<<<<<<<<<<<
 *                 main_fina_data_df = main_fina_data_df.iloc[0:match_index]
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_fina_data_df, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_main_fina_data_df, __pyx_n_s_report_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_v_max_date_table, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_values); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1578, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_v_match_index = __pyx_t_11;
    __pyx_t_11 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1579
 *             elif max_date_table < max_date_em:
 *                 match_index = main_fina_data_df.index[main_fina_data_df['report_date'] == max_date_table].values[0]
 *                 main_fina_data_df = main_fina_data_df.iloc[0:match_index]             # <<<<<<<<<<<<<<
 *             else:
 *                 # utils.logger.info(f"{mode}: stock_finance_mfd_em of {stock_code} dont need to update.")
 */
    __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_fina_data_df, __pyx_n_s_iloc); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_11, 0, 0, NULL, &__pyx_v_match_index, NULL, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1579, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF_SET(__pyx_v_main_fina_data_df, __pyx_t_6);
    __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1577
 *             if max_date_table is None:
 *                 pass
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 match_index = main_fina_data_df.index[main_fina_data_df['report_date'] == max_date_table].values[0]
 *                 main_fina_data_df = main_fina_data_df.iloc[0:match_index]
 */
    goto __pyx_L22;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1583
 *                 # utils.logger.info(f"{mode}: stock_finance_mfd_em of {stock_code} dont need to update.")
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
  /*else*/ {
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1583, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_6, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1583, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1584
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
      __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1584, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1584, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1583
 *                 # utils.logger.info(f"{mode}: stock_finance_mfd_em of {stock_code} dont need to update.")
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1585
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1585, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_6, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1585, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (__pyx_t_8) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1586
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1586, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_stock_code};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1586, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1585
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1587
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
  __pyx_L22:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1589
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 main_fina_data_df = main_fina_data_df[dtype_mapping.keys()]
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1590
 * 
 *             try:
 *                 main_fina_data_df = main_fina_data_df[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1590, __pyx_L25_error) }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1590, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_11 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_11)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_11);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1590, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_main_fina_data_df, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1590, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF_SET(__pyx_v_main_fina_data_df, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1591
 *             try:
 *                 main_fina_data_df = main_fina_data_df[dtype_mapping.keys()]
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_main_fina_data_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1591, __pyx_L25_error) }
      __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 1591, __pyx_L25_error);
      __pyx_t_11 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_11);
      __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_engine); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_10);
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_con, __pyx_t_10) < 0) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1591, __pyx_L25_error)
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1591, __pyx_L25_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1591, __pyx_L25_error) }
      if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1591, __pyx_L25_error)
      __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1591, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_10);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1593
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1593, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_10, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1593, __pyx_L25_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1594
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
        __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1594, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_10, __pyx_v_stock_code); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1594, __pyx_L25_error)
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1593
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1595
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      __pyx_t_10 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1595, __pyx_L25_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_10, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1595, __pyx_L25_error)
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1596
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 *             except Exception as e:
 */
        __pyx_t_11 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1596, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1596, __pyx_L25_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_11)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_11);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_v_stock_code};
          __pyx_t_10 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1596, __pyx_L25_error)
          __Pyx_GOTREF(__pyx_t_10);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1595
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1597
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L29_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1589
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 main_fina_data_df = main_fina_data_df[dtype_mapping.keys()]
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    }
    __pyx_L25_error:;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1598
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 */
    __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_17) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql.updateSingleStockFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_6, &__pyx_t_11) < 0) __PYX_ERR(0, 1598, __pyx_L27_except_error)
      __Pyx_XGOTREF(__pyx_t_10);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_6);
      __pyx_v_e = __pyx_t_6;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1599
 *                 return True
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_error); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_13 = 0;
        __pyx_t_14 = 127;
        if (unlikely(!__pyx_cur_scope->__pyx_v_mode)) { __Pyx_RaiseClosureNameError("mode"); __PYX_ERR(0, 1599, __pyx_L38_error) }
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_13 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_kp_u__21);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u_financial_data_failed_save_in);
        __pyx_t_13 += 31;
        __Pyx_GIVEREF(__pyx_kp_u_financial_data_failed_save_in);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_kp_u_financial_data_failed_save_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1599, __pyx_L38_error) }
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u_err_is);
        __pyx_t_13 += 9;
        __Pyx_GIVEREF(__pyx_kp_u_err_is);
        PyTuple_SET_ITEM(__pyx_t_12, 5, __pyx_kp_u_err_is);
        __pyx_t_15 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_14 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_14) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_14;
        __pyx_t_13 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
        __Pyx_GIVEREF(__pyx_t_15);
        PyTuple_SET_ITEM(__pyx_t_12, 6, __pyx_t_15);
        __pyx_t_15 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_13 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_12, 7, __pyx_kp_u__5);
        __pyx_t_15 = __Pyx_PyUnicode_Join(__pyx_t_12, 8, __pyx_t_13, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1599, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_15};
          __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1599, __pyx_L38_error)
          __Pyx_GOTREF(__pyx_t_4);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1600
 *             except Exception as e:
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1601
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1601, __pyx_L38_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1601, __pyx_L38_error)
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1602
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1602, __pyx_L38_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_16 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_stock_code); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1602, __pyx_L38_error)
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1601
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1603
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if not multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L37_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1598
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{mode}: {stock_code} financial data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L38_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_17 = __pyx_lineno; __pyx_t_9 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          }
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_9; __pyx_filename = __pyx_t_26;
          goto __pyx_L27_except_error;
        }
        __pyx_L37_return: {
          __pyx_t_19 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_19;
          __pyx_t_19 = 0;
          goto __pyx_L28_except_return;
        }
      }
    }
    goto __pyx_L27_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1589
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 main_fina_data_df = main_fina_data_df[dtype_mapping.keys()]
 *                 main_fina_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    __pyx_L27_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L29_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
    __pyx_L28_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1556
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql.updateSingleStockFinancialData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_code_back);
  __Pyx_XDECREF(__pyx_v_main_fina_data_df);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_max_date_em);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_match_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_48updateStockFinancialToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_mode, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_updateSingleStockFinancialData = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr6__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockFinancialToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1511, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_mode = __pyx_v_mode;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mode);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mode);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1521
 *         :return:
 *         '''
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         if mode == 'report':
 *             table_name = 'stock_financial_report'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1522
 *         '''
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'report':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_financial_report'
 *         else:
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_mode, __pyx_n_s_report, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1522, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1523
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'report':
 *             table_name = 'stock_financial_report'             # <<<<<<<<<<<<<<
 *         else:
 *             table_name = 'stock_financial_quarter'
 */
    __Pyx_INCREF(__pyx_n_s_stock_financial_report);
    __Pyx_GIVEREF(__pyx_n_s_stock_financial_report);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_financial_report;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1522
 *         '''
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'report':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_financial_report'
 *         else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1525
 *             table_name = 'stock_financial_report'
 *         else:
 *             table_name = 'stock_financial_quarter'             # <<<<<<<<<<<<<<
 * 
 *         no_fault = True
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_stock_financial_quarter);
    __Pyx_GIVEREF(__pyx_n_s_stock_financial_quarter);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_financial_quarter;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1527
 *             table_name = 'stock_financial_quarter'
 * 
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1530
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1531
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1532
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1533
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1533, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 1531, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1536
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1536, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1537
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1537, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1538
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1538, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1539
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1537
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1541
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1542
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1542, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1536
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1544
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {mode}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Beginning);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__21);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_mode, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1544, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1544, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1547
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1547, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1548
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1548, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1549
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1549, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1549, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1548
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1552
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1552, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1553
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_update_range = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1554
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1554, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1554, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1554, __pyx_L11_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1554, __pyx_L11_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1554, __pyx_L11_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1554, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1554, __pyx_L11_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1554, __pyx_L11_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1554, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1554, __pyx_L11_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr6__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1554, __pyx_L11_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_8genexpr6__pyx_v_x))) __PYX_ERR(0, 1554, __pyx_L11_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_x); __pyx_8genexpr6__pyx_v_x = 0;
    goto __pyx_L16_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_x); __pyx_8genexpr6__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L16_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1556
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_stock_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 1556, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_update_dict, __pyx_n_s_dict) < 0) __PYX_ERR(0, 1556, __pyx_L1_error)
  __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_1updateSingleStockFinancialData, 0, __pyx_n_s_DataToMysql_updateStockFinancial, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_1, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_updateSingleStockFinancialData = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1605
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1605, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1607
 *         if not multi_thread:
 *             #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for stock_code in tqdm(update_range, desc=table_name):  #
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1607, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1607, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_start_time = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1608
 *             #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 *                 current_time = time.time()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 1608, __pyx_L1_error);
    __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1608, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1608, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1608, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1608, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1608, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1608, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1608, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1608, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_3);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1608, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1609
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=table_name):  #
 *                 updateSingleStockFinancialData(stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      if (!(likely(PyString_CheckExact(__pyx_v_stock_code))||((__pyx_v_stock_code) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_stock_code))) __PYX_ERR(0, 1609, __pyx_L1_error)
      if (!(likely(PyDict_CheckExact(__pyx_v_update_dict))||((__pyx_v_update_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_update_dict))) __PYX_ERR(0, 1609, __pyx_L1_error)
      __pyx_t_2 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStockFinancialToMysql_updateSingleStockFinancialData(__pyx_v_updateSingleStockFinancialData, ((PyObject*)__pyx_v_stock_code), ((PyObject*)__pyx_v_update_dict)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1609, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1610
 *             for stock_code in tqdm(update_range, desc=table_name):  #
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1610, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1610, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1611
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1611, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1611, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1611, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1612
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1612, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1612, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1613
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         else:
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1613, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1613, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1614
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1611
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1608
 *             #
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockFinancialData(stock_code, update_dict)
 *                 current_time = time.time()
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1605
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
    goto __pyx_L17;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1617
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1617, __pyx_L1_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1617, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_3 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1617, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1617, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __pyx_t_3 = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1618
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1618, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_v_futures = ((PyObject*)__pyx_t_3);
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1619
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1619, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1619, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __pyx_t_1 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_1)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_1);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1619, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_v_start_time = __pyx_t_3;
            __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1620
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 *                     futures.append(future)
 */
            __pyx_t_3 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_3);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1620, __pyx_L26_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1620, __pyx_L26_error)
              #else
              __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1620, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1621
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 */
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1621, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_updateSingleStockFinancialData, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1621, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1622
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1622, __pyx_L26_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1620
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1623
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GIVEREF(__pyx_t_9);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L26_error);
            __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1623, __pyx_L26_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1623, __pyx_L26_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1623, __pyx_L26_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_9))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1623, __pyx_L26_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1623, __pyx_L26_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1623, __pyx_L26_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1623, __pyx_L26_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1623, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_9);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1623, __pyx_L26_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1624
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1624, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1624, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_1 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_1)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_1);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1624, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1625
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1625, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1625, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1625, __pyx_L26_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1625, __pyx_L26_error)
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              if (__pyx_t_6) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1626
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_1);
                if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1626, __pyx_L26_error)
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1627
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         if no_fault:
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1627, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_3);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_3))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_3, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_1);
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                }
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1628
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1625
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1623
 *                     future = executor.submit(updateSingleStockFinancialData, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1617
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L31_try_end;
          __pyx_L26_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 1617, __pyx_L28_except_error)
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_9, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1617, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1617, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1617, __pyx_L28_except_error)
            __pyx_t_5 = (!__pyx_t_6);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_XGIVEREF(__pyx_t_3);
              __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_1, __pyx_t_3);
              __pyx_t_9 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0; 
              __PYX_ERR(0, 1617, __pyx_L28_except_error)
            }
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            goto __pyx_L27_exception_handled;
          }
          __pyx_L28_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L27_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L31_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_11) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1617, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L25;
        }
        __pyx_L25:;
      }
      goto __pyx_L42;
      __pyx_L22_error:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L1_error;
      __pyx_L42:;
    }
  }
  __pyx_L17:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1629
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1630
 *                         start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1630, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1629
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1631
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1631, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1632
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1632, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1632, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockFinancialToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_updateSingleStockFinancialData);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr6__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_51updateStockHoldNumberToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_51updateStockHoldNumberToMysql = {"updateStockHoldNumberToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_51updateStockHoldNumberToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_51updateStockHoldNumberToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockHoldNumberToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1634, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1634, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1634, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockHoldNumberToMysql") < 0)) __PYX_ERR(0, 1634, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockHoldNumberToMysql", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 1634, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_50updateStockHoldNumberToMysql(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1669
 *         # update_range = [x for x in update_range if x not in updated_list]
 * 
 *         def updateSingleStockHoldNumber(stock_code, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_1updateSingleStockHoldNumber(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_1updateSingleStockHoldNumber = {"updateSingleStockHoldNumber", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_1updateSingleStockHoldNumber, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_1updateSingleStockHoldNumber(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockHoldNumber (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1669, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1669, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockHoldNumber", 1, 2, 2, 1); __PYX_ERR(0, 1669, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockHoldNumber") < 0)) __PYX_ERR(0, 1669, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_stock_code = values[0];
    __pyx_v_update_dict = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockHoldNumber", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1669, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql.updateSingleStockHoldNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_updateSingleStockHoldNumber(__pyx_self, __pyx_v_stock_code, __pyx_v_update_dict);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_updateSingleStockHoldNumber(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_stock_code_back = NULL;
  PyObject *__pyx_v_stock_zh_a_gdhs = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_max_date_em = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_match_index = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  unsigned int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  int __pyx_t_12;
  int __pyx_t_13;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  char const *__pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockHoldNumber", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1671
 *         def updateSingleStockHoldNumber(stock_code, update_dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1672
 *             nonlocal no_fault
 *             try:
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 *                 if stock_zh_a_gdhs.empty:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1672, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getFullStockCode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1672, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_stock_code, __pyx_kp_s_XX};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_7, 2+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1672, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_v_stock_code_back = __pyx_t_4;
      __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1673
 *             try:
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)             # <<<<<<<<<<<<<<
 *                 if stock_zh_a_gdhs.empty:
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 */
      __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sdc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stock_zh_a_gdhs_detail_em); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1673, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1673, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_symbol, __pyx_v_stock_code_back) < 0) __PYX_ERR(0, 1673, __pyx_L3_error)
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1673, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_v_stock_zh_a_gdhs = __pyx_t_5;
      __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1674
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 *                 if stock_zh_a_gdhs.empty:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                     if stock_code not in update_dict['update_list']:
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_empty); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1674, __pyx_L3_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1674, __pyx_L3_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1675
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 *                 if stock_zh_a_gdhs.empty:
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")             # <<<<<<<<<<<<<<
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_warning); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret);
        __pyx_t_9 += 53;
        __Pyx_GIVEREF(__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret);
        __pyx_t_11 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_11) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_11);
        __Pyx_GIVEREF(__pyx_t_11);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_11);
        __pyx_t_11 = 0;
        __Pyx_INCREF(__pyx_kp_u_maybe_is_new_stock);
        __pyx_t_9 += 21;
        __Pyx_GIVEREF(__pyx_kp_u_maybe_is_new_stock);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u_maybe_is_new_stock);
        __pyx_t_11 = __Pyx_PyUnicode_Join(__pyx_t_6, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1675, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_11};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1676
 *                 if stock_zh_a_gdhs.empty:
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                     if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 */
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1676, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1676, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1677
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)
 */
          __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1677, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1677, __pyx_L3_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1676
 *                 if stock_zh_a_gdhs.empty:
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                     if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1678
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 */
        __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1678, __pyx_L3_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1678, __pyx_L3_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1679
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                     return True
 *             except Exception as e:
 */
          __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1679, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_4);
          __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_remove); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1679, __pyx_L3_error)
          __Pyx_GOTREF(__pyx_t_11);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __pyx_t_4 = NULL;
          __pyx_t_7 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_11))) {
            __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
            if (likely(__pyx_t_4)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
              __Pyx_INCREF(__pyx_t_4);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_11, function);
              __pyx_t_7 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_stock_code};
            __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
            __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1679, __pyx_L3_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1678
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1680
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L7_try_return;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1674
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 *                 if stock_zh_a_gdhs.empty:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"ak.stock_zh_a_gdhs_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                     if stock_code not in update_dict['update_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1671
 *         def updateSingleStockHoldNumber(stock_code, update_dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 */
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L8_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1681
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 */
    __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_13) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql.updateSingleStockHoldNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_11, &__pyx_t_4) < 0) __PYX_ERR(0, 1681, __pyx_L5_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_11);
      __pyx_v_e = __pyx_t_11;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1682
 *                     return True
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_utils); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_14);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d);
        __pyx_t_9 += 52;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_9 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u__21);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_kp_u__22);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1682, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_14))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_14, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1682, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1683
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1684
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1684, __pyx_L17_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_6, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1684, __pyx_L17_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1685
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1685, __pyx_L17_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1685, __pyx_L17_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1684
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1686
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *             #
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L16_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1681
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call stock_zh_a_gdhs_detail_em for code = {stock_code}: {e} ")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L17_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_13 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_13; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L5_except_error;
        }
        __pyx_L16_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L6_except_return;
        }
      }
    }
    goto __pyx_L5_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1671
 *         def updateSingleStockHoldNumber(stock_code, update_dict):
 *             nonlocal no_fault
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_code_back = utils.getFullStockCode(stock_code, '.XX')
 *                 stock_zh_a_gdhs = sdc.stock_zh_a_gdhs_detail_em(symbol=stock_code_back)
 */
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L7_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L8_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1689
 * 
 *             #
 *             max_date_em = stock_zh_a_gdhs['date'].max()             # <<<<<<<<<<<<<<
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 * 
 */
  __pyx_t_11 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_date); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_max); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1689, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1689, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_max_date_em = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1690
 *             #
 *             max_date_em = stock_zh_a_gdhs['date'].max()
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_table is None:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_query); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_16, __pyx_n_s_func); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_max); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_15);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_Globals(); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1690, __pyx_L1_error) }
  __pyx_t_25 = __Pyx_PyObject_GetItem(__pyx_t_16, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_25)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_25);
  __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
  __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_25, __pyx_n_s_date); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_16);
  __Pyx_DECREF(__pyx_t_25); __pyx_t_25 = 0;
  __pyx_t_25 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_15))) {
    __pyx_t_25 = PyMethod_GET_SELF(__pyx_t_15);
    if (likely(__pyx_t_25)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
      __Pyx_INCREF(__pyx_t_25);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_15, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_25, __pyx_t_16};
    __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_15, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
    if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
  }
  __pyx_t_15 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_15)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_15);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_6};
    __pyx_t_11 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_11);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_filter); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_Globals(); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1690, __pyx_L1_error) }
  __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_11, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_code); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = PyObject_RichCompare(__pyx_t_11, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  __pyx_t_11 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_6};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_scalar); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1690, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_14);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_7 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_14))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_14);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_14, function);
      __pyx_t_7 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_14, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
  }
  __pyx_v_max_date_table = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1692
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 * 
 *             if max_date_table is None:             # <<<<<<<<<<<<<<
 *                 pass
 *             elif max_date_table < max_date_em:
 */
  __pyx_t_8 = (__pyx_v_max_date_table == Py_None);
  if (__pyx_t_8) {
    goto __pyx_L24;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1694
 *             if max_date_table is None:
 *                 pass
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 match_index = stock_zh_a_gdhs.index[stock_zh_a_gdhs['date'] == max_date_table].values[0]
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs.iloc[0:match_index]
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_v_max_date_em, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1694, __pyx_L1_error)
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1694, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1695
 *                 pass
 *             elif max_date_table < max_date_em:
 *                 match_index = stock_zh_a_gdhs.index[stock_zh_a_gdhs['date'] == max_date_table].values[0]             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs.iloc[0:match_index]
 *             else:
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_index); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_date); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_14, __pyx_v_max_date_table, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_values); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1695, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_v_match_index = __pyx_t_14;
    __pyx_t_14 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1696
 *             elif max_date_table < max_date_em:
 *                 match_index = stock_zh_a_gdhs.index[stock_zh_a_gdhs['date'] == max_date_table].values[0]
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs.iloc[0:match_index]             # <<<<<<<<<<<<<<
 *             else:
 *                 # utils.logger.info(f"{mode}: stock_zh_a_gdhs of {stock_code} don't need to update.")
 */
    __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_iloc); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_14);
    __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_14, 0, 0, NULL, &__pyx_v_match_index, NULL, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_DECREF_SET(__pyx_v_stock_zh_a_gdhs, __pyx_t_5);
    __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1694
 *             if max_date_table is None:
 *                 pass
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 match_index = stock_zh_a_gdhs.index[stock_zh_a_gdhs['date'] == max_date_table].values[0]
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs.iloc[0:match_index]
 */
    goto __pyx_L24;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1699
 *             else:
 *                 # utils.logger.info(f"{mode}: stock_zh_a_gdhs of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_5, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1699, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1700
 *                 # utils.logger.info(f"{mode}: stock_zh_a_gdhs of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1700, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1700, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1699
 *             else:
 *                 # utils.logger.info(f"{mode}: stock_zh_a_gdhs of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1701
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_5, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1701, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (__pyx_t_8) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1702
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 *             try:
 */
      __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1702, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_stock_code};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1702, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1701
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1703
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 *             try:
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
  __pyx_L24:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1704
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_2, &__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_1);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1705
 *                 return True
 *             try:
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if stock_code not in update_dict['update_list']:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1705, __pyx_L27_error) }
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1705, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_14 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, NULL};
        __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_7, 0+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1705, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      }
      __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_stock_zh_a_gdhs, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1705, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF_SET(__pyx_v_stock_zh_a_gdhs, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1706
 *             try:
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_stock_zh_a_gdhs, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1706, __pyx_L27_error) }
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 1706, __pyx_L27_error);
      __pyx_t_14 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_engine); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_con, __pyx_t_6) < 0) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1706, __pyx_L27_error)
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1706, __pyx_L27_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1706, __pyx_L27_error) }
      if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1706, __pyx_L27_error)
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1706, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1707
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1707, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_6, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1707, __pyx_L27_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1708
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
        __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1708, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1708, __pyx_L27_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1707
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1709
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 */
      __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1709, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_6, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1709, __pyx_L27_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1710
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 *                 return True
 */
        __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1710, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_remove); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1710, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        __pyx_t_14 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_5))) {
          __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
          if (likely(__pyx_t_14)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
            __Pyx_INCREF(__pyx_t_14);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_5, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_v_stock_code};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1710, __pyx_L27_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1709
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1711
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")             # <<<<<<<<<<<<<<
 *                 return True
 *             except Exception as e:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = PyTuple_New(5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_14);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_Succeed_save_in);
      __pyx_t_9 += 16;
      __Pyx_GIVEREF(__pyx_kp_u_Succeed_save_in);
      PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_kp_u_Succeed_save_in);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1711, __pyx_L27_error) }
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u_for_code);
      __pyx_t_9 += 12;
      __Pyx_GIVEREF(__pyx_kp_u_for_code);
      PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_kp_u_for_code);
      __pyx_t_4 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_t_4);
      __pyx_t_4 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_9 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_kp_u__5);
      __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_14, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L27_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_14 = NULL;
      __pyx_t_7 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_14)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_14);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_14, __pyx_t_4};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
        __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1711, __pyx_L27_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1712
 *                     update_dict['failed_list'].remove(stock_code)
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 *                 return True             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L31_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1704
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    }
    __pyx_L27_error:;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1713
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 */
    __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_17) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql.updateSingleStockHoldNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 1713, __pyx_L29_except_error)
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_e = __pyx_t_5;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1714
 *                 return True
 *             except Exception as e:
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyTuple_New(5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_9 = 0;
        __pyx_t_10 = 127;
        __Pyx_INCREF(__pyx_kp_u_Data_failed_save_in);
        __pyx_t_9 += 20;
        __Pyx_GIVEREF(__pyx_kp_u_Data_failed_save_in);
        PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_kp_u_Data_failed_save_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1714, __pyx_L40_error) }
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u_err_is);
        __pyx_t_9 += 9;
        __Pyx_GIVEREF(__pyx_kp_u_err_is);
        PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_kp_u_err_is);
        __pyx_t_16 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_16);
        __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_16) : __pyx_t_10;
        __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
        __Pyx_GIVEREF(__pyx_t_16);
        PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_16);
        __pyx_t_16 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_9 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_kp_u__5);
        __pyx_t_16 = __Pyx_PyUnicode_Join(__pyx_t_15, 5, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1714, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = NULL;
        __pyx_t_7 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_7 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, __pyx_t_16};
          __pyx_t_14 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
          if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1714, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_14);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1715
 *             except Exception as e:
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1716
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1716, __pyx_L40_error)
        __Pyx_GOTREF(__pyx_t_14);
        __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_14, Py_NE)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1716, __pyx_L40_error)
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        if (__pyx_t_8) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1717
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_14 = __Pyx_PyObject_Dict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1717, __pyx_L40_error)
          __Pyx_GOTREF(__pyx_t_14);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_14, __pyx_v_stock_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1717, __pyx_L40_error)
          __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1716
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1718
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if not multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L39_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1713
 *                 utils.logger.info(f"Succeed save in {table_name} for code = {stock_code}.")
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Data failed save in {table_name}, err is {e}.")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L40_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
          __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_17 = __pyx_lineno; __pyx_t_13 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          }
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_13; __pyx_filename = __pyx_t_26;
          goto __pyx_L29_except_error;
        }
        __pyx_L39_return: {
          __pyx_t_19 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_19;
          __pyx_t_19 = 0;
          goto __pyx_L30_except_return;
        }
      }
    }
    goto __pyx_L29_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1704
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             try:             # <<<<<<<<<<<<<<
 *                 stock_zh_a_gdhs = stock_zh_a_gdhs[dtype_mapping.keys()]
 *                 stock_zh_a_gdhs.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    __pyx_L29_except_error:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L1_error;
    __pyx_L31_try_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
    __pyx_L30_except_return:;
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_2, __pyx_t_1);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1669
 *         # update_range = [x for x in update_range if x not in updated_list]
 * 
 *         def updateSingleStockHoldNumber(stock_code, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_XDECREF(__pyx_t_25);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql.updateSingleStockHoldNumber", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_stock_code_back);
  __Pyx_XDECREF(__pyx_v_stock_zh_a_gdhs);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_max_date_em);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_match_index);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_50updateStockHoldNumberToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_all_stock_simple_info = NULL;
  PyObject *__pyx_v_update_range = NULL;
  PyObject *__pyx_v_updateSingleStockHoldNumber = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_stock_code = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr7__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  int __pyx_t_15;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockHoldNumberToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1634, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1635
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'stock_hold_number'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1635, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1636
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_stock_hold_number);
  __Pyx_GIVEREF(__pyx_n_s_stock_hold_number);
  __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_hold_number;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1637
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1640
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False, "failed_list": [], "update_list": []}
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1641
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False, "failed_list": [], "update_list": []}             # <<<<<<<<<<<<<<
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1643
 *         update_dict = {"updated": False, "failed_list": [], "update_list": []}
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1643, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1644
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1644, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1644, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1645
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1645, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1645, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1646
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 * 
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1644
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1649
 *             else:
 * 
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1649, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1650
 * 
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1650, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1643
 *         update_dict = {"updated": False, "failed_list": [], "update_list": []}
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1652
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1652, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1652, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1655
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1655, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1656
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1656, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1657
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1657, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1657, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1656
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1660
 * 
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()             # <<<<<<<<<<<<<<
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getStockSimpleInfo); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1660, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1660, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_all_stock_simple_info = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1661
 *         #
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()             # <<<<<<<<<<<<<<
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_all_stock_simple_info, __pyx_n_s_code); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_to_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1661, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1661, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_update_range = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1662
 *         all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 *         update_range = all_stock_simple_info['code'].to_list()
 *         update_range = [x for x in update_range if x not in updated_list]  #             # <<<<<<<<<<<<<<
 * 
 *         # all_stock_simple_info = self.dataproc.getStockSimpleInfo()
 */
  { /* enter inner scope */
    __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1662, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (likely(PyList_CheckExact(__pyx_v_update_range)) || PyTuple_CheckExact(__pyx_v_update_range)) {
      __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_update_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1662, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1662, __pyx_L10_error)
    }
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1662, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1662, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1662, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1662, __pyx_L10_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1662, __pyx_L10_error)
          #else
          __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1662, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_9);
          #endif
        }
      } else {
        __pyx_t_9 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_9)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1662, __pyx_L10_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_9);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_x, __pyx_t_9);
      __pyx_t_9 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr7__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1662, __pyx_L10_error)
      if (__pyx_t_5) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_8genexpr7__pyx_v_x))) __PYX_ERR(0, 1662, __pyx_L10_error)
      }
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x); __pyx_8genexpr7__pyx_v_x = 0;
    goto __pyx_L15_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x); __pyx_8genexpr7__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L15_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_update_range, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1669
 *         # update_range = [x for x in update_range if x not in updated_list]
 * 
 *         def updateSingleStockHoldNumber(stock_code, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_1updateSingleStockHoldNumber, 0, __pyx_n_s_DataToMysql_updateStockHoldNumbe, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_v_updateSingleStockHoldNumber = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1720
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1720, __pyx_L1_error)
  __pyx_t_6 = (!__pyx_t_5);
  if (__pyx_t_6) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1721
 * 
 *         if not multi_thread:
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1721, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_v_start_time = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1722
 *         if not multi_thread:
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 *                 current_time = time.time()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_INCREF(__pyx_v_update_range);
    __Pyx_GIVEREF(__pyx_v_update_range);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_update_range)) __PYX_ERR(0, 1722, __pyx_L1_error);
    __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 1722, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
      __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1722, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    for (;;) {
      if (likely(!__pyx_t_10)) {
        if (likely(PyList_CheckExact(__pyx_t_1))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1722, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1722, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1722, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1722, __pyx_L1_error)
          #else
          __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          #endif
        }
      } else {
        __pyx_t_2 = __pyx_t_10(__pyx_t_1);
        if (unlikely(!__pyx_t_2)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1722, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_2);
      }
      __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1723
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockHoldNumber(stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      __pyx_t_2 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_28updateStockHoldNumberToMysql_updateSingleStockHoldNumber(__pyx_v_updateSingleStockHoldNumber, __pyx_v_stock_code, __pyx_v_update_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1723, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1724
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1724, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1725
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1725, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1726
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1726, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1726, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1727
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         else:
 */
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1727, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1727, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1728
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1725
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1722
 *         if not multi_thread:
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockHoldNumber(stock_code, update_dict)
 *                 current_time = time.time()
 */
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1720
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             start_time = time.time()
 *             for stock_code in tqdm(update_range, desc=fun_name):  #
 */
    goto __pyx_L16;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1730
 *                     start_time = current_time
 *         else:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1730, __pyx_L1_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_11 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_exit); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1730, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_11);
      __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_3, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L21_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1730, __pyx_L21_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __pyx_t_9;
      __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1731
 *         else:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 */
            __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_v_futures = ((PyObject*)__pyx_t_1);
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1732
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1732, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1732, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_v_start_time = __pyx_t_1;
            __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1733
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 *                     futures.append(future)
 */
            __pyx_t_1 = __pyx_v_update_range; __Pyx_INCREF(__pyx_t_1);
            __pyx_t_7 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1733, __pyx_L25_error)
                #endif
                if (__pyx_t_7 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_9 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_9); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1733, __pyx_L25_error)
              #else
              __pyx_t_9 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1733, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_9);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_stock_code, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1734
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):
 */
              __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1734, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_3))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_3, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_2, __pyx_v_updateSingleStockHoldNumber, __pyx_v_stock_code, __pyx_v_update_dict};
                __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1734, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_9);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1735
 *                 for stock_code in update_range:  #
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_15 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 1735, __pyx_L25_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1733
 *                 futures = []
 *                 start_time = time.time()
 *                 for stock_code in update_range:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1736
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_3))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_3, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1736, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            }
            __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_GIVEREF(__pyx_t_9);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_9)) __PYX_ERR(0, 1736, __pyx_L25_error);
            __pyx_t_9 = 0;
            __pyx_t_9 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_9);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 1736, __pyx_L25_error)
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_mininterval, __pyx_float_0_01) < 0) __PYX_ERR(0, 1736, __pyx_L25_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1736, __pyx_L25_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_9, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_9 = __pyx_t_2; __Pyx_INCREF(__pyx_t_9);
              __pyx_t_7 = 0;
              __pyx_t_10 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1736, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1736, __pyx_L25_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_10)) {
                if (likely(PyList_CheckExact(__pyx_t_9))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1736, __pyx_L25_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1736, __pyx_L25_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_9);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1736, __pyx_L25_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 1736, __pyx_L25_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_9, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1736, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_10(__pyx_t_9);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1736, __pyx_L25_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1737
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1737, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1737, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1737, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1738
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1738, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1738, __pyx_L25_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1738, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1738, __pyx_L25_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_6) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1739
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1739, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_3);
                if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1739, __pyx_L25_error)
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1740
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L25_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1740, __pyx_L25_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1741
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1738
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1736
 *                     future = executor.submit(updateSingleStockHoldNumber, stock_code, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=fun_name, mininterval=0.01, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1742
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
            __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1742, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1742, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_wait, Py_True) < 0) __PYX_ERR(0, 1742, __pyx_L25_error)
            __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1742, __pyx_L25_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1730
 *                     start_time = current_time
 *         else:
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          goto __pyx_L30_try_end;
          __pyx_L25_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_3, &__pyx_t_9) < 0) __PYX_ERR(0, 1730, __pyx_L27_except_error)
            __Pyx_XGOTREF(__pyx_t_1);
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L27_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1730, __pyx_L27_except_error)
            __Pyx_GOTREF(__pyx_t_16);
            __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_16);
            __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
            if (__pyx_t_6 < 0) __PYX_ERR(0, 1730, __pyx_L27_except_error)
            __pyx_t_5 = (!__pyx_t_6);
            if (unlikely(__pyx_t_5)) {
              __Pyx_GIVEREF(__pyx_t_1);
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_XGIVEREF(__pyx_t_9);
              __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_3, __pyx_t_9);
              __pyx_t_1 = 0; __pyx_t_3 = 0; __pyx_t_9 = 0; 
              __PYX_ERR(0, 1730, __pyx_L27_except_error)
            }
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            goto __pyx_L26_exception_handled;
          }
          __pyx_L27_except_error:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          goto __pyx_L1_error;
          __pyx_L26_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
          __pyx_L30_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_11) {
            __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
            if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1730, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_14);
            __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
          }
          goto __pyx_L24;
        }
        __pyx_L24:;
      }
      goto __pyx_L41;
      __pyx_L21_error:;
      __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
      goto __pyx_L1_error;
      __pyx_L41:;
    }
  }
  __pyx_L16:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1743
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1744
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1744, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1743
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1745
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1745, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1746
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1746, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1746, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockHoldNumberToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_all_stock_simple_info);
  __Pyx_XDECREF(__pyx_v_update_range);
  __Pyx_XDECREF(__pyx_v_updateSingleStockHoldNumber);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_stock_code);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr7__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1748
 *         self.dumpJsonToFile()
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_53updateRzrqHsgtTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_53updateRzrqHsgtTradeDayToMysql = {"updateRzrqHsgtTradeDayToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_53updateRzrqHsgtTradeDayToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_53updateRzrqHsgtTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_concept = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateRzrqHsgtTradeDayToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_concept,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_rzrq)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1748, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_concept);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1748, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateRzrqHsgtTradeDayToMysql") < 0)) __PYX_ERR(0, 1748, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_concept = values[1];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateRzrqHsgtTradeDayToMysql", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 1748, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_52updateRzrqHsgtTradeDayToMysql(__pyx_self, __pyx_v_self, __pyx_v_concept);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_52updateRzrqHsgtTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept) {
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_table_name = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_dtype_mapping = NULL;
  PyObject *__pyx_v_max_date = NULL;
  PyObject *__pyx_v_mode = NULL;
  PyObject *__pyx_v_concept_history_df = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  char const *__pyx_t_25;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateRzrqHsgtTradeDayToMysql", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1749
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         if concept == 'rzrq':  # rzrq
 *             table_name = 'rzrq_trade_day'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1750
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq             # <<<<<<<<<<<<<<
 *             table_name = 'rzrq_trade_day'
 *         else:  # hsgt
 */
  __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_concept, __pyx_n_s_rzrq, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1750, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1751
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq
 *             table_name = 'rzrq_trade_day'             # <<<<<<<<<<<<<<
 *         else:  # hsgt
 *             table_name = 'hsgt_trade_day'
 */
    __Pyx_INCREF(__pyx_n_s_rzrq_trade_day);
    __pyx_v_table_name = __pyx_n_s_rzrq_trade_day;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1750
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq             # <<<<<<<<<<<<<<
 *             table_name = 'rzrq_trade_day'
 *         else:  # hsgt
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1753
 *             table_name = 'rzrq_trade_day'
 *         else:  # hsgt
 *             table_name = 'hsgt_trade_day'             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_hsgt_trade_day);
    __pyx_v_table_name = __pyx_n_s_hsgt_trade_day;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1756
 * 
 *         # jsonjson
 *         update_dict = {"updated": False}             # <<<<<<<<<<<<<<
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1756, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1756, __pyx_L1_error)
  __pyx_v_update_dict = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1758
 *         update_dict = {"updated": False}
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1758, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1759
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1759, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1760
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated);
      __pyx_t_7 += 24;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1760, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1760, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1761
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {concept}")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1759
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1758
 *         update_dict = {"updated": False}
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated.')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1763
 *                 return True
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {concept}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_7 = 0;
  __pyx_t_8 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_7 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_kp_u_Beginning);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_7 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_kp_u__21);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_8;
  __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_2);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_9, 4, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1763, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1763, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1766
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1766, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1766, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_dtype_mapping = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1767
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1767, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1768
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         max_date = session.query(func.max(globals()[table_name].date)).scalar()
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1768, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1768, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1767
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1770
 *             dtype_mapping.pop('id')
 * 
 *         max_date = session.query(func.max(globals()[table_name].date)).scalar()             # <<<<<<<<<<<<<<
 *         if max_date:
 *             mode = 'new'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_session); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_query); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_func); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_max); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_11);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_Globals(); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_t_10, __pyx_v_table_name); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_12);
  __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
  __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_date); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_10);
  __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
  __pyx_t_12 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_11))) {
    __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
    if (likely(__pyx_t_12)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
      __Pyx_INCREF(__pyx_t_12);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_11, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
  }
  __pyx_t_11 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_11)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_11);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_11, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_scalar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1770, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1770, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_max_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1771
 * 
 *         max_date = session.query(func.max(globals()[table_name].date)).scalar()
 *         if max_date:             # <<<<<<<<<<<<<<
 *             mode = 'new'
 *         else:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_date); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1771, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1772
 *         max_date = session.query(func.max(globals()[table_name].date)).scalar()
 *         if max_date:
 *             mode = 'new'             # <<<<<<<<<<<<<<
 *         else:
 *             mode = 'all'
 */
    __Pyx_INCREF(__pyx_n_s_new);
    __pyx_v_mode = __pyx_n_s_new;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1771
 * 
 *         max_date = session.query(func.max(globals()[table_name].date)).scalar()
 *         if max_date:             # <<<<<<<<<<<<<<
 *             mode = 'new'
 *         else:
 */
    goto __pyx_L9;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1774
 *             mode = 'new'
 *         else:
 *             mode = 'all'             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_all);
    __pyx_v_mode = __pyx_n_s_all;
  }
  __pyx_L9:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1776
 *             mode = 'all'
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if concept == 'rzrq':  # rzrq
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1777
 * 
 *         try:
 *             if concept == 'rzrq':  # rzrq             # <<<<<<<<<<<<<<
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 *             else:  # hsgt
 */
      __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_concept, __pyx_n_s_rzrq, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1777, __pyx_L10_error)
      if (__pyx_t_5) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1778
 *         try:
 *             if concept == 'rzrq':  # rzrq
 *                 concept_history_df = sdc.rzrq_history(mode)  #             # <<<<<<<<<<<<<<
 *             else:  # hsgt
 *                 concept_history_df = sdc.hsgt_history(mode)  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sdc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1778, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_rzrq_history); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1778, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_3))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_3, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_mode};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1778, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        }
        __pyx_v_concept_history_df = __pyx_t_1;
        __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1777
 * 
 *         try:
 *             if concept == 'rzrq':  # rzrq             # <<<<<<<<<<<<<<
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 *             else:  # hsgt
 */
        goto __pyx_L16;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1780
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 *             else:  # hsgt
 *                 concept_history_df = sdc.hsgt_history(mode)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call sdc.{concept}_history: {e}.")
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_sdc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1780, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_hsgt_history); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1780, __pyx_L10_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (unlikely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_mode};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1780, __pyx_L10_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __pyx_v_concept_history_df = __pyx_t_1;
        __pyx_t_1 = 0;
      }
      __pyx_L16:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1776
 *             mode = 'all'
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if concept == 'rzrq':  # rzrq
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 */
    }
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
    __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
    goto __pyx_L15_try_end;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1781
 *             else:  # hsgt
 *                 concept_history_df = sdc.hsgt_history(mode)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call sdc.{concept}_history: {e}.")
 *             return False
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 1781, __pyx_L12_except_error)
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __pyx_v_e = __pyx_t_2;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1782
 *                 concept_history_df = sdc.hsgt_history(mode)  #
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call sdc.{concept}_history: {e}.")             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = PyTuple_New(5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_sdc);
        __pyx_t_7 += 19;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_sdc);
        PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u_Failed_to_call_sdc);
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u_history);
        __pyx_t_7 += 10;
        __Pyx_GIVEREF(__pyx_kp_u_history);
        PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_kp_u_history);
        __pyx_t_12 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_12) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_12);
        __Pyx_GIVEREF(__pyx_t_12);
        PyTuple_SET_ITEM(__pyx_t_10, 3, __pyx_t_12);
        __pyx_t_12 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_7 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_10, 4, __pyx_kp_u__5);
        __pyx_t_12 = __Pyx_PyUnicode_Join(__pyx_t_10, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1782, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        __pyx_t_10 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, __pyx_t_12};
          __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
          if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1782, __pyx_L22_error)
          __Pyx_GOTREF(__pyx_t_9);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1783
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call sdc.{concept}_history: {e}.")
 *             return False             # <<<<<<<<<<<<<<
 * 
 *         if max_date:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L21_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1781
 *             else:  # hsgt
 *                 concept_history_df = sdc.hsgt_history(mode)  #
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed to call sdc.{concept}_history: {e}.")
 *             return False
 */
      /*finally:*/ {
        __pyx_L22_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L12_except_error;
        }
        __pyx_L21_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L13_except_return;
        }
      }
    }
    goto __pyx_L12_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1776
 *             mode = 'all'
 * 
 *         try:             # <<<<<<<<<<<<<<
 *             if concept == 'rzrq':  # rzrq
 *                 concept_history_df = sdc.rzrq_history(mode)  #
 */
    __pyx_L12_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L13_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L15_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1785
 *             return False
 * 
 *         if max_date:             # <<<<<<<<<<<<<<
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]
 *             if concept_history_df.empty:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_max_date); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1785, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1786
 * 
 *         if max_date:
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]             # <<<<<<<<<<<<<<
 *             if concept_history_df.empty:
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_concept_history_df, __pyx_n_s_date); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_v_max_date, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_concept_history_df, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1786, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF_SET(__pyx_v_concept_history_df, __pyx_t_3);
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1787
 *         if max_date:
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]
 *             if concept_history_df.empty:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")
 *                 update_dict['updated'] = True
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_concept_history_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1787, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1787, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1788
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]
 *             if concept_history_df.empty:
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")             # <<<<<<<<<<<<<<
 *                 update_dict['updated'] = True
 *                 self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_Don_t_need_to_update);
      __pyx_t_7 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_Don_t_need_to_update);
      PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u_Don_t_need_to_update);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_data_has_not_update_from_networ);
      __pyx_t_7 += 35;
      __Pyx_GIVEREF(__pyx_kp_u_data_has_not_update_from_networ);
      PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_data_has_not_update_from_networ);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_1, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1788, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_t_9};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1788, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1789
 *             if concept_history_df.empty:
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")
 *                 update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()
 */
      if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1789, __pyx_L1_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1790
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")
 *                 update_dict['updated'] = True
 *                 self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                 self.dumpJsonToFile()
 *                 return True
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1790, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1790, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1791
 *                 update_dict['updated'] = True
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1791, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1791, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1792
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         # to_sqldtype
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1787
 *         if max_date:
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]
 *             if concept_history_df.empty:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f"Don't need to update {table_name}, data has not update from network.")
 *                 update_dict['updated'] = True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1785
 *             return False
 * 
 *         if max_date:             # <<<<<<<<<<<<<<
 *             concept_history_df = concept_history_df[concept_history_df.date > max_date]
 *             if concept_history_df.empty:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1795
 * 
 *         # to_sqldtype
 *         try:             # <<<<<<<<<<<<<<
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_13);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1796
 *         # to_sqldtype
 *         try:
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_9)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_9);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1796, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_concept_history_df, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1796, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF_SET(__pyx_v_concept_history_df, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1797
 *         try:
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *             utils.logger.info(f"Succeed update {table_name}.")
 *             update_dict['updated'] = True
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_concept_history_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_v_table_name) < 0) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_engine); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_con, __pyx_t_9) < 0) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1797, __pyx_L30_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1797, __pyx_L30_error)
      if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_dtype, __pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1797, __pyx_L30_error)
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1797, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1798
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_Succeed_update);
      __pyx_t_7 += 15;
      __Pyx_GIVEREF(__pyx_kp_u_Succeed_update);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Succeed_update);
      __pyx_t_1 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_INCREF(__pyx_kp_u__5);
      __pyx_t_7 += 1;
      __Pyx_GIVEREF(__pyx_kp_u__5);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__5);
      __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1798, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_1};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1798, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1799
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *             utils.logger.info(f"Succeed update {table_name}.")
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
      if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1799, __pyx_L30_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1800
 *             utils.logger.info(f"Succeed update {table_name}.")
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *             return True
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1800, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1800, __pyx_L30_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1801
 *             update_dict['updated'] = True
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *             return True
 * 
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1801, __pyx_L30_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1801, __pyx_L30_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1802
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 *             return True             # <<<<<<<<<<<<<<
 * 
 *         except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L34_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1795
 * 
 *         # to_sqldtype
 *         try:             # <<<<<<<<<<<<<<
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    }
    __pyx_L30_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1804
 *             return True
 * 
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed update {table_name}, err is {e}.")
 *             update_dict['updated'] = False
 */
    __pyx_t_17 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_17) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_1) < 0) __PYX_ERR(0, 1804, __pyx_L32_except_error)
      __Pyx_XGOTREF(__pyx_t_9);
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __pyx_v_e = __pyx_t_3;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1805
 * 
 *         except Exception as e:
 *             utils.logger.error(f"Failed update {table_name}, err is {e}.")             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = False
 *             self.update_json[table_name] = update_dict
 */
        __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_utils); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_logger); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_12);
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = PyTuple_New(5); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_12);
        __pyx_t_7 = 0;
        __pyx_t_8 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_update);
        __pyx_t_7 += 14;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_update);
        PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_kp_u_Failed_update);
        __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_INCREF(__pyx_kp_u_err_is);
        __pyx_t_7 += 9;
        __Pyx_GIVEREF(__pyx_kp_u_err_is);
        PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_kp_u_err_is);
        __pyx_t_10 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_10);
        __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_10) : __pyx_t_8;
        __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_10);
        __Pyx_GIVEREF(__pyx_t_10);
        PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_10);
        __pyx_t_10 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_7 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_12, 4, __pyx_kp_u__5);
        __pyx_t_10 = __Pyx_PyUnicode_Join(__pyx_t_12, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1805, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
        __pyx_t_12 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_12)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_12);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_12, __pyx_t_10};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1805, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1806
 *         except Exception as e:
 *             utils.logger.error(f"Failed update {table_name}, err is {e}.")
 *             update_dict['updated'] = False             # <<<<<<<<<<<<<<
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 */
        if (unlikely((PyDict_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_False) < 0))) __PYX_ERR(0, 1806, __pyx_L41_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1807
 *             utils.logger.error(f"Failed update {table_name}, err is {e}.")
 *             update_dict['updated'] = False
 *             self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *             self.dumpJsonToFile()
 *             return False
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1807, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1807, __pyx_L41_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1808
 *             update_dict['updated'] = False
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *             return False
 * 
 */
        __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1808, __pyx_L41_error)
        __Pyx_GOTREF(__pyx_t_11);
        __pyx_t_10 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_11))) {
          __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
          if (likely(__pyx_t_10)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
            __Pyx_INCREF(__pyx_t_10);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_11, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_10, NULL};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_11, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1808, __pyx_L41_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1809
 *             self.update_json[table_name] = update_dict
 *             self.dumpJsonToFile()
 *             return False             # <<<<<<<<<<<<<<
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        goto __pyx_L40_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1804
 *             return True
 * 
 *         except Exception as e:             # <<<<<<<<<<<<<<
 *             utils.logger.error(f"Failed update {table_name}, err is {e}.")
 *             update_dict['updated'] = False
 */
      /*finally:*/ {
        __pyx_L41_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_21, &__pyx_t_20, &__pyx_t_19);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_24, &__pyx_t_23, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_19);
          __pyx_t_17 = __pyx_lineno; __pyx_t_16 = __pyx_clineno; __pyx_t_25 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_XGIVEREF(__pyx_t_19);
            __Pyx_ExceptionReset(__pyx_t_21, __pyx_t_20, __pyx_t_19);
          }
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_24, __pyx_t_23, __pyx_t_22);
          __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0; __pyx_t_19 = 0;
          __pyx_lineno = __pyx_t_17; __pyx_clineno = __pyx_t_16; __pyx_filename = __pyx_t_25;
          goto __pyx_L32_except_error;
        }
        __pyx_L40_return: {
          __pyx_t_19 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_19;
          __pyx_t_19 = 0;
          goto __pyx_L33_except_return;
        }
      }
    }
    goto __pyx_L32_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1795
 * 
 *         # to_sqldtype
 *         try:             # <<<<<<<<<<<<<<
 *             concept_history_df = concept_history_df[dtype_mapping.keys()]
 *             concept_history_df.to_sql(name=table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    __pyx_L32_except_error:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
    goto __pyx_L1_error;
    __pyx_L34_try_return:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L33_except_return:;
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1748
 *         self.dumpJsonToFile()
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_XDECREF(__pyx_t_12);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_table_name);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_dtype_mapping);
  __Pyx_XDECREF(__pyx_v_max_date);
  __Pyx_XDECREF(__pyx_v_mode);
  __Pyx_XDECREF(__pyx_v_concept_history_df);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_55updateStockRzrqHsgtTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_55updateStockRzrqHsgtTradeDayToMysql = {"updateStockRzrqHsgtTradeDayToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_55updateStockRzrqHsgtTradeDayToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_55updateStockRzrqHsgtTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_concept = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[4] = {0,0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockRzrqHsgtTradeDayToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_concept,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_n_s_rzrq)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1811, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_concept);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1811, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1811, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  3:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1811, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateStockRzrqHsgtTradeDayToMysql") < 0)) __PYX_ERR(0, 1811, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
        CYTHON_FALLTHROUGH;
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_concept = values[1];
    __pyx_v_multi_thread = values[2];
    __pyx_v_workers = values[3];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateStockRzrqHsgtTradeDayToMysql", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 1811, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_54updateStockRzrqHsgtTradeDayToMysql(__pyx_self, __pyx_v_self, __pyx_v_concept, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1850
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 * 
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_1updateSingleStockRzrqHsgtData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_1updateSingleStockRzrqHsgtData = {"updateSingleStockRzrqHsgtData", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_1updateSingleStockRzrqHsgtData, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_1updateSingleStockRzrqHsgtData(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_stock_code = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[2] = {0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleStockRzrqHsgtData (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stock_code,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_stock_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1850, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1850, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleStockRzrqHsgtData", 1, 2, 2, 1); __PYX_ERR(0, 1850, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleStockRzrqHsgtData") < 0)) __PYX_ERR(0, 1850, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 2)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
    }
    __pyx_v_stock_code = ((PyObject*)values[0]);
    __pyx_v_update_dict = ((PyObject*)values[1]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleStockRzrqHsgtData", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1850, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql.updateSingleStockRzrqHsgtData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stock_code), (&PyString_Type), 0, "stock_code", 1))) __PYX_ERR(0, 1850, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_update_dict), (&PyDict_Type), 0, "update_dict", 1))) __PYX_ERR(0, 1850, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_updateSingleStockRzrqHsgtData(__pyx_self, __pyx_v_stock_code, __pyx_v_update_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_updateSingleStockRzrqHsgtData(PyObject *__pyx_self, PyObject *__pyx_v_stock_code, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_mode = NULL;
  PyObject *__pyx_v_concept_trade_data_df = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_v_data = NULL;
  PyObject *__pyx_v_max_date_em = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  unsigned int __pyx_t_9;
  int __pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_t_14;
  Py_ssize_t __pyx_t_15;
  Py_UCS4 __pyx_t_16;
  int __pyx_t_17;
  int __pyx_t_18;
  char const *__pyx_t_19;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  PyObject *__pyx_t_25 = NULL;
  char const *__pyx_t_26;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleStockRzrqHsgtData", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1852
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()             # <<<<<<<<<<<<<<
 *             if max_date_table:
 *                 mode = 'new'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_session); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_query); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_func); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_max); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_Globals(); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1852, __pyx_L1_error) }
  __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_8 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_8)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_8, __pyx_t_6};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  }
  __pyx_t_7 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_4};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_filter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1852, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_stock_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_4};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_scalar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1852, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_max_date_table = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1853
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 *             if max_date_table:             # <<<<<<<<<<<<<<
 *                 mode = 'new'
 *             else:
 */
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_table); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1853, __pyx_L1_error)
  if (__pyx_t_10) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1854
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 *             if max_date_table:
 *                 mode = 'new'             # <<<<<<<<<<<<<<
 *             else:
 *                 mode = 'all'
 */
    __Pyx_INCREF(__pyx_n_s_new);
    __pyx_v_mode = __pyx_n_s_new;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1853
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 *             if max_date_table:             # <<<<<<<<<<<<<<
 *                 mode = 'new'
 *             else:
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1856
 *                 mode = 'new'
 *             else:
 *                 mode = 'all'             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_all);
    __pyx_v_mode = __pyx_n_s_all;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1858
 *                 mode = 'all'
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 if concept == 'rzrq':
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_13);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1859
 * 
 *             try:
 *                 if concept == 'rzrq':             # <<<<<<<<<<<<<<
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 *                 else:
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_concept)) { __Pyx_RaiseClosureNameError("concept"); __PYX_ERR(0, 1859, __pyx_L4_error) }
      __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_concept, __pyx_n_s_rzrq, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1859, __pyx_L4_error)
      if (__pyx_t_10) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1860
 *             try:
 *                 if concept == 'rzrq':
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #             # <<<<<<<<<<<<<<
 *                 else:
 *                     concept_trade_data_df = sdc.stock_hsgt_detail(mode, symbol=stock_code)  #
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sdc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_rzrq_detail); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1860, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1860, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_v_mode);
        __Pyx_GIVEREF(__pyx_v_mode);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_mode)) __PYX_ERR(0, 1860, __pyx_L4_error);
        __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1860, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 1860, __pyx_L4_error)
        __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1860, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_v_concept_trade_data_df = __pyx_t_4;
        __pyx_t_4 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1859
 * 
 *             try:
 *                 if concept == 'rzrq':             # <<<<<<<<<<<<<<
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 *                 else:
 */
        goto __pyx_L10;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1862
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 *                 else:
 *                     concept_trade_data_df = sdc.stock_hsgt_detail(mode, symbol=stock_code)  #             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 */
      /*else*/ {
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sdc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_stock_hsgt_detail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1862, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_mode);
        __Pyx_GIVEREF(__pyx_v_mode);
        if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_mode)) __PYX_ERR(0, 1862, __pyx_L4_error);
        __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_stock_code) < 0) __PYX_ERR(0, 1862, __pyx_L4_error)
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1862, __pyx_L4_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_v_concept_trade_data_df = __pyx_t_5;
        __pyx_t_5 = 0;
      }
      __pyx_L10:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1858
 *                 mode = 'all'
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 if concept == 'rzrq':
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 */
    }
    __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
    __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
    __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
    goto __pyx_L9_try_end;
    __pyx_L4_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1863
 *                 else:
 *                     concept_trade_data_df = sdc.stock_hsgt_detail(mode, symbol=stock_code)  #
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 *                 if data.empty:
 */
    __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_14) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql.updateSingleStockRzrqHsgtData", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_1, &__pyx_t_4) < 0) __PYX_ERR(0, 1863, __pyx_L6_except_error)
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1864
 *                     concept_trade_data_df = sdc.stock_hsgt_detail(mode, symbol=stock_code)  #
 *             except Exception as e:
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)             # <<<<<<<<<<<<<<
 *                 if data.empty:
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 */
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1864, __pyx_L16_error) }
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1864, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_loadTableContentByCode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1864, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1864, __pyx_L16_error) }
        __pyx_t_3 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_7))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_7, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_stock_code};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1864, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        }
        __pyx_v_data = __pyx_t_2;
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1865
 *             except Exception as e:
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 *                 if data.empty:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 *                     if stock_code not in update_dict['update_list']:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1865, __pyx_L16_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1865, __pyx_L16_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_10) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1866
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 *                 if data.empty:
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")             # <<<<<<<<<<<<<<
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 */
          __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_utils); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_warning); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = PyTuple_New(7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_15 = 0;
          __pyx_t_16 = 127;
          __Pyx_INCREF(__pyx_kp_u_The);
          __pyx_t_15 += 4;
          __Pyx_GIVEREF(__pyx_kp_u_The);
          PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The);
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_INCREF(__pyx_kp_u_is_new);
          __pyx_t_15 += 8;
          __Pyx_GIVEREF(__pyx_kp_u_is_new);
          PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_is_new);
          if (unlikely(!__pyx_cur_scope->__pyx_v_concept)) { __Pyx_RaiseClosureNameError("concept"); __PYX_ERR(0, 1866, __pyx_L16_error) }
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_INCREF(__pyx_kp_u_stock);
          __pyx_t_15 += 8;
          __Pyx_GIVEREF(__pyx_kp_u_stock);
          PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u_stock);
          __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
          __Pyx_GIVEREF(__pyx_t_6);
          PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_t_6);
          __pyx_t_6 = 0;
          __Pyx_INCREF(__pyx_kp_u__22);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__22);
          PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_kp_u__22);
          __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 7, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1866, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_3 = NULL;
          __pyx_t_9 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_7))) {
            __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
            if (likely(__pyx_t_3)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
              __Pyx_INCREF(__pyx_t_3);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_7, function);
              __pyx_t_9 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1867
 *                 if data.empty:
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 *                     if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1867, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_10) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1868
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)
 */
            __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1868, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_stock_code); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1868, __pyx_L16_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1867
 *                 if data.empty:
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 *                     if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1869
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1869, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1869, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_10) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1870
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                     return True
 *                 else:
 */
            __pyx_t_7 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1870, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_7);
            __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1870, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_6);
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            __pyx_t_7 = NULL;
            __pyx_t_9 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_6))) {
              __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
              if (likely(__pyx_t_7)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_6, function);
                __pyx_t_9 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_stock_code};
              __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
              __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
              if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __pyx_L16_error)
              __Pyx_GOTREF(__pyx_t_2);
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1869
 *                     if stock_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(stock_code)
 *                     if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1871
 *                     if stock_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(stock_code)
 *                     return True             # <<<<<<<<<<<<<<
 *                 else:
 *                     utils.logger.error(f"Failed to call sdc.stock_{concept}_detail for code = {stock_code}: {e} ")
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_True);
          __pyx_r = Py_True;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L15_return;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1865
 *             except Exception as e:
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 *                 if data.empty:             # <<<<<<<<<<<<<<
 *                     utils.logger.warning(f"The {stock_code} is new {concept} stock: {e} ")
 *                     if stock_code not in update_dict['update_list']:
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1873
 *                     return True
 *                 else:
 *                     utils.logger.error(f"Failed to call sdc.stock_{concept}_detail for code = {stock_code}: {e} ")             # <<<<<<<<<<<<<<
 *                     no_fault = False
 *                     if stock_code not in update_dict['failed_list']:
 */
        /*else*/ {
          __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = PyTuple_New(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_7);
          __pyx_t_15 = 0;
          __pyx_t_16 = 127;
          __Pyx_INCREF(__pyx_kp_u_Failed_to_call_sdc_stock);
          __pyx_t_15 += 25;
          __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_sdc_stock);
          PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Failed_to_call_sdc_stock);
          if (unlikely(!__pyx_cur_scope->__pyx_v_concept)) { __Pyx_RaiseClosureNameError("concept"); __PYX_ERR(0, 1873, __pyx_L16_error) }
          __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u_detail_for_code);
          __pyx_t_15 += 19;
          __Pyx_GIVEREF(__pyx_kp_u_detail_for_code);
          PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_detail_for_code);
          __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__21);
          __pyx_t_15 += 2;
          __Pyx_GIVEREF(__pyx_kp_u__21);
          PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u__21);
          __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_16;
          __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
          __Pyx_GIVEREF(__pyx_t_3);
          PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_3);
          __pyx_t_3 = 0;
          __Pyx_INCREF(__pyx_kp_u__22);
          __pyx_t_15 += 1;
          __Pyx_GIVEREF(__pyx_kp_u__22);
          PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_kp_u__22);
          __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1873, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_7 = NULL;
          __pyx_t_9 = 0;
          #if CYTHON_UNPACK_METHODS
          if (likely(PyMethod_Check(__pyx_t_6))) {
            __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
            if (likely(__pyx_t_7)) {
              PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
              __Pyx_INCREF(__pyx_t_7);
              __Pyx_INCREF(function);
              __Pyx_DECREF_SET(__pyx_t_6, function);
              __pyx_t_9 = 1;
            }
          }
          #endif
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_3};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
            __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          }
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1874
 *                 else:
 *                     utils.logger.error(f"Failed to call sdc.stock_{concept}_detail for code = {stock_code}: {e} ")
 *                     no_fault = False             # <<<<<<<<<<<<<<
 *                     if stock_code not in update_dict['failed_list']:
 *                         update_dict['failed_list'].append(stock_code)
 */
          __pyx_cur_scope->__pyx_v_no_fault = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1875
 *                     utils.logger.error(f"Failed to call sdc.stock_{concept}_detail for code = {stock_code}: {e} ")
 *                     no_fault = False
 *                     if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].append(stock_code)
 *                     return False
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1875, __pyx_L16_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1875, __pyx_L16_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (__pyx_t_10) {

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1876
 *                     no_fault = False
 *                     if stock_code not in update_dict['failed_list']:
 *                         update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                     return False
 * 
 */
            __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1876, __pyx_L16_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_stock_code); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1876, __pyx_L16_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1875
 *                     utils.logger.error(f"Failed to call sdc.stock_{concept}_detail for code = {stock_code}: {e} ")
 *                     no_fault = False
 *                     if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].append(stock_code)
 *                     return False
 */
          }

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1877
 *                     if stock_code not in update_dict['failed_list']:
 *                         update_dict['failed_list'].append(stock_code)
 *                     return False             # <<<<<<<<<<<<<<
 * 
 *             #
 */
          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(Py_False);
          __pyx_r = Py_False;
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          goto __pyx_L15_return;
        }
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1863
 *                 else:
 *                     concept_trade_data_df = sdc.stock_hsgt_detail(mode, symbol=stock_code)  #
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 data = self.dataproc.loadTableContentByCode(table_name, stock_code)
 *                 if data.empty:
 */
      /*finally:*/ {
        __pyx_L16_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_23, &__pyx_t_24, &__pyx_t_25);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22) < 0)) __Pyx_ErrFetch(&__pyx_t_20, &__pyx_t_21, &__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_25);
          __pyx_t_14 = __pyx_lineno; __pyx_t_18 = __pyx_clineno; __pyx_t_19 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_XGIVEREF(__pyx_t_25);
            __Pyx_ExceptionReset(__pyx_t_23, __pyx_t_24, __pyx_t_25);
          }
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_XGIVEREF(__pyx_t_22);
          __Pyx_ErrRestore(__pyx_t_20, __pyx_t_21, __pyx_t_22);
          __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0; __pyx_t_25 = 0;
          __pyx_lineno = __pyx_t_14; __pyx_clineno = __pyx_t_18; __pyx_filename = __pyx_t_19;
          goto __pyx_L6_except_error;
        }
        __pyx_L15_return: {
          __pyx_t_25 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_25;
          __pyx_t_25 = 0;
          goto __pyx_L7_except_return;
        }
      }
    }
    goto __pyx_L6_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1858
 *                 mode = 'all'
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 if concept == 'rzrq':
 *                     concept_trade_data_df = sdc.stock_rzrq_detail(mode, symbol=stock_code)  #
 */
    __pyx_L6_except_error:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L1_error;
    __pyx_L7_except_return:;
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
    goto __pyx_L0;
    __pyx_L9_try_end:;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1880
 * 
 *             #
 *             max_date_em = concept_trade_data_df['date'].max()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_table is None:
 */
  __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_concept_trade_data_df, __pyx_n_s_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_max); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1880, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_9 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_9 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1880, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_v_max_date_em = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1882
 *             max_date_em = concept_trade_data_df['date'].max()
 * 
 *             if max_date_table is None:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]
 *             elif max_date_table < max_date_em:
 */
  __pyx_t_10 = (__pyx_v_max_date_table == Py_None);
  if (__pyx_t_10) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1883
 * 
 *             if max_date_table is None:
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]             # <<<<<<<<<<<<<<
 *             elif max_date_table < max_date_em:
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > max_date_table]
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_concept_trade_data_df, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    if (unlikely(!__pyx_cur_scope->__pyx_v_start_date)) { __Pyx_RaiseClosureNameError("start_date"); __PYX_ERR(0, 1883, __pyx_L1_error) }
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_cur_scope->__pyx_v_start_date, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_concept_trade_data_df, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1883, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_concept_trade_data_df, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1882
 *             max_date_em = concept_trade_data_df['date'].max()
 * 
 *             if max_date_table is None:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]
 *             elif max_date_table < max_date_em:
 */
    goto __pyx_L26;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1884
 *             if max_date_table is None:
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > max_date_table]
 *             else:
 */
  __pyx_t_4 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_v_max_date_em, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error)
  __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1884, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  if (__pyx_t_10) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1885
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]
 *             elif max_date_table < max_date_em:
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > max_date_table]             # <<<<<<<<<<<<<<
 *             else:
 *                 # utils.logger.info(f"{table_name} of {stock_code} don't need to update.")
 */
    __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_v_concept_trade_data_df, __pyx_n_s_date); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_v_max_date_table, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_concept_trade_data_df, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1885, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF_SET(__pyx_v_concept_trade_data_df, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1884
 *             if max_date_table is None:
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > start_date]
 *             elif max_date_table < max_date_em:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[concept_trade_data_df['date'] > max_date_table]
 *             else:
 */
    goto __pyx_L26;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1888
 *             else:
 *                 # utils.logger.info(f"{table_name} of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_4, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1888, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_10) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1889
 *                 # utils.logger.info(f"{table_name} of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
      __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_4, __pyx_v_stock_code); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1889, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1888
 *             else:
 *                 # utils.logger.info(f"{table_name} of {stock_code} don't need to update.")
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1890
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_4, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1890, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    if (__pyx_t_10) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1891
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
      __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1891, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_stock_code};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1891, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1890
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1892
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_True);
    __pyx_r = Py_True;
    goto __pyx_L0;
  }
  __pyx_L26:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1894
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[dtype_mapping.keys()]
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_12);
    __Pyx_XGOTREF(__pyx_t_11);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1895
 * 
 *             try:
 *                 concept_trade_data_df = concept_trade_data_df[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1895, __pyx_L29_error) }
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = NULL;
      __pyx_t_9 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_9 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
        __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_9, 0+__pyx_t_9);
        __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_concept_trade_data_df, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF_SET(__pyx_v_concept_trade_data_df, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1896
 *             try:
 *                 concept_trade_data_df = concept_trade_data_df[dtype_mapping.keys()]
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_concept_trade_data_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1896, __pyx_L29_error) }
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 1896, __pyx_L29_error);
      __pyx_t_5 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_engine); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_con, __pyx_t_2) < 0) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 1896, __pyx_L29_error)
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 1896, __pyx_L29_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 1896, __pyx_L29_error) }
      if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 1896, __pyx_L29_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1896, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1898
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1898, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1898, __pyx_L29_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_10) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1899
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1899, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_stock_code); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1899, __pyx_L29_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1898
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 # update json file
 *                 if stock_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1900
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L29_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1900, __pyx_L29_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_10) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1901
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)             # <<<<<<<<<<<<<<
 *                 return True
 *             except Exception as e:
 */
        __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1901, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_remove); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1901, __pyx_L29_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_5 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_5)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_5);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_stock_code};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1901, __pyx_L29_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1900
 *                 if stock_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(stock_code)
 *                 if stock_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1902
 *                 if stock_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True             # <<<<<<<<<<<<<<
 *             except Exception as e:
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L33_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1894
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[dtype_mapping.keys()]
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    }
    __pyx_L29_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1903
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 *                 if stock_code not in update_dict['failed_list']:
 */
    __pyx_t_18 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_18) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql.updateSingleStockRzrqHsgtData", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_5) < 0) __PYX_ERR(0, 1903, __pyx_L31_except_error)
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_4);
      __pyx_v_e = __pyx_t_4;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1904
 *                 return True
 *             except Exception as e:
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")             # <<<<<<<<<<<<<<
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_15 = 0;
        __pyx_t_16 = 127;
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_stock_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_kp_u__22);
        if (unlikely(!__pyx_cur_scope->__pyx_v_concept)) { __Pyx_RaiseClosureNameError("concept"); __PYX_ERR(0, 1904, __pyx_L42_error) }
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u_trade_day_data_failed_save_in);
        __pyx_t_15 += 31;
        __Pyx_GIVEREF(__pyx_kp_u_trade_day_data_failed_save_in);
        PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u_trade_day_data_failed_save_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1904, __pyx_L42_error) }
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u_err_is);
        __pyx_t_15 += 9;
        __Pyx_GIVEREF(__pyx_kp_u_err_is);
        PyTuple_SET_ITEM(__pyx_t_3, 5, __pyx_kp_u_err_is);
        __pyx_t_7 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_16 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) > __pyx_t_16) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_7) : __pyx_t_16;
        __pyx_t_15 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
        __Pyx_GIVEREF(__pyx_t_7);
        PyTuple_SET_ITEM(__pyx_t_3, 6, __pyx_t_7);
        __pyx_t_7 = 0;
        __Pyx_INCREF(__pyx_kp_u__5);
        __pyx_t_15 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__5);
        PyTuple_SET_ITEM(__pyx_t_3, 7, __pyx_kp_u__5);
        __pyx_t_7 = __Pyx_PyUnicode_Join(__pyx_t_3, 8, __pyx_t_15, __pyx_t_16); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1904, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_9 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_9 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_7};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_9, 1+__pyx_t_9);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1904, __pyx_L42_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1905
 *             except Exception as e:
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 */
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1905, __pyx_L42_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_stock_code, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_10 < 0))) __PYX_ERR(0, 1905, __pyx_L42_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (__pyx_t_10) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1906
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 return False
 */
          __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L42_error)
          __Pyx_GOTREF(__pyx_t_1);
          __pyx_t_17 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_stock_code); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 1906, __pyx_L42_error)
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1905
 *             except Exception as e:
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 *                 if stock_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1907
 *                 if stock_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1908
 *                     update_dict['failed_list'].append(stock_code)
 *                 no_fault = False
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if not multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        goto __pyx_L41_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1903
 *                     update_dict['failed_list'].remove(stock_code)
 *                 return True
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"{stock_code} {concept} trade day data failed save in {table_name}, err is {e}.")
 *                 if stock_code not in update_dict['failed_list']:
 */
      /*finally:*/ {
        __pyx_L42_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_21, &__pyx_t_20);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23) < 0)) __Pyx_ErrFetch(&__pyx_t_25, &__pyx_t_24, &__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_25);
          __Pyx_XGOTREF(__pyx_t_24);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_20);
          __pyx_t_18 = __pyx_lineno; __pyx_t_14 = __pyx_clineno; __pyx_t_26 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_21);
            __Pyx_XGIVEREF(__pyx_t_20);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_21, __pyx_t_20);
          }
          __Pyx_XGIVEREF(__pyx_t_25);
          __Pyx_XGIVEREF(__pyx_t_24);
          __Pyx_XGIVEREF(__pyx_t_23);
          __Pyx_ErrRestore(__pyx_t_25, __pyx_t_24, __pyx_t_23);
          __pyx_t_25 = 0; __pyx_t_24 = 0; __pyx_t_23 = 0; __pyx_t_22 = 0; __pyx_t_21 = 0; __pyx_t_20 = 0;
          __pyx_lineno = __pyx_t_18; __pyx_clineno = __pyx_t_14; __pyx_filename = __pyx_t_26;
          goto __pyx_L31_except_error;
        }
        __pyx_L41_return: {
          __pyx_t_20 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_20;
          __pyx_t_20 = 0;
          goto __pyx_L32_except_return;
        }
      }
    }
    goto __pyx_L31_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1894
 *                 return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 concept_trade_data_df = concept_trade_data_df[dtype_mapping.keys()]
 *                 concept_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
    __pyx_L31_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
    goto __pyx_L1_error;
    __pyx_L33_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
    goto __pyx_L0;
    __pyx_L32_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_12);
    __Pyx_XGIVEREF(__pyx_t_11);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1850
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 * 
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql.updateSingleStockRzrqHsgtData", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_mode);
  __Pyx_XDECREF(__pyx_v_concept_trade_data_df);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XDECREF(__pyx_v_data);
  __Pyx_XDECREF(__pyx_v_max_date_em);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_54updateStockRzrqHsgtTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_concept, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_cocept_name = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_all_stock_list = NULL;
  CYTHON_UNUSED Py_ssize_t __pyx_v_stock_len;
  PyObject *__pyx_v_updateSingleStockRzrqHsgtData = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_code_str = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_8genexpr8__pyx_v_x = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  Py_UCS4 __pyx_t_10;
  PyObject *(*__pyx_t_11)(PyObject *);
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  PyObject *__pyx_t_17 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockRzrqHsgtTradeDayToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1811, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
  __pyx_cur_scope->__pyx_v_concept = __pyx_v_concept;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_concept);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_concept);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1812
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 *         if concept == 'rzrq':
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1812, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1812, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1813
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()             # <<<<<<<<<<<<<<
 *         if concept == 'rzrq':
 *             table_name = 'stock_rzrq_trade_day'
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_strptime); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_t_2, __pyx_kp_s_Y_m_d};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_date); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1813, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1813, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_start_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1814
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 *         if concept == 'rzrq':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_rzrq_trade_day'
 *             cocept_name = ['']
 */
  __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_cur_scope->__pyx_v_concept, __pyx_n_s_rzrq, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1814, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1815
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 *         if concept == 'rzrq':
 *             table_name = 'stock_rzrq_trade_day'             # <<<<<<<<<<<<<<
 *             cocept_name = ['']
 *         else:
 */
    __Pyx_INCREF(__pyx_n_s_stock_rzrq_trade_day);
    __Pyx_GIVEREF(__pyx_n_s_stock_rzrq_trade_day);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_rzrq_trade_day;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1816
 *         if concept == 'rzrq':
 *             table_name = 'stock_rzrq_trade_day'
 *             cocept_name = ['']             # <<<<<<<<<<<<<<
 *         else:
 *             table_name = 'stock_hsgt_trade_day'
 */
    __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1816, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__9);
    __Pyx_GIVEREF(__pyx_kp_s__9);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__9)) __PYX_ERR(0, 1816, __pyx_L1_error);
    __pyx_v_cocept_name = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1814
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 *         if concept == 'rzrq':             # <<<<<<<<<<<<<<
 *             table_name = 'stock_rzrq_trade_day'
 *             cocept_name = ['']
 */
    goto __pyx_L3;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1818
 *             cocept_name = ['']
 *         else:
 *             table_name = 'stock_hsgt_trade_day'             # <<<<<<<<<<<<<<
 *             cocept_name = ['', '']
 * 
 */
  /*else*/ {
    __Pyx_INCREF(__pyx_n_s_stock_hsgt_trade_day);
    __Pyx_GIVEREF(__pyx_n_s_stock_hsgt_trade_day);
    __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_stock_hsgt_trade_day;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1819
 *         else:
 *             table_name = 'stock_hsgt_trade_day'
 *             cocept_name = ['', '']             # <<<<<<<<<<<<<<
 * 
 *         no_fault = True
 */
    __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1819, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_kp_s__11);
    __Pyx_GIVEREF(__pyx_kp_s__11);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_kp_s__11)) __PYX_ERR(0, 1819, __pyx_L1_error);
    __Pyx_INCREF(__pyx_kp_s__10);
    __Pyx_GIVEREF(__pyx_kp_s__10);
    if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 1, __pyx_kp_s__10)) __PYX_ERR(0, 1819, __pyx_L1_error);
    __pyx_v_cocept_name = ((PyObject*)__pyx_t_1);
    __pyx_t_1 = 0;
  }
  __pyx_L3:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1821
 *             cocept_name = ['', '']
 * 
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1824
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1824, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1825
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1826
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1826, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_5) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1827
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1827, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_5) < 0) __PYX_ERR(0, 1825, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1830
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_8) {
  } else {
    __pyx_t_7 = __pyx_t_8;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1830, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_7 = __pyx_t_8;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1831
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_5, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1831, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1831, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1832
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_utils); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = 0;
      __pyx_t_10 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_9 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The);
      __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_10;
      __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
      __pyx_t_2 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1832, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1832, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1833
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1831
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1835
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1835, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1836
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {concept}")
 */
      __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1836, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_5);
      __pyx_t_5 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1830
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1838
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}: {concept}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = 0;
  __pyx_t_10 = 127;
  __Pyx_INCREF(__pyx_kp_u_Beginning);
  __pyx_t_9 += 10;
  __Pyx_GIVEREF(__pyx_kp_u_Beginning);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_Beginning);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
  __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u__21);
  __pyx_t_9 += 2;
  __Pyx_GIVEREF(__pyx_kp_u__21);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u__21);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_concept, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_10 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_10) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_10;
  __pyx_t_9 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 4, __pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_3};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1838, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1841
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_2};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1841, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_5);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1842
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1842, __pyx_L1_error)
  if (__pyx_t_7) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1843
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1843, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_id};
      __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1843, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1842
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1846
 * 
 *         #
 *         all_stock_list = self.dataproc.getConceptStockCodes(cocept_name)             # <<<<<<<<<<<<<<
 *         stock_len = len(all_stock_list)
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getConceptStockCodes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1846, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_v_cocept_name};
    __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1846, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_all_stock_list = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1847
 *         #
 *         all_stock_list = self.dataproc.getConceptStockCodes(cocept_name)
 *         stock_len = len(all_stock_list)             # <<<<<<<<<<<<<<
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 * 
 */
  __pyx_t_9 = PyObject_Length(__pyx_v_all_stock_list); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1847, __pyx_L1_error)
  __pyx_v_stock_len = __pyx_t_9;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1848
 *         all_stock_list = self.dataproc.getConceptStockCodes(cocept_name)
 *         stock_len = len(all_stock_list)
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):
 */
  { /* enter inner scope */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1848, __pyx_L11_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (likely(PyList_CheckExact(__pyx_v_all_stock_list)) || PyTuple_CheckExact(__pyx_v_all_stock_list)) {
      __pyx_t_2 = __pyx_v_all_stock_list; __Pyx_INCREF(__pyx_t_2);
      __pyx_t_9 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_all_stock_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1848, __pyx_L11_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1848, __pyx_L11_error)
    }
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_2))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1848, __pyx_L11_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1848, __pyx_L11_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1848, __pyx_L11_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1848, __pyx_L11_error)
          #else
          __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L11_error)
          __Pyx_GOTREF(__pyx_t_1);
          #endif
        }
      } else {
        __pyx_t_1 = __pyx_t_11(__pyx_t_2);
        if (unlikely(!__pyx_t_1)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1848, __pyx_L11_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_x, __pyx_t_1);
      __pyx_t_1 = 0;
      __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr8__pyx_v_x, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1848, __pyx_L11_error)
      if (__pyx_t_7) {
        if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_8genexpr8__pyx_v_x))) __PYX_ERR(0, 1848, __pyx_L11_error)
      }
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
    goto __pyx_L16_exit_scope;
    __pyx_L11_error:;
    __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x); __pyx_8genexpr8__pyx_v_x = 0;
    goto __pyx_L1_error;
    __pyx_L16_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_all_stock_list, __pyx_t_5);
  __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1850
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 * 
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_stock_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_update_dict, __pyx_n_s_dict) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
  __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_1updateSingleStockRzrqHsgtData, 0, __pyx_n_s_DataToMysql_updateStockRzrqHsgtT, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_2, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_v_updateSingleStockRzrqHsgtData = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1910
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 1910, __pyx_L1_error)
  __pyx_t_8 = (!__pyx_t_7);
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1912
 *         if not multi_thread:
 *             #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for code_str in tqdm(all_stock_list, desc=table_name):  #
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 */
    __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1912, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
      __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1912, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __pyx_v_start_time = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1913
 *             #
 *             start_time = time.time()
 *             for code_str in tqdm(all_stock_list, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 *                 current_time = time.time()
 */
    __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_INCREF(__pyx_v_all_stock_list);
    __Pyx_GIVEREF(__pyx_v_all_stock_list);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_all_stock_list)) __PYX_ERR(0, 1913, __pyx_L1_error);
    __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_5);
    if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
      __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5);
      __pyx_t_9 = 0;
      __pyx_t_11 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1913, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1913, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    for (;;) {
      if (likely(!__pyx_t_11)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1913, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1913, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_5);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1913, __pyx_L1_error)
            #endif
            if (__pyx_t_9 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1913, __pyx_L1_error)
          #else
          __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1913, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          #endif
        }
      } else {
        __pyx_t_3 = __pyx_t_11(__pyx_t_5);
        if (unlikely(!__pyx_t_3)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 1913, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_XDECREF_SET(__pyx_v_code_str, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1914
 *             start_time = time.time()
 *             for code_str in tqdm(all_stock_list, desc=table_name):  #
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      if (!(likely(PyString_CheckExact(__pyx_v_code_str))||((__pyx_v_code_str) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_code_str))) __PYX_ERR(0, 1914, __pyx_L1_error)
      if (!(likely(PyDict_CheckExact(__pyx_v_update_dict))||((__pyx_v_update_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_update_dict))) __PYX_ERR(0, 1914, __pyx_L1_error)
      __pyx_t_3 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_34updateStockRzrqHsgtTradeDayToMysql_updateSingleStockRzrqHsgtData(__pyx_v_updateSingleStockRzrqHsgtData, ((PyObject*)__pyx_v_code_str), ((PyObject*)__pyx_v_update_dict)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1914, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1915
 *             for code_str in tqdm(all_stock_list, desc=table_name):  #
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1915, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1916
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_3 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1916, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_8) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1917
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1917, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1917, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1918
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         else:
 */
        __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1918, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_3 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_2))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_2, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1918, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1919
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1916
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1913
 *             #
 *             start_time = time.time()
 *             for code_str in tqdm(all_stock_list, desc=table_name):  #             # <<<<<<<<<<<<<<
 *                 updateSingleStockRzrqHsgtData(code_str, update_dict)
 *                 current_time = time.time()
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1910
 *                 return False
 * 
 *         if not multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             start_time = time.time()
 */
    goto __pyx_L17;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1922
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
  /*else*/ {
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1922, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_12);
      __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L22_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1922, __pyx_L22_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __pyx_t_5 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
          __Pyx_XGOTREF(__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_14);
          __Pyx_XGOTREF(__pyx_t_15);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_5;
            __pyx_t_5 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1923
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for code_str in all_stock_list:  #
 */
            __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1923, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_v_futures = ((PyObject*)__pyx_t_5);
            __pyx_t_5 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1924
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for code_str in all_stock_list:  #
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1924, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1924, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
              __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1924, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_v_start_time = __pyx_t_5;
            __pyx_t_5 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1925
 *                 futures = []
 *                 start_time = time.time()
 *                 for code_str in all_stock_list:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 *                     futures.append(future)
 */
            __pyx_t_5 = __pyx_v_all_stock_list; __Pyx_INCREF(__pyx_t_5);
            __pyx_t_9 = 0;
            for (;;) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_5);
                #if !CYTHON_ASSUME_SAFE_MACROS
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1925, __pyx_L26_error)
                #endif
                if (__pyx_t_9 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1925, __pyx_L26_error)
              #else
              __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_5, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_1);
              #endif
              __Pyx_XDECREF_SET(__pyx_v_code_str, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1926
 *                 start_time = time.time()
 *                 for code_str in all_stock_list:  #
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 */
              __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_3 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_2))) {
                __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
                if (likely(__pyx_t_3)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                  __Pyx_INCREF(__pyx_t_3);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_2, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[4] = {__pyx_t_3, __pyx_v_updateSingleStockRzrqHsgtData, __pyx_v_code_str, __pyx_v_update_dict};
                __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 3+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_1);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_1);
              __pyx_t_1 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1927
 *                 for code_str in all_stock_list:  #
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_16 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_16 == ((int)-1))) __PYX_ERR(0, 1927, __pyx_L26_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1925
 *                 futures = []
 *                 start_time = time.time()
 *                 for code_str in all_stock_list:  #             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 *                     futures.append(future)
 */
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1928
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_futures};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_1);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L26_error);
            __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 1928, __pyx_L26_error)
            __pyx_t_9 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1928, __pyx_L26_error)
            __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_total, __pyx_t_3) < 0) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_9 = 0;
              __pyx_t_11 = NULL;
            } else {
              __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1928, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_11 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1928, __pyx_L26_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_11)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1928, __pyx_L26_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1928, __pyx_L26_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 1928, __pyx_L26_error)
                    #endif
                    if (__pyx_t_9 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_3); __pyx_t_9++; if (unlikely((0 < 0))) __PYX_ERR(0, 1928, __pyx_L26_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_11(__pyx_t_1);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 1928, __pyx_L26_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1929
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1929, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1929, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_5);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_5))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_5, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1929, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1930
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_3 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1930, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1930, __pyx_L26_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_2 = PyObject_RichCompare(__pyx_t_3, __pyx_t_5, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1930, __pyx_L26_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 1930, __pyx_L26_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (__pyx_t_8) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1931
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1931, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_2);
                if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1931, __pyx_L26_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1932
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 */
                __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1932, __pyx_L26_error)
                __Pyx_GOTREF(__pyx_t_5);
                __pyx_t_3 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_5))) {
                  __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
                  if (likely(__pyx_t_3)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
                    __Pyx_INCREF(__pyx_t_3);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_5, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
                  __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1932, __pyx_L26_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                }
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1933
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":1930
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":1928
 *                     future = executor.submit(updateSingleStockRzrqHsgtData, code_str, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1934
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_shutdown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1934, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_1);
            __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1934, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_wait, Py_True) < 0) __PYX_ERR(0, 1934, __pyx_L26_error)
            __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1934, __pyx_L26_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":1922
 *         else:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          goto __pyx_L31_try_end;
          __pyx_L26_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 1922, __pyx_L28_except_error)
            __Pyx_XGOTREF(__pyx_t_5);
            __Pyx_XGOTREF(__pyx_t_2);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_3 = PyTuple_Pack(3, __pyx_t_5, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1922, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1922, __pyx_L28_except_error)
            __Pyx_GOTREF(__pyx_t_17);
            __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_17);
            __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
            if (__pyx_t_8 < 0) __PYX_ERR(0, 1922, __pyx_L28_except_error)
            __pyx_t_7 = (!__pyx_t_8);
            if (unlikely(__pyx_t_7)) {
              __Pyx_GIVEREF(__pyx_t_5);
              __Pyx_GIVEREF(__pyx_t_2);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_5, __pyx_t_2, __pyx_t_1);
              __pyx_t_5 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 1922, __pyx_L28_except_error)
            }
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L27_exception_handled;
          }
          __pyx_L28_except_error:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          goto __pyx_L1_error;
          __pyx_L27_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_XGIVEREF(__pyx_t_14);
          __Pyx_XGIVEREF(__pyx_t_15);
          __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
          __pyx_L31_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_12) {
            __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
            if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1922, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_15);
            __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
          }
          goto __pyx_L25;
        }
        __pyx_L25:;
      }
      goto __pyx_L42;
      __pyx_L22_error:;
      __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
      goto __pyx_L1_error;
      __pyx_L42:;
    }
  }
  __pyx_L17:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1935
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1936
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 1936, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1935
 *                         start_time = current_time
 *                 executor.shutdown(wait=True)  # wait=True
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1937
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 1937, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1938
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateIndexTradeDayToMysql(self):
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1938, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1938, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateStockRzrqHsgtTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_cocept_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_all_stock_list);
  __Pyx_XDECREF(__pyx_v_updateSingleStockRzrqHsgtData);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_code_str);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_8genexpr8__pyx_v_x);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_57updateIndexTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_57updateIndexTradeDayToMysql = {"updateIndexTradeDayToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_57updateIndexTradeDayToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_57updateIndexTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[1] = {0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateIndexTradeDayToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1940, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateIndexTradeDayToMysql") < 0)) __PYX_ERR(0, 1940, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 1)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
    }
    __pyx_v_self = values[0];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateIndexTradeDayToMysql", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1940, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateIndexTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_56updateIndexTradeDayToMysql(__pyx_self, __pyx_v_self);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1971
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}
 * 
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_1updateSingleIndexTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_1updateSingleIndexTradeDayInfo = {"updateSingleIndexTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_1updateSingleIndexTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_1updateSingleIndexTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_index_code = 0;
  PyObject *__pyx_v_index_name = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleIndexTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_index_code,&__pyx_n_s_index_name,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleIndexTradeDayInfo", 1, 3, 3, 1); __PYX_ERR(0, 1971, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1971, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleIndexTradeDayInfo", 1, 3, 3, 2); __PYX_ERR(0, 1971, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleIndexTradeDayInfo") < 0)) __PYX_ERR(0, 1971, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_index_code = ((PyObject*)values[0]);
    __pyx_v_index_name = ((PyObject*)values[1]);
    __pyx_v_update_dict = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleIndexTradeDayInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1971, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateIndexTradeDayToMysql.updateSingleIndexTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index_code), (&PyString_Type), 0, "index_code", 1))) __PYX_ERR(0, 1971, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_index_name), (&PyString_Type), 0, "index_name", 1))) __PYX_ERR(0, 1971, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_update_dict), (&PyDict_Type), 0, "update_dict", 1))) __PYX_ERR(0, 1971, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_updateSingleIndexTradeDayInfo(__pyx_self, __pyx_v_index_code, __pyx_v_index_name, __pyx_v_update_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_updateSingleIndexTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_index_code, PyObject *__pyx_v_index_name, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_pre_close_first = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_max_date_row = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_index_trade_data_df = NULL;
  PyObject *__pyx_v_pre_close = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleIndexTradeDayInfo", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1973
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):
 *             nonlocal no_fault
 *             pre_close_first = 0             # <<<<<<<<<<<<<<
 *             #
 *             start_date = self.start_date
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_pre_close_first = __pyx_int_0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1975
 *             pre_close_first = 0
 *             #
 *             start_date = self.start_date             # <<<<<<<<<<<<<<
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == index_code).order_by(
 *                 globals()[table_name].date.desc()).first()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1975, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_start_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1976
 *             #
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == index_code).order_by(             # <<<<<<<<<<<<<<
 *                 globals()[table_name].date.desc()).first()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_query); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1976, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1976, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_v_index_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_order_by); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1976, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1977
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == index_code).order_by(
 *                 globals()[table_name].date.desc()).first()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_row:
 */
  __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1977, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_desc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1976, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_first); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1977, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1977, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_max_date_row = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1979
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_row); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1979, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1980
 * 
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")             # <<<<<<<<<<<<<<
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1980, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1980, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_max_date_table = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1981
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close             # <<<<<<<<<<<<<<
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_pre_close_first, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1982
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1982, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1982, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1983
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_max_date_table};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1983, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1983, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1984
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, index_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_next_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_max_date_table};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1984, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1984, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1984, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1983
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
        goto __pyx_L5;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1986
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, index_code)             # <<<<<<<<<<<<<<
 *                         utils.logger.error(f"{index_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if index_code not in update_dict['failed_list']:
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1986, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1986, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clearTableContentByCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1986, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1986, __pyx_L1_error) }
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_index_code};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1986, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1987
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, index_code)
 *                         utils.logger.error(f"{index_code} data wrong in {table_name}, so execute delete its all data.")             # <<<<<<<<<<<<<<
 *                         if index_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(index_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = 0;
        __pyx_t_11 = 127;
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_index_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_data_wrong_in);
        __pyx_t_10 += 15;
        __Pyx_GIVEREF(__pyx_kp_u_data_wrong_in);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_data_wrong_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 1987, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_10 += 33;
        __Pyx_GIVEREF(__pyx_kp_u_so_execute_delete_its_all_data);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1987, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1987, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1988
 *                         self.dataproc.clearTableContentByCode(table_name, index_code)
 *                         utils.logger.error(f"{index_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if index_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(index_code)
 *                         no_fault = False
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1988, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1989
 *                         utils.logger.error(f"{index_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if index_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(index_code)             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                         return False
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1989, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_index_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1989, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":1988
 *                         self.dataproc.clearTableContentByCode(table_name, index_code)
 *                         utils.logger.error(f"{index_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if index_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(index_code)
 *                         no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1990
 *                         if index_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(index_code)
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1991
 *                             update_dict['failed_list'].append(index_code)
 *                         no_fault = False
 *                         return False             # <<<<<<<<<<<<<<
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
      __pyx_L5:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1982
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
      goto __pyx_L4;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1992
 *                         no_fault = False
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 *                     if index_code not in update_dict['update_list']:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 1992, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1992, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1993
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")             # <<<<<<<<<<<<<<
 *                     if index_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(index_code)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_TradeDayInfo_of_2);
      __pyx_t_10 += 16;
      __Pyx_GIVEREF(__pyx_kp_u_TradeDayInfo_of_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_TradeDayInfo_of_2);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_index_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_dont_need_to_update_2);
      __pyx_t_10 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_dont_need_to_update_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_dont_need_to_update_2);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1993, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1993, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1994
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 *                     if index_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(index_code)
 *                     if index_code in update_dict['failed_list']:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1994, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1994, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1995
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 *                     if index_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(index_code)             # <<<<<<<<<<<<<<
 *                     if index_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(index_code)
 */
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_index_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 1995, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1994
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 *                     if index_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(index_code)
 *                     if index_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1996
 *                     if index_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(index_code)
 *                     if index_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(index_code)
 *                     return True
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 1996, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1997
 *                         update_dict['update_list'].append(index_code)
 *                     if index_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(index_code)             # <<<<<<<<<<<<<<
 *                     return True
 * 
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1997, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_index_code};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1997, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":1996
 *                     if index_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(index_code)
 *                     if index_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(index_code)
 *                     return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1998
 *                     if index_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(index_code)
 *                     return True             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1992
 *                         no_fault = False
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"TradeDayInfo of {index_code} dont need to update.")
 *                     if index_code not in update_dict['update_list']:
 */
    }
    __pyx_L4:;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1979
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2000
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 index_trade_data_df = sdc.stock_zh_index_daily_em(symbol=index_code, start_date=start_date, end_date=self.latest_trade_day)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2002
 *             try:
 *                 # ---
 *                 index_trade_data_df = sdc.stock_zh_index_daily_em(symbol=index_code, start_date=start_date, end_date=self.latest_trade_day)             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sdc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_stock_zh_index_daily_em); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_index_code) < 0) __PYX_ERR(0, 2002, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 2002, __pyx_L9_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2002, __pyx_L9_error) }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_date, __pyx_t_2) < 0) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2002, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_index_trade_data_df = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2005
 * 
 *                 #
 *                 index_trade_data_df['code'] = index_code             # <<<<<<<<<<<<<<
 *                 index_trade_data_df['name'] = index_name
 * 
 */
      if (unlikely((PyObject_SetItem(__pyx_v_index_trade_data_df, __pyx_n_s_code, __pyx_v_index_code) < 0))) __PYX_ERR(0, 2005, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2006
 *                 #
 *                 index_trade_data_df['code'] = index_code
 *                 index_trade_data_df['name'] = index_name             # <<<<<<<<<<<<<<
 * 
 *                 # pre_close
 */
      if (unlikely((PyObject_SetItem(__pyx_v_index_trade_data_df, __pyx_n_s_name, __pyx_v_index_name) < 0))) __PYX_ERR(0, 2006, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2009
 * 
 *                 # pre_close
 *                 pre_close = index_trade_data_df['close'].shift(1)             # <<<<<<<<<<<<<<
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_index_trade_data_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2009, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shift); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2009, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_int_1};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2009, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_v_pre_close = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2010
 *                 # pre_close
 *                 pre_close = index_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 */
      __pyx_t_9 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_pre_close_first, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2010, __pyx_L9_error)
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2011
 *                 pre_close = index_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first             # <<<<<<<<<<<<<<
 *                 pre_close.fillna(0, inplace=True)
 *                 index_trade_data_df['pre_close'] = pre_close
 */
        if (unlikely((__Pyx_SetItemInt(__pyx_v_pre_close, 0, __pyx_v_pre_close_first, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 2011, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2010
 *                 # pre_close
 *                 pre_close = index_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2012
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 *                 index_trade_data_df['pre_close'] = pre_close
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_fillna); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2012, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2012, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2012, __pyx_L9_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__52, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2012, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2013
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 *                 index_trade_data_df['pre_close'] = pre_close             # <<<<<<<<<<<<<<
 * 
 *                 index_trade_data_df = index_trade_data_df[dtype_mapping.keys()]
 */
      if (unlikely((PyObject_SetItem(__pyx_v_index_trade_data_df, __pyx_n_s_pre_close, __pyx_v_pre_close) < 0))) __PYX_ERR(0, 2013, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2015
 *                 index_trade_data_df['pre_close'] = pre_close
 * 
 *                 index_trade_data_df = index_trade_data_df[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 * 
 *                 index_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 2015, __pyx_L9_error) }
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2015, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_6))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_6, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2015, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_v_index_trade_data_df, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2015, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_index_trade_data_df, __pyx_t_6);
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2017
 *                 index_trade_data_df = index_trade_data_df[dtype_mapping.keys()]
 * 
 *                 index_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 if index_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(index_code)
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index_trade_data_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2017, __pyx_L9_error) }
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 2017, __pyx_L9_error);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_engine); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_con, __pyx_t_3) < 0) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 2017, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 2017, __pyx_L9_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 2017, __pyx_L9_error) }
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 2017, __pyx_L9_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2018
 * 
 *                 index_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if index_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(index_code)
 *                 if index_code in update_dict['failed_list']:
 */
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2018, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2018, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2019
 *                 index_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if index_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(index_code)             # <<<<<<<<<<<<<<
 *                 if index_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(index_code)
 */
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_index_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2019, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2018
 * 
 *                 index_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if index_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(index_code)
 *                 if index_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2020
 *                 if index_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(index_code)
 *                 if index_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(index_code)
 *                 return True
 */
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2020, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2020, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2021
 *                     update_dict['update_list'].append(index_code)
 *                 if index_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(index_code)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2021, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_index_code};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2021, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2020
 *                 if index_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(index_code)
 *                 if index_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(index_code)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2022
 *                 if index_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(index_code)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L13_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2000
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 index_trade_data_df = sdc.stock_zh_index_daily_em(symbol=index_code, start_date=start_date, end_date=self.latest_trade_day)
 */
    }
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2024
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")
 *                 no_fault = False
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateIndexTradeDayToMysql.updateSingleIndexTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_2) < 0) __PYX_ERR(0, 2024, __pyx_L11_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2025
 * 
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if index_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = 0;
        __pyx_t_11 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde);
        __pyx_t_10 += 54;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Failed_to_call_sdc_stock_zh_inde);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_index_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_10 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u__21);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_10 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u__22);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 5, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2025, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
          __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2025, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_6);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2026
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if index_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(index_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2027
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")
 *                 no_fault = False
 *                 if index_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(index_code)
 *                 return False
 */
        __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2027, __pyx_L23_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_index_code, __pyx_t_6, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2027, __pyx_L23_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2028
 *                 no_fault = False
 *                 if index_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(index_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2028, __pyx_L23_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_6, __pyx_v_index_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2028, __pyx_L23_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2027
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")
 *                 no_fault = False
 *                 if index_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(index_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2029
 *                 if index_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(index_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         #
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        goto __pyx_L22_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2024
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call sdc.stock_zh_index_daily_em for name = {index_name}: {e} ")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L23_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L11_except_error;
        }
        __pyx_L22_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L12_except_return;
        }
      }
    }
    goto __pyx_L11_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2000
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # ---
 *                 index_trade_data_df = sdc.stock_zh_index_daily_em(symbol=index_code, start_date=start_date, end_date=self.latest_trade_day)
 */
    __pyx_L11_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L13_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L12_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1971
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}
 * 
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateIndexTradeDayToMysql.updateSingleIndexTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pre_close_first);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_max_date_row);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_index_trade_data_df);
  __Pyx_XDECREF(__pyx_v_pre_close);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_56updateIndexTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_index_code_name_dict = NULL;
  PyObject *__pyx_v_updateSingleIndexTradeDayInfo = 0;
  PyObject *__pyx_v_start_time = NULL;
  PyObject *__pyx_v_index_code = NULL;
  PyObject *__pyx_v_index_name = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_key = NULL;
  PyObject *__pyx_8genexpr9__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  PyObject *(*__pyx_t_13)(PyObject *);
  PyObject *__pyx_t_14 = NULL;
  PyObject *(*__pyx_t_15)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateIndexTradeDayToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 1940, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1941
 * 
 *     def updateIndexTradeDayToMysql(self):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'index_trade_day'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1941, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1942
 *     def updateIndexTradeDayToMysql(self):
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_index_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_index_trade_day);
  __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_index_trade_day;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1943
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         # jsonjson
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1946
 * 
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1946, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_updated_list = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1947
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 1947, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1948
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1948, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_failed_list, __pyx_t_3) < 0) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1949
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_list, __pyx_t_3) < 0) __PYX_ERR(0, 1947, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_update_dict = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1952
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 1952, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1953
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_n_s_updated); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1953, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1953, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1954
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_logger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_info); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1954, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_2)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_2);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1954, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1955
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1953
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1957
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1957, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_3);
      __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":1958
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_3);
      __pyx_t_3 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1952
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1960
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_2};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1963
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_Globals(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1963, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_9};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1964
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1964, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1965
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1965, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":1964
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1968
 * 
 *         #
 *         index_code_name_dict = utils.getIndexCodeName()             # <<<<<<<<<<<<<<
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getIndexCodeName); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1968, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_index_code_name_dict = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1969
 *         #
 *         index_code_name_dict = utils.getIndexCodeName()
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):
 */
  { /* enter inner scope */
    __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1969, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = 0;
    if (unlikely(__pyx_v_index_code_name_dict == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items");
      __PYX_ERR(0, 1969, __pyx_L10_error)
    }
    __pyx_t_1 = __Pyx_dict_iterator(__pyx_v_index_code_name_dict, 0, __pyx_n_s_items, (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1969, __pyx_L10_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_XDECREF(__pyx_t_9);
    __pyx_t_9 = __pyx_t_1;
    __pyx_t_1 = 0;
    while (1) {
      __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_9, __pyx_t_10, &__pyx_t_7, &__pyx_t_1, &__pyx_t_2, NULL, __pyx_t_11);
      if (unlikely(__pyx_t_12 == 0)) break;
      if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 1969, __pyx_L10_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_key, __pyx_t_1);
      __pyx_t_1 = 0;
      __Pyx_XDECREF_SET(__pyx_8genexpr9__pyx_v_value, __pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr9__pyx_v_key, __pyx_v_updated_list, Py_NE)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1969, __pyx_L10_error)
      if (__pyx_t_5) {
        if (unlikely(PyDict_SetItem(__pyx_t_3, (PyObject*)__pyx_8genexpr9__pyx_v_key, (PyObject*)__pyx_8genexpr9__pyx_v_value))) __PYX_ERR(0, 1969, __pyx_L10_error)
      }
    }
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value); __pyx_8genexpr9__pyx_v_value = 0;
    goto __pyx_L14_exit_scope;
    __pyx_L10_error:;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key); __pyx_8genexpr9__pyx_v_key = 0;
    __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value); __pyx_8genexpr9__pyx_v_value = 0;
    goto __pyx_L1_error;
    __pyx_L14_exit_scope:;
  } /* exit inner scope */
  __Pyx_DECREF_SET(__pyx_v_index_code_name_dict, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1971
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}
 * 
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */
  __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_index_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_update_dict, __pyx_n_s_dict) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_1updateSingleIndexTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateIndexTradeDayT, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__86)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_updateSingleIndexTradeDayInfo = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2032
 * 
 *         #
 *         start_time = time.time()             # <<<<<<<<<<<<<<
 *         for index_code, index_name in tqdm(index_code_name_dict.items(), desc=fun_name):  #
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2032, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_start_time = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2033
 *         #
 *         start_time = time.time()
 *         for index_code, index_name in tqdm(index_code_name_dict.items(), desc=fun_name):  #             # <<<<<<<<<<<<<<
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 *             current_time = time.time()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index_code_name_dict, __pyx_n_s_items); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_2);
  if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error);
  __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 2033, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2);
    __pyx_t_10 = 0;
    __pyx_t_13 = NULL;
  } else {
    __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_13 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2033, __pyx_L1_error)
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (likely(!__pyx_t_13)) {
      if (likely(PyList_CheckExact(__pyx_t_2))) {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2033, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2033, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      } else {
        {
          Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
          #if !CYTHON_ASSUME_SAFE_MACROS
          if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2033, __pyx_L1_error)
          #endif
          if (__pyx_t_10 >= __pyx_temp) break;
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely((0 < 0))) __PYX_ERR(0, 2033, __pyx_L1_error)
        #else
        __pyx_t_1 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2033, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
      }
    } else {
      __pyx_t_1 = __pyx_t_13(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else __PYX_ERR(0, 2033, __pyx_L1_error)
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
      PyObject* sequence = __pyx_t_1;
      Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
      if (unlikely(size != 2)) {
        if (size > 2) __Pyx_RaiseTooManyValuesError(2);
        else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
        __PYX_ERR(0, 2033, __pyx_L1_error)
      }
      #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
      if (likely(PyTuple_CheckExact(sequence))) {
        __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        __pyx_t_3 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_9);
      #else
      __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      #endif
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_14 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2033, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_14);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_15 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_14);
      index = 0; __pyx_t_3 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_3);
      index = 1; __pyx_t_9 = __pyx_t_15(__pyx_t_14); if (unlikely(!__pyx_t_9)) goto __pyx_L17_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_9);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_14), 2) < 0) __PYX_ERR(0, 2033, __pyx_L1_error)
      __pyx_t_15 = NULL;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      goto __pyx_L18_unpacking_done;
      __pyx_L17_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
      __pyx_t_15 = NULL;
      if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
      __PYX_ERR(0, 2033, __pyx_L1_error)
      __pyx_L18_unpacking_done:;
    }
    __Pyx_XDECREF_SET(__pyx_v_index_code, __pyx_t_3);
    __pyx_t_3 = 0;
    __Pyx_XDECREF_SET(__pyx_v_index_name, __pyx_t_9);
    __pyx_t_9 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2034
 *         start_time = time.time()
 *         for index_code, index_name in tqdm(index_code_name_dict.items(), desc=fun_name):  #
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)             # <<<<<<<<<<<<<<
 *             current_time = time.time()
 *             if current_time - start_time >= self.dump_json_period:
 */
    if (!(likely(PyString_CheckExact(__pyx_v_index_code))||((__pyx_v_index_code) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_index_code))) __PYX_ERR(0, 2034, __pyx_L1_error)
    if (!(likely(PyString_CheckExact(__pyx_v_index_name))||((__pyx_v_index_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_index_name))) __PYX_ERR(0, 2034, __pyx_L1_error)
    if (!(likely(PyDict_CheckExact(__pyx_v_update_dict))||((__pyx_v_update_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_update_dict))) __PYX_ERR(0, 2034, __pyx_L1_error)
    __pyx_t_1 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_26updateIndexTradeDayToMysql_updateSingleIndexTradeDayInfo(__pyx_v_updateSingleIndexTradeDayInfo, ((PyObject*)__pyx_v_index_code), ((PyObject*)__pyx_v_index_name), ((PyObject*)__pyx_v_update_dict)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2034, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2035
 *         for index_code, index_name in tqdm(index_code_name_dict.items(), desc=fun_name):  #
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 *             current_time = time.time()             # <<<<<<<<<<<<<<
 *             if current_time - start_time >= self.dump_json_period:
 *                 self.update_json[table_name] = update_dict
 */
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2035, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2035, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2036
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 *             current_time = time.time()
 *             if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()
 */
    __pyx_t_1 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2036, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2036, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2037
 *             current_time = time.time()
 *             if current_time - start_time >= self.dump_json_period:
 *                 self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                 self.dumpJsonToFile()
 *                 start_time = current_time
 */
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2037, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 2037, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2038
 *             if current_time - start_time >= self.dump_json_period:
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                 start_time = current_time
 *         if no_fault:
 */
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2038, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      }
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2039
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()
 *                 start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
      __Pyx_INCREF(__pyx_v_current_time);
      __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2036
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 *             current_time = time.time()
 *             if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                 self.update_json[table_name] = update_dict
 *                 self.dumpJsonToFile()
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2033
 *         #
 *         start_time = time.time()
 *         for index_code, index_name in tqdm(index_code_name_dict.items(), desc=fun_name):  #             # <<<<<<<<<<<<<<
 *             updateSingleIndexTradeDayInfo(index_code, index_name, update_dict)
 *             current_time = time.time()
 */
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2040
 *                 self.dumpJsonToFile()
 *                 start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2041
 *                 start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2041, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2040
 *                 self.dumpJsonToFile()
 *                 start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2042
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (unlikely((PyObject_SetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 2042, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2043
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):
 */
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2043, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateIndexTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_index_code_name_dict);
  __Pyx_XDECREF(__pyx_v_updateSingleIndexTradeDayInfo);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_index_code);
  __Pyx_XDECREF(__pyx_v_index_name);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_key);
  __Pyx_XDECREF(__pyx_8genexpr9__pyx_v_value);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_59updateFutureTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_59updateFutureTradeDayToMysql = {"updateFutureTradeDayToMysql", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_59updateFutureTradeDayToMysql, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_59updateFutureTradeDayToMysql(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_self = 0;
  PyObject *__pyx_v_multi_thread = 0;
  PyObject *__pyx_v_workers = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateFutureTradeDayToMysql (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_multi_thread,&__pyx_n_s_workers,0};
    values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_True)));
    values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)__pyx_int_12)));
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multi_thread);
          if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (kw_args > 0) {
          PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_workers);
          if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
          else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateFutureTradeDayToMysql") < 0)) __PYX_ERR(0, 2045, __pyx_L3_error)
      }
    } else {
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = values[0];
    __pyx_v_multi_thread = values[1];
    __pyx_v_workers = values[2];
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateFutureTradeDayToMysql", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 2045, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_58updateFutureTradeDayToMysql(__pyx_self, __pyx_v_self, __pyx_v_multi_thread, __pyx_v_workers);

  /* function exit code */
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2078
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 * 
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_1updateSingleFutureTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_1updateSingleFutureTradeDayInfo = {"updateSingleFutureTradeDayInfo", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_1updateSingleFutureTradeDayInfo, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_1updateSingleFutureTradeDayInfo(PyObject *__pyx_self, 
#if CYTHON_METH_FASTCALL
PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
#else
PyObject *__pyx_args, PyObject *__pyx_kwds
#endif
) {
  PyObject *__pyx_v_future_code = 0;
  PyObject *__pyx_v_future_name = 0;
  PyObject *__pyx_v_update_dict = 0;
  #if !CYTHON_METH_FASTCALL
  CYTHON_UNUSED Py_ssize_t __pyx_nargs;
  #endif
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject* values[3] = {0,0,0};
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateSingleFutureTradeDayInfo (wrapper)", 0);
  #if !CYTHON_METH_FASTCALL
  #if CYTHON_ASSUME_SAFE_MACROS
  __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
  #else
  __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
  #endif
  #endif
  __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
  {
    PyObject **__pyx_pyargnames[] = {&__pyx_n_s_future_code,&__pyx_n_s_future_name,&__pyx_n_s_update_dict,0};
    if (__pyx_kwds) {
      Py_ssize_t kw_args;
      switch (__pyx_nargs) {
        case  3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
        CYTHON_FALLTHROUGH;
        case  2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
        CYTHON_FALLTHROUGH;
        case  1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
        CYTHON_FALLTHROUGH;
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
      switch (__pyx_nargs) {
        case  0:
        if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_future_code)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2078, __pyx_L3_error)
        else goto __pyx_L5_argtuple_error;
        CYTHON_FALLTHROUGH;
        case  1:
        if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_future_name)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2078, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleFutureTradeDayInfo", 1, 3, 3, 1); __PYX_ERR(0, 2078, __pyx_L3_error)
        }
        CYTHON_FALLTHROUGH;
        case  2:
        if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_update_dict)) != 0)) {
          (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
          kw_args--;
        }
        else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2078, __pyx_L3_error)
        else {
          __Pyx_RaiseArgtupleInvalid("updateSingleFutureTradeDayInfo", 1, 3, 3, 2); __PYX_ERR(0, 2078, __pyx_L3_error)
        }
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t kwd_pos_args = __pyx_nargs;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "updateSingleFutureTradeDayInfo") < 0)) __PYX_ERR(0, 2078, __pyx_L3_error)
      }
    } else if (unlikely(__pyx_nargs != 3)) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
      values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
      values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
    }
    __pyx_v_future_code = ((PyObject*)values[0]);
    __pyx_v_future_name = ((PyObject*)values[1]);
    __pyx_v_update_dict = ((PyObject*)values[2]);
  }
  goto __pyx_L6_skip;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("updateSingleFutureTradeDayInfo", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 2078, __pyx_L3_error)
  __pyx_L6_skip:;
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql.updateSingleFutureTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_future_code), (&PyString_Type), 0, "future_code", 1))) __PYX_ERR(0, 2078, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_future_name), (&PyString_Type), 0, "future_name", 1))) __PYX_ERR(0, 2078, __pyx_L1_error)
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_update_dict), (&PyDict_Type), 0, "update_dict", 1))) __PYX_ERR(0, 2078, __pyx_L1_error)
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_updateSingleFutureTradeDayInfo(__pyx_self, __pyx_v_future_code, __pyx_v_future_name, __pyx_v_update_dict);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  {
    Py_ssize_t __pyx_temp;
    for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
      __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
    }
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_updateSingleFutureTradeDayInfo(PyObject *__pyx_self, PyObject *__pyx_v_future_code, PyObject *__pyx_v_future_name, PyObject *__pyx_v_update_dict) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *__pyx_cur_scope;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *__pyx_outer_scope;
  PyObject *__pyx_v_pre_close_first = NULL;
  PyObject *__pyx_v_start_date = NULL;
  PyObject *__pyx_v_max_date_row = NULL;
  PyObject *__pyx_v_max_date_table = NULL;
  PyObject *__pyx_v_future_trade_data_df = NULL;
  PyObject *__pyx_v_pre_close = NULL;
  PyObject *__pyx_v_e = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  unsigned int __pyx_t_8;
  int __pyx_t_9;
  Py_ssize_t __pyx_t_10;
  Py_UCS4 __pyx_t_11;
  int __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  int __pyx_t_16;
  int __pyx_t_17;
  char const *__pyx_t_18;
  PyObject *__pyx_t_19 = NULL;
  PyObject *__pyx_t_20 = NULL;
  PyObject *__pyx_t_21 = NULL;
  PyObject *__pyx_t_22 = NULL;
  PyObject *__pyx_t_23 = NULL;
  PyObject *__pyx_t_24 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateSingleFutureTradeDayInfo", 1);
  __pyx_outer_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *) __Pyx_CyFunction_GetClosure(__pyx_self);
  __pyx_cur_scope = __pyx_outer_scope;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2080
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):
 *             nonlocal no_fault
 *             pre_close_first = 0             # <<<<<<<<<<<<<<
 *             #
 *             start_date = self.start_date
 */
  __Pyx_INCREF(__pyx_int_0);
  __pyx_v_pre_close_first = __pyx_int_0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2082
 *             pre_close_first = 0
 *             #
 *             start_date = self.start_date             # <<<<<<<<<<<<<<
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == future_code).order_by(
 *                 globals()[table_name].date.desc()).first()
 */
  if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2082, __pyx_L1_error) }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_start_date); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2082, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_start_date = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2083
 *             #
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == future_code).order_by(             # <<<<<<<<<<<<<<
 *                 globals()[table_name].date.desc()).first()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_session); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_query); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_Globals(); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2083, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_5)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_5);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_7};
    __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_filter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_Globals(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2083, __pyx_L1_error) }
  __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_code); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = PyObject_RichCompare(__pyx_t_4, __pyx_v_future_code, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_7};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_order_by); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2083, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2084
 *             start_date = self.start_date
 *             max_date_row = session.query(globals()[table_name]).filter(globals()[table_name].code == future_code).order_by(
 *                 globals()[table_name].date.desc()).first()             # <<<<<<<<<<<<<<
 * 
 *             if max_date_row:
 */
  __pyx_t_7 = __Pyx_Globals(); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2084, __pyx_L1_error) }
  __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_7, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_date); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_desc); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_7, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_t_4 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_t_3};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2083, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_first); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2084, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_8 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_6))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_6, function);
      __pyx_t_8 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2084, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __pyx_v_max_date_row = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2086
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 */
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_max_date_row); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2086, __pyx_L1_error)
  if (__pyx_t_9) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2087
 * 
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")             # <<<<<<<<<<<<<<
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_date); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_strftime); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2087, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __pyx_t_6 = NULL;
    __pyx_t_8 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_8 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_kp_s_Y_m_d};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2087, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_max_date_table = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2088
 *             if max_date_row:
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close             # <<<<<<<<<<<<<<
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_max_date_row, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2088, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF_SET(__pyx_v_pre_close_first, __pyx_t_1);
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2089
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2089, __pyx_L1_error) }
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2089, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_1, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2089, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2090
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_session); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2090, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_max_date_table};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2090, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2091
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, future_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_utils); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_sh_calendar); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_next_session); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_3 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_3)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_3);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_max_date_table};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2091, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_strftime); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2091, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_1)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_1);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_kp_s_Y_m_d};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2091, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF_SET(__pyx_v_start_date, __pyx_t_2);
        __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2090
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:
 *                     if utils.sh_calendar.is_session(max_date_table):             # <<<<<<<<<<<<<<
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 */
        goto __pyx_L5;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2093
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, future_code)             # <<<<<<<<<<<<<<
 *                         utils.logger.error(f"{future_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if future_code not in update_dict['failed_list']:
 */
      /*else*/ {
        if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2093, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_clearTableContentByCode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2093, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2093, __pyx_L1_error) }
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_future_code};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 2+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2094
 *                     else:
 *                         self.dataproc.clearTableContentByCode(table_name, future_code)
 *                         utils.logger.error(f"{future_code} data wrong in {table_name}, so execute delete its all data.")             # <<<<<<<<<<<<<<
 *                         if future_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(future_code)
 */
        __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_error); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_10 = 0;
        __pyx_t_11 = 127;
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_v_future_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_data_wrong_in);
        __pyx_t_10 += 15;
        __Pyx_GIVEREF(__pyx_kp_u_data_wrong_in);
        PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_kp_u_data_wrong_in);
        if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2094, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_3);
        __pyx_t_3 = 0;
        __Pyx_INCREF(__pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_10 += 33;
        __Pyx_GIVEREF(__pyx_kp_u_so_execute_delete_its_all_data);
        PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_kp_u_so_execute_delete_its_all_data);
        __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_6, 4, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2094, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_3};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2094, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2095
 *                         self.dataproc.clearTableContentByCode(table_name, future_code)
 *                         utils.logger.error(f"{future_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if future_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(future_code)
 *                         no_fault = False
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2095, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2095, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2096
 *                         utils.logger.error(f"{future_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if future_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(future_code)             # <<<<<<<<<<<<<<
 *                         no_fault = False
 *                         return False
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2096, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_future_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2096, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2095
 *                         self.dataproc.clearTableContentByCode(table_name, future_code)
 *                         utils.logger.error(f"{future_code} data wrong in {table_name}, so execute delete its all data.")
 *                         if future_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                             update_dict['failed_list'].append(future_code)
 *                         no_fault = False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2097
 *                         if future_code not in update_dict['failed_list']:
 *                             update_dict['failed_list'].append(future_code)
 *                         no_fault = False             # <<<<<<<<<<<<<<
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2098
 *                             update_dict['failed_list'].append(future_code)
 *                         no_fault = False
 *                         return False             # <<<<<<<<<<<<<<
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;
      }
      __pyx_L5:;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2089
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 *                 if max_date_table < self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     if utils.sh_calendar.is_session(max_date_table):
 *                         start_date = utils.sh_calendar.next_session(max_date_table).strftime('%Y%m%d')
 */
      goto __pyx_L4;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2099
 *                         no_fault = False
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 *                     if future_code not in update_dict['update_list']:
 */
    if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2099, __pyx_L1_error) }
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_RichCompare(__pyx_v_max_date_table, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2099, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (__pyx_t_9) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2100
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")             # <<<<<<<<<<<<<<
 *                     if future_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(future_code)
 */
      __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = 0;
      __pyx_t_11 = 127;
      __Pyx_INCREF(__pyx_kp_u_TradeDayInfo_of_2);
      __pyx_t_10 += 16;
      __Pyx_GIVEREF(__pyx_kp_u_TradeDayInfo_of_2);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_TradeDayInfo_of_2);
      __pyx_t_6 = __Pyx_PyObject_FormatSimple(__pyx_v_future_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_11;
      __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
      __Pyx_GIVEREF(__pyx_t_6);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
      __pyx_t_6 = 0;
      __Pyx_INCREF(__pyx_kp_u_dont_need_to_update_2);
      __pyx_t_10 += 21;
      __Pyx_GIVEREF(__pyx_kp_u_dont_need_to_update_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_dont_need_to_update_2);
      __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2100, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_6};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2100, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2101
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 *                     if future_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(future_code)
 *                     if future_code in update_dict['failed_list']:
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2101, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2102
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 *                     if future_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(future_code)             # <<<<<<<<<<<<<<
 *                     if future_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(future_code)
 */
        __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2102, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_future_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2102, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2101
 *                 elif max_date_table >= self.latest_trade_day:
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 *                     if future_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['update_list'].append(future_code)
 *                     if future_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2103
 *                     if future_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(future_code)
 *                     if future_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(future_code)
 *                     return True
 */
      __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2103, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_1, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2103, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2104
 *                         update_dict['update_list'].append(future_code)
 *                     if future_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(future_code)             # <<<<<<<<<<<<<<
 *                     return True
 * 
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_remove); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2104, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_6))) {
          __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
          if (likely(__pyx_t_2)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
            __Pyx_INCREF(__pyx_t_2);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_6, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_future_code};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2104, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2103
 *                     if future_code not in update_dict['update_list']:
 *                         update_dict['update_list'].append(future_code)
 *                     if future_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                         update_dict['failed_list'].remove(future_code)
 *                     return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2105
 *                     if future_code in update_dict['failed_list']:
 *                         update_dict['failed_list'].remove(future_code)
 *                     return True             # <<<<<<<<<<<<<<
 * 
 *             try:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2099
 *                         no_fault = False
 *                         return False
 *                 elif max_date_table >= self.latest_trade_day:             # <<<<<<<<<<<<<<
 *                     utils.logger.info(f"TradeDayInfo of {future_code} dont need to update.")
 *                     if future_code not in update_dict['update_list']:
 */
    }
    __pyx_L4:;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2086
 *                 globals()[table_name].date.desc()).first()
 * 
 *             if max_date_row:             # <<<<<<<<<<<<<<
 *                 max_date_table = max_date_row.date.strftime("%Y%m%d")
 *                 pre_close_first = max_date_row.close
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2107
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # --
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)
 */
  {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
    __Pyx_XGOTREF(__pyx_t_13);
    __Pyx_XGOTREF(__pyx_t_14);
    __Pyx_XGOTREF(__pyx_t_15);
    /*try:*/ {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2109
 *             try:
 *                 # --
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)             # <<<<<<<<<<<<<<
 * 
 *                 if future_trade_data_df.empty:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ak); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_futures_main_sina); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_symbol, __pyx_v_future_code) < 0) __PYX_ERR(0, 2109, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_start_date, __pyx_v_start_date) < 0) __PYX_ERR(0, 2109, __pyx_L9_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2109, __pyx_L9_error) }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_latest_trade_day); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_end_date, __pyx_t_2) < 0) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2109, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_v_future_trade_data_df = __pyx_t_2;
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2111
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)
 * 
 *                 if future_trade_data_df.empty:             # <<<<<<<<<<<<<<
 *                     raise ValueError(f"{future_code} trade day data is empty. ")
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_trade_data_df, __pyx_n_s_empty); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2111, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2111, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(__pyx_t_9)) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2112
 * 
 *                 if future_trade_data_df.empty:
 *                     raise ValueError(f"{future_code} trade day data is empty. ")             # <<<<<<<<<<<<<<
 * 
 *                 # codename
 */
        __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_v_future_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_1 = __Pyx_PyUnicode_ConcatInPlace(__pyx_t_2, __pyx_kp_u_trade_day_data_is_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2112, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_Raise(__pyx_t_2, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __PYX_ERR(0, 2112, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2111
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)
 * 
 *                 if future_trade_data_df.empty:             # <<<<<<<<<<<<<<
 *                     raise ValueError(f"{future_code} trade day data is empty. ")
 * 
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2115
 * 
 *                 # codename
 *                 future_trade_data_df['code'] = future_code             # <<<<<<<<<<<<<<
 *                 future_trade_data_df['name'] = future_name
 *                 future_trade_data_df.rename(
 */
      if (unlikely((PyObject_SetItem(__pyx_v_future_trade_data_df, __pyx_n_s_code, __pyx_v_future_code) < 0))) __PYX_ERR(0, 2115, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2116
 *                 # codename
 *                 future_trade_data_df['code'] = future_code
 *                 future_trade_data_df['name'] = future_name             # <<<<<<<<<<<<<<
 *                 future_trade_data_df.rename(
 *                     columns={'': 'date', '': 'open', '': 'high', '': 'low', '': 'close', '': 'volume',
 */
      if (unlikely((PyObject_SetItem(__pyx_v_future_trade_data_df, __pyx_n_s_name, __pyx_v_future_name) < 0))) __PYX_ERR(0, 2116, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2117
 *                 future_trade_data_df['code'] = future_code
 *                 future_trade_data_df['name'] = future_name
 *                 future_trade_data_df.rename(             # <<<<<<<<<<<<<<
 *                     columns={'': 'date', '': 'open', '': 'high', '': 'low', '': 'close', '': 'volume',
 *                              '': 'open_interest'}, inplace=True)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_trade_data_df, __pyx_n_s_rename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2118
 *                 future_trade_data_df['name'] = future_name
 *                 future_trade_data_df.rename(
 *                     columns={'': 'date', '': 'open', '': 'high', '': 'low', '': 'close', '': 'volume',             # <<<<<<<<<<<<<<
 *                              '': 'open_interest'}, inplace=True)
 * 
 */
      __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2118, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2118, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__35, __pyx_n_s_date) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__87, __pyx_n_s_open) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__88, __pyx_n_s_high) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__89, __pyx_n_s_low) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__90, __pyx_n_s_close) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__64, __pyx_n_s_volume) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_kp_s__91, __pyx_n_s_open_interest) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_columns, __pyx_t_6) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2119
 *                 future_trade_data_df.rename(
 *                     columns={'': 'date', '': 'open', '': 'high', '': 'low', '': 'close', '': 'volume',
 *                              '': 'open_interest'}, inplace=True)             # <<<<<<<<<<<<<<
 * 
 *                 # pre_close
 */
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2118, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2117
 *                 future_trade_data_df['code'] = future_code
 *                 future_trade_data_df['name'] = future_name
 *                 future_trade_data_df.rename(             # <<<<<<<<<<<<<<
 *                     columns={'': 'date', '': 'open', '': 'high', '': 'low', '': 'close', '': 'volume',
 *                              '': 'open_interest'}, inplace=True)
 */
      __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2117, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2122
 * 
 *                 # pre_close
 *                 pre_close = future_trade_data_df['close'].shift(1)             # <<<<<<<<<<<<<<
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first
 */
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_future_trade_data_df, __pyx_n_s_close); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2122, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_int_1};
        __pyx_t_6 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2122, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_v_pre_close = __pyx_t_6;
      __pyx_t_6 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2123
 *                 # pre_close
 *                 pre_close = future_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 */
      __pyx_t_9 = (__Pyx_PyInt_BoolNeObjC(__pyx_v_pre_close_first, __pyx_int_0, 0, 0)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2123, __pyx_L9_error)
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2124
 *                 pre_close = future_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first             # <<<<<<<<<<<<<<
 *                 pre_close.fillna(0, inplace=True)
 *                 future_trade_data_df['pre_close'] = pre_close
 */
        if (unlikely((__Pyx_SetItemInt(__pyx_v_pre_close, 0, __pyx_v_pre_close_first, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0))) __PYX_ERR(0, 2124, __pyx_L9_error)

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2123
 *                 # pre_close
 *                 pre_close = future_trade_data_df['close'].shift(1)
 *                 if pre_close_first != 0:             # <<<<<<<<<<<<<<
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2125
 *                 if pre_close_first != 0:
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 *                 future_trade_data_df['pre_close'] = pre_close
 * 
 */
      __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pre_close, __pyx_n_s_fillna); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2125, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_inplace, Py_True) < 0) __PYX_ERR(0, 2125, __pyx_L9_error)
      __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__52, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2126
 *                     pre_close[0] = pre_close_first
 *                 pre_close.fillna(0, inplace=True)
 *                 future_trade_data_df['pre_close'] = pre_close             # <<<<<<<<<<<<<<
 * 
 *                 future_trade_data_df = future_trade_data_df[dtype_mapping.keys()]
 */
      if (unlikely((PyObject_SetItem(__pyx_v_future_trade_data_df, __pyx_n_s_pre_close, __pyx_v_pre_close) < 0))) __PYX_ERR(0, 2126, __pyx_L9_error)

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2128
 *                 future_trade_data_df['pre_close'] = pre_close
 * 
 *                 future_trade_data_df = future_trade_data_df[dtype_mapping.keys()]             # <<<<<<<<<<<<<<
 * 
 *                 future_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 */
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 2128, __pyx_L9_error) }
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_6 = NULL;
      __pyx_t_8 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
          __pyx_t_8 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_8, 0+__pyx_t_8);
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2128, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_future_trade_data_df, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF_SET(__pyx_v_future_trade_data_df, __pyx_t_2);
      __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2130
 *                 future_trade_data_df = future_trade_data_df[dtype_mapping.keys()]
 * 
 *                 future_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)             # <<<<<<<<<<<<<<
 *                 if future_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(future_code)
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_trade_data_df, __pyx_n_s_to_sql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (unlikely(!__pyx_cur_scope->__pyx_v_table_name)) { __Pyx_RaiseClosureNameError("table_name"); __PYX_ERR(0, 2130, __pyx_L9_error) }
      __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_table_name);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_table_name);
      if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_table_name)) __PYX_ERR(0, 2130, __pyx_L9_error);
      __pyx_t_6 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_engine); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_con, __pyx_t_3) < 0) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_if_exists, __pyx_n_s_append) < 0) __PYX_ERR(0, 2130, __pyx_L9_error)
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_index, Py_False) < 0) __PYX_ERR(0, 2130, __pyx_L9_error)
      if (unlikely(!__pyx_cur_scope->__pyx_v_dtype_mapping)) { __Pyx_RaiseClosureNameError("dtype_mapping"); __PYX_ERR(0, 2130, __pyx_L9_error) }
      if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_dtype, __pyx_cur_scope->__pyx_v_dtype_mapping) < 0) __PYX_ERR(0, 2130, __pyx_L9_error)
      __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2130, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2131
 * 
 *                 future_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if future_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(future_code)
 *                 if future_code in update_dict['failed_list']:
 */
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_3, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2131, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2132
 *                 future_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if future_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(future_code)             # <<<<<<<<<<<<<<
 *                 if future_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(future_code)
 */
        __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_update_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2132, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_future_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2132, __pyx_L9_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2131
 * 
 *                 future_trade_data_df.to_sql(table_name, con=engine, if_exists='append', index=False, dtype=dtype_mapping)
 *                 if future_code not in update_dict['update_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['update_list'].append(future_code)
 *                 if future_code in update_dict['failed_list']:
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2133
 *                 if future_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(future_code)
 *                 if future_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(future_code)
 *                 return True
 */
      __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2133, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_3, Py_EQ)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2133, __pyx_L9_error)
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      if (__pyx_t_9) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2134
 *                     update_dict['update_list'].append(future_code)
 *                 if future_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(future_code)             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
        __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2134, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_6 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_1))) {
          __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
          if (likely(__pyx_t_6)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
            __Pyx_INCREF(__pyx_t_6);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_1, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_future_code};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2134, __pyx_L9_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        }
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2133
 *                 if future_code not in update_dict['update_list']:
 *                     update_dict['update_list'].append(future_code)
 *                 if future_code in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].remove(future_code)
 *                 return True
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2135
 *                 if future_code in update_dict['failed_list']:
 *                     update_dict['failed_list'].remove(future_code)
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *             except Exception as e:
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L13_try_return;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2107
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # --
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)
 */
    }
    __pyx_L9_error:;
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2137
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")
 *                 no_fault = False
 */
    __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
    if (__pyx_t_16) {
      __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql.updateSingleFutureTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 2137, __pyx_L11_except_error)
      __Pyx_XGOTREF(__pyx_t_3);
      __Pyx_XGOTREF(__pyx_t_1);
      __Pyx_XGOTREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_v_e = __pyx_t_1;
      /*try:*/ {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2138
 * 
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")             # <<<<<<<<<<<<<<
 *                 no_fault = False
 *                 if future_code not in update_dict['failed_list']:
 */
        __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_utils); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_logger); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_error); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = PyTuple_New(7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_7);
        __pyx_t_10 = 0;
        __pyx_t_11 = 127;
        __Pyx_INCREF(__pyx_kp_u_Failed_to_call_ak_futures_main_s);
        __pyx_t_10 += 47;
        __Pyx_GIVEREF(__pyx_kp_u_Failed_to_call_ak_futures_main_s);
        PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_kp_u_Failed_to_call_ak_futures_main_s);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_future_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u_code_2);
        __pyx_t_10 += 8;
        __Pyx_GIVEREF(__pyx_kp_u_code_2);
        PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_u_code_2);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_future_code, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__21);
        __pyx_t_10 += 2;
        __Pyx_GIVEREF(__pyx_kp_u__21);
        PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_kp_u__21);
        __pyx_t_5 = __Pyx_PyObject_FormatSimple(__pyx_v_e, __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_11 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_11) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_11;
        __pyx_t_10 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_t_5);
        __pyx_t_5 = 0;
        __Pyx_INCREF(__pyx_kp_u__22);
        __pyx_t_10 += 1;
        __Pyx_GIVEREF(__pyx_kp_u__22);
        PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_kp_u__22);
        __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_7, 7, __pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2138, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_t_7 = NULL;
        __pyx_t_8 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_4))) {
          __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
          if (likely(__pyx_t_7)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_4, function);
            __pyx_t_8 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
          __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2138, __pyx_L24_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2139
 *             except Exception as e:
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")
 *                 no_fault = False             # <<<<<<<<<<<<<<
 *                 if future_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(future_code)
 */
        __pyx_cur_scope->__pyx_v_no_fault = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2140
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")
 *                 no_fault = False
 *                 if future_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(future_code)
 *                 return False
 */
        __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2140, __pyx_L24_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_v_future_code, __pyx_t_2, Py_NE)); if (unlikely((__pyx_t_9 < 0))) __PYX_ERR(0, 2140, __pyx_L24_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        if (__pyx_t_9) {

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2141
 *                 no_fault = False
 *                 if future_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(future_code)             # <<<<<<<<<<<<<<
 *                 return False
 * 
 */
          __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_update_dict, __pyx_n_s_failed_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2141, __pyx_L24_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_future_code); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2141, __pyx_L24_error)
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

          /* "tbstock/dataAcquisition/saveDataToMysql.py":2140
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")
 *                 no_fault = False
 *                 if future_code not in update_dict['failed_list']:             # <<<<<<<<<<<<<<
 *                     update_dict['failed_list'].append(future_code)
 *                 return False
 */
        }

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2142
 *                 if future_code not in update_dict['failed_list']:
 *                     update_dict['failed_list'].append(future_code)
 *                 return False             # <<<<<<<<<<<<<<
 * 
 *         if multi_thread:
 */
        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        goto __pyx_L23_return;
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2137
 *                 return True
 * 
 *             except Exception as e:             # <<<<<<<<<<<<<<
 *                 utils.logger.error(f"Failed to call ak.futures_main_sina for name = {future_name} code = {future_code}: {e} ")
 *                 no_fault = False
 */
      /*finally:*/ {
        __pyx_L24_error:;
        /*exception exit:*/{
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_22, &__pyx_t_23, &__pyx_t_24);
          if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21) < 0)) __Pyx_ErrFetch(&__pyx_t_19, &__pyx_t_20, &__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_19);
          __Pyx_XGOTREF(__pyx_t_20);
          __Pyx_XGOTREF(__pyx_t_21);
          __Pyx_XGOTREF(__pyx_t_22);
          __Pyx_XGOTREF(__pyx_t_23);
          __Pyx_XGOTREF(__pyx_t_24);
          __pyx_t_16 = __pyx_lineno; __pyx_t_17 = __pyx_clineno; __pyx_t_18 = __pyx_filename;
          {
            __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          }
          if (PY_MAJOR_VERSION >= 3) {
            __Pyx_XGIVEREF(__pyx_t_22);
            __Pyx_XGIVEREF(__pyx_t_23);
            __Pyx_XGIVEREF(__pyx_t_24);
            __Pyx_ExceptionReset(__pyx_t_22, __pyx_t_23, __pyx_t_24);
          }
          __Pyx_XGIVEREF(__pyx_t_19);
          __Pyx_XGIVEREF(__pyx_t_20);
          __Pyx_XGIVEREF(__pyx_t_21);
          __Pyx_ErrRestore(__pyx_t_19, __pyx_t_20, __pyx_t_21);
          __pyx_t_19 = 0; __pyx_t_20 = 0; __pyx_t_21 = 0; __pyx_t_22 = 0; __pyx_t_23 = 0; __pyx_t_24 = 0;
          __pyx_lineno = __pyx_t_16; __pyx_clineno = __pyx_t_17; __pyx_filename = __pyx_t_18;
          goto __pyx_L11_except_error;
        }
        __pyx_L23_return: {
          __pyx_t_24 = __pyx_r;
          __pyx_r = 0;
          __Pyx_DECREF(__pyx_v_e); __pyx_v_e = 0;
          __pyx_r = __pyx_t_24;
          __pyx_t_24 = 0;
          goto __pyx_L12_except_return;
        }
      }
    }
    goto __pyx_L11_except_error;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2107
 *                     return True
 * 
 *             try:             # <<<<<<<<<<<<<<
 *                 # --
 *                 future_trade_data_df = ak.futures_main_sina(symbol=future_code, start_date=start_date, end_date=self.latest_trade_day)
 */
    __pyx_L11_except_error:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L1_error;
    __pyx_L13_try_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
    __pyx_L12_except_return:;
    __Pyx_XGIVEREF(__pyx_t_13);
    __Pyx_XGIVEREF(__pyx_t_14);
    __Pyx_XGIVEREF(__pyx_t_15);
    __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
    goto __pyx_L0;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2078
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 * 
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql.updateSingleFutureTradeDayInfo", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_pre_close_first);
  __Pyx_XDECREF(__pyx_v_start_date);
  __Pyx_XDECREF(__pyx_v_max_date_row);
  __Pyx_XDECREF(__pyx_v_max_date_table);
  __Pyx_XDECREF(__pyx_v_future_trade_data_df);
  __Pyx_XDECREF(__pyx_v_pre_close);
  __Pyx_XDECREF(__pyx_v_e);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_58updateFutureTradeDayToMysql(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_multi_thread, PyObject *__pyx_v_workers) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *__pyx_cur_scope;
  PyObject *__pyx_v_fun_name = NULL;
  PyObject *__pyx_v_exclude_future_list = NULL;
  PyObject *__pyx_v_updated_list = NULL;
  PyObject *__pyx_v_update_dict = NULL;
  PyObject *__pyx_v_future_code_name_df = NULL;
  PyObject *__pyx_v_updateSingleFutureTradeDayInfo = 0;
  PyObject *__pyx_v_executor = NULL;
  PyObject *__pyx_v_futures = NULL;
  PyObject *__pyx_v_start_time = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
  PyObject *__pyx_v_row = NULL;
  PyObject *__pyx_v_future_code = NULL;
  PyObject *__pyx_v_future_name = NULL;
  PyObject *__pyx_v_future = NULL;
  PyObject *__pyx_v_current_time = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  Py_ssize_t __pyx_t_7;
  Py_UCS4 __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *(*__pyx_t_14)(PyObject *);
  PyObject *__pyx_t_15 = NULL;
  PyObject *(*__pyx_t_16)(PyObject *);
  int __pyx_t_17;
  PyObject *__pyx_t_18 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateFutureTradeDayToMysql", 0);
  __pyx_cur_scope = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __pyx_cur_scope = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)Py_None);
    __Pyx_INCREF(Py_None);
    __PYX_ERR(0, 2045, __pyx_L1_error)
  } else {
    __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
  }
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2046
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name             # <<<<<<<<<<<<<<
 *         table_name = 'future_trade_day'
 *         no_fault = True
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getframe); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2046, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_f_code); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_co_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_fun_name = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2047
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'             # <<<<<<<<<<<<<<
 *         no_fault = True
 * 
 */
  __Pyx_INCREF(__pyx_n_s_future_trade_day);
  __Pyx_GIVEREF(__pyx_n_s_future_trade_day);
  __pyx_cur_scope->__pyx_v_table_name = __pyx_n_s_future_trade_day;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2048
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 *         no_fault = True             # <<<<<<<<<<<<<<
 * 
 *         exclude_future_list = list(self.exclude_future_dict.keys())
 */
  __pyx_cur_scope->__pyx_v_no_fault = 1;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2050
 *         no_fault = True
 * 
 *         exclude_future_list = list(self.exclude_future_dict.keys())             # <<<<<<<<<<<<<<
 *         # jsonjson
 *         updated_list = []
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_exclude_future_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_keys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2050, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = __Pyx_PySequence_ListKeepNew(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2050, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_exclude_future_list = ((PyObject*)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2052
 *         exclude_future_list = list(self.exclude_future_dict.keys())
 *         # jsonjson
 *         updated_list = []             # <<<<<<<<<<<<<<
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 */
  __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2052, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_v_updated_list = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2053
 *         # jsonjson
 *         updated_list = []
 *         update_dict = {"updated": False,             # <<<<<<<<<<<<<<
 *                        "failed_list": [],
 *                        "update_list": []
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_updated, Py_False) < 0) __PYX_ERR(0, 2053, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2054
 *         updated_list = []
 *         update_dict = {"updated": False,
 *                        "failed_list": [],             # <<<<<<<<<<<<<<
 *                        "update_list": []
 *                        }
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2054, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_failed_list, __pyx_t_1) < 0) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2055
 *         update_dict = {"updated": False,
 *                        "failed_list": [],
 *                        "update_list": []             # <<<<<<<<<<<<<<
 *                        }
 * 
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2055, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_update_list, __pyx_t_1) < 0) __PYX_ERR(0, 2053, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_update_dict = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2058
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_has_update_file); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_cur_scope->__pyx_v_table_name, __pyx_t_2, Py_EQ)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2058, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = __pyx_t_6;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2059
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_updated); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2059, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_5) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2060
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')             # <<<<<<<<<<<<<<
 *                 return True
 *             else:
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_logger); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_info); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_8 = 127;
      __Pyx_INCREF(__pyx_kp_u_The);
      __pyx_t_7 += 4;
      __Pyx_GIVEREF(__pyx_kp_u_The);
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_The);
      __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_cur_scope->__pyx_v_table_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8;
      __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9);
      __Pyx_GIVEREF(__pyx_t_9);
      PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_INCREF(__pyx_kp_u_table_has_been_updated_2);
      __pyx_t_7 += 25;
      __Pyx_GIVEREF(__pyx_kp_u_table_has_been_updated_2);
      PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_table_has_been_updated_2);
      __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2060, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_1))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_1, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
        __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      }
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2061
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True             # <<<<<<<<<<<<<<
 *             else:
 *                 update_dict = self.update_json[table_name]
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(Py_True);
      __pyx_r = Py_True;
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2059
 * 
 *         if self.has_update_file and (table_name in self.update_json):
 *             if self.update_json[table_name]['updated']:             # <<<<<<<<<<<<<<
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 *                 return True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2063
 *                 return True
 *             else:
 *                 update_dict = self.update_json[table_name]             # <<<<<<<<<<<<<<
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 */
    /*else*/ {
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2063, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_update_dict, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2064
 *             else:
 *                 update_dict = self.update_json[table_name]
 *                 updated_list = self.update_json[table_name]['update_list']             # <<<<<<<<<<<<<<
 * 
 *         utils.logger.info(f"Beginning {fun_name}")
 */
      __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_s_update_list); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2064, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF_SET(__pyx_v_updated_list, __pyx_t_1);
      __pyx_t_1 = 0;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2058
 *                        }
 * 
 *         if self.has_update_file and (table_name in self.update_json):             # <<<<<<<<<<<<<<
 *             if self.update_json[table_name]['updated']:
 *                 utils.logger.info(f'The {table_name} table has been updated .')
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2066
 *                 updated_list = self.update_json[table_name]['update_list']
 * 
 *         utils.logger.info(f"Beginning {fun_name}")             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_logger); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_info); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = __Pyx_PyObject_FormatSimple(__pyx_v_fun_name, __pyx_empty_unicode); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_kp_u_Beginning, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2066, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_t_3};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2066, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2069
 * 
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])             # <<<<<<<<<<<<<<
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_get_table_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_Globals(); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2069, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_t_9};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_cur_scope->__pyx_v_dtype_mapping = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2070
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_id, __pyx_cur_scope->__pyx_v_dtype_mapping, Py_EQ)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2070, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2071
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:
 *             dtype_mapping.pop('id')             # <<<<<<<<<<<<<<
 * 
 *         #
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dtype_mapping, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2071, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_n_s_id};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2071, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2070
 *         #
 *         dtype_mapping = get_table_columns(globals()[table_name])
 *         if 'id' in dtype_mapping:             # <<<<<<<<<<<<<<
 *             dtype_mapping.pop('id')
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2074
 * 
 *         #
 *         future_code_name_df = pd.read_csv('futureCodeNames.csv')             # <<<<<<<<<<<<<<
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(exclude_future_list)]
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_read_csv); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2074, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_kp_s_futureCodeNames_csv};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2074, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_v_future_code_name_df = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2075
 *         #
 *         future_code_name_df = pd.read_csv('futureCodeNames.csv')
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(exclude_future_list)]             # <<<<<<<<<<<<<<
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 * 
 */
  __pyx_t_9 = __Pyx_PyObject_Dict_GetItem(__pyx_v_future_code_name_df, __pyx_n_s_symbol); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_isin); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_exclude_future_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2075, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_t_2 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_future_code_name_df, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2075, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF_SET(__pyx_v_future_code_name_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2076
 *         future_code_name_df = pd.read_csv('futureCodeNames.csv')
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(exclude_future_list)]
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]             # <<<<<<<<<<<<<<
 * 
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):
 */
  __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_v_future_code_name_df, __pyx_n_s_symbol); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isin); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_9))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_9, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_updated_list};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __pyx_t_9 = PyNumber_Invert(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_future_code_name_df, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF_SET(__pyx_v_future_code_name_df, __pyx_t_1);
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2078
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 * 
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */
  __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_future_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 2078, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_future_name, __pyx_n_s_str) < 0) __PYX_ERR(0, 2078, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_update_dict, __pyx_n_s_dict) < 0) __PYX_ERR(0, 2078, __pyx_L1_error)
  __pyx_t_9 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_1updateSingleFutureTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateFutureTradeDay, ((PyObject*)__pyx_cur_scope), __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_9);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_9, __pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_updateSingleFutureTradeDayInfo = __pyx_t_9;
  __pyx_t_9 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2144
 *                 return False
 * 
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_multi_thread); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2144, __pyx_L1_error)
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2146
 *         if multi_thread:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
    /*with:*/ {
      __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_max_workers, __pyx_v_workers) < 0) __PYX_ERR(0, 2146, __pyx_L1_error)
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2146, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_10);
      __pyx_t_9 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2146, __pyx_L9_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_3 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (likely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
        __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
        if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L9_error)
        __Pyx_GOTREF(__pyx_t_1);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __pyx_t_9 = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      /*try:*/ {
        {
          __Pyx_PyThreadState_declare
          __Pyx_PyThreadState_assign
          __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
          __Pyx_XGOTREF(__pyx_t_11);
          __Pyx_XGOTREF(__pyx_t_12);
          __Pyx_XGOTREF(__pyx_t_13);
          /*try:*/ {
            __pyx_v_executor = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":2147
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []             # <<<<<<<<<<<<<<
 *                 start_time = time.time()
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #
 */
            __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2147, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_v_futures = ((PyObject*)__pyx_t_9);
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":2148
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 *                 futures = []
 *                 start_time = time.time()             # <<<<<<<<<<<<<<
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #
 *                     future_code = row['symbol']
 */
            __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2148, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2148, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_1))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_1, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
              __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2148, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_9);
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            }
            __pyx_v_start_time = __pyx_t_9;
            __pyx_t_9 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":2149
 *                 futures = []
 *                 start_time = time.time()
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #             # <<<<<<<<<<<<<<
 *                     future_code = row['symbol']
 *                     future_name = row['name']
 */
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2149, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_code_name_df, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2149, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_3 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (likely(PyMethod_Check(__pyx_t_2))) {
              __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
              if (likely(__pyx_t_3)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_3);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_2, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
              __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2149, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2149, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_GIVEREF(__pyx_t_1);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1)) __PYX_ERR(0, 2149, __pyx_L13_error);
            __pyx_t_1 = 0;
            __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2149, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_1);
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 2149, __pyx_L13_error)
            if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_disable, Py_True) < 0) __PYX_ERR(0, 2149, __pyx_L13_error)
            __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
              __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
              __pyx_t_7 = 0;
              __pyx_t_14 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2149, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2149, __pyx_L13_error)
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            for (;;) {
              if (likely(!__pyx_t_14)) {
                if (likely(PyList_CheckExact(__pyx_t_1))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2149, __pyx_L13_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2149, __pyx_L13_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_1);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2149, __pyx_L13_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2149, __pyx_L13_error)
                  #else
                  __pyx_t_3 = __Pyx_PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2149, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_3);
                  #endif
                }
              } else {
                __pyx_t_3 = __pyx_t_14(__pyx_t_1);
                if (unlikely(!__pyx_t_3)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2149, __pyx_L13_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_3);
              }
              if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
                PyObject* sequence = __pyx_t_3;
                Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
                if (unlikely(size != 2)) {
                  if (size > 2) __Pyx_RaiseTooManyValuesError(2);
                  else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
                  __PYX_ERR(0, 2149, __pyx_L13_error)
                }
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                if (likely(PyTuple_CheckExact(sequence))) {
                  __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
                } else {
                  __pyx_t_2 = PyList_GET_ITEM(sequence, 0); 
                  __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
                }
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(__pyx_t_9);
                #else
                __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2149, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2149, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_9);
                #endif
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              } else {
                Py_ssize_t index = -1;
                __pyx_t_15 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2149, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_15);
                __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_15);
                index = 0; __pyx_t_2 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_2)) goto __pyx_L21_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_2);
                index = 1; __pyx_t_9 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_9)) goto __pyx_L21_unpacking_failed;
                __Pyx_GOTREF(__pyx_t_9);
                if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 2149, __pyx_L13_error)
                __pyx_t_16 = NULL;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                goto __pyx_L22_unpacking_done;
                __pyx_L21_unpacking_failed:;
                __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
                __pyx_t_16 = NULL;
                if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
                __PYX_ERR(0, 2149, __pyx_L13_error)
                __pyx_L22_unpacking_done:;
              }
              __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_2);
              __pyx_t_2 = 0;
              __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_9);
              __pyx_t_9 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2150
 *                 start_time = time.time()
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #
 *                     future_code = row['symbol']             # <<<<<<<<<<<<<<
 *                     future_name = row['name']
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)
 */
              __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_symbol); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2150, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_XDECREF_SET(__pyx_v_future_code, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2151
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #
 *                     future_code = row['symbol']
 *                     future_name = row['name']             # <<<<<<<<<<<<<<
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)
 *                     futures.append(future)
 */
              __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_XDECREF_SET(__pyx_v_future_name, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2152
 *                     future_code = row['symbol']
 *                     future_name = row['name']
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)             # <<<<<<<<<<<<<<
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 */
              __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_executor, __pyx_n_s_submit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2152, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_2 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (likely(PyMethod_Check(__pyx_t_9))) {
                __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
                if (likely(__pyx_t_2)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                  __Pyx_INCREF(__pyx_t_2);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_9, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[5] = {__pyx_t_2, __pyx_v_updateSingleFutureTradeDayInfo, __pyx_v_future_code, __pyx_v_future_name, __pyx_v_update_dict};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 4+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_3);
              __pyx_t_3 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2153
 *                     future_name = row['name']
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)
 *                     futures.append(future)             # <<<<<<<<<<<<<<
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 */
              __pyx_t_17 = __Pyx_PyList_Append(__pyx_v_futures, __pyx_v_future); if (unlikely(__pyx_t_17 == ((int)-1))) __PYX_ERR(0, 2153, __pyx_L13_error)

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2149
 *                 futures = []
 *                 start_time = time.time()
 *                 for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, disable=True):  #             # <<<<<<<<<<<<<<
 *                     future_code = row['symbol']
 *                     future_name = row['name']
 */
            }
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":2154
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_1);
            __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_9);
            __pyx_t_2 = NULL;
            __pyx_t_4 = 0;
            #if CYTHON_UNPACK_METHODS
            if (unlikely(PyMethod_Check(__pyx_t_9))) {
              __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
              if (likely(__pyx_t_2)) {
                PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_INCREF(function);
                __Pyx_DECREF_SET(__pyx_t_9, function);
                __pyx_t_4 = 1;
              }
            }
            #endif
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_v_futures};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
              __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            }
            __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_9);
            __Pyx_GIVEREF(__pyx_t_3);
            if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L13_error);
            __pyx_t_3 = 0;
            __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_3);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_cur_scope->__pyx_v_table_name) < 0) __PYX_ERR(0, 2154, __pyx_L13_error)
            __pyx_t_7 = __Pyx_PyList_GET_SIZE(__pyx_v_futures); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2154, __pyx_L13_error)
            __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_2) < 0) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L13_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
            __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
              __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3);
              __pyx_t_7 = 0;
              __pyx_t_14 = NULL;
            } else {
              __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2154, __pyx_L13_error)
            }
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            for (;;) {
              if (likely(!__pyx_t_14)) {
                if (likely(PyList_CheckExact(__pyx_t_3))) {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2154, __pyx_L13_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2154, __pyx_L13_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                } else {
                  {
                    Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
                    #if !CYTHON_ASSUME_SAFE_MACROS
                    if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2154, __pyx_L13_error)
                    #endif
                    if (__pyx_t_7 >= __pyx_temp) break;
                  }
                  #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                  __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2154, __pyx_L13_error)
                  #else
                  __pyx_t_2 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_2);
                  #endif
                }
              } else {
                __pyx_t_2 = __pyx_t_14(__pyx_t_3);
                if (unlikely(!__pyx_t_2)) {
                  PyObject* exc_type = PyErr_Occurred();
                  if (exc_type) {
                    if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
                    else __PYX_ERR(0, 2154, __pyx_L13_error)
                  }
                  break;
                }
                __Pyx_GOTREF(__pyx_t_2);
              }
              __Pyx_XDECREF_SET(__pyx_v_future, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2155
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()             # <<<<<<<<<<<<<<
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 */
              __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2155, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_9);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2155, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_1);
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              __pyx_t_9 = NULL;
              __pyx_t_4 = 0;
              #if CYTHON_UNPACK_METHODS
              if (unlikely(PyMethod_Check(__pyx_t_1))) {
                __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
                if (likely(__pyx_t_9)) {
                  PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                  __Pyx_INCREF(__pyx_t_9);
                  __Pyx_INCREF(function);
                  __Pyx_DECREF_SET(__pyx_t_1, function);
                  __pyx_t_4 = 1;
                }
              }
              #endif
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
                __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2155, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              }
              __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_2);
              __pyx_t_2 = 0;

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2156
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              __pyx_t_2 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2156, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2156, __pyx_L13_error)
              __Pyx_GOTREF(__pyx_t_1);
              __pyx_t_9 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2156, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
              __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2156, __pyx_L13_error)
              __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
              if (__pyx_t_5) {

                /* "tbstock/dataAcquisition/saveDataToMysql.py":2157
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                         self.dumpJsonToFile()
 *                         start_time = current_time
 */
                __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2157, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_9);
                if (unlikely((PyObject_SetItem(__pyx_t_9, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 2157, __pyx_L13_error)
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":2158
 *                     if current_time - start_time >= self.dump_json_period:
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                         start_time = current_time
 *         else:
 */
                __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2158, __pyx_L13_error)
                __Pyx_GOTREF(__pyx_t_1);
                __pyx_t_2 = NULL;
                __pyx_t_4 = 0;
                #if CYTHON_UNPACK_METHODS
                if (likely(PyMethod_Check(__pyx_t_1))) {
                  __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
                  if (likely(__pyx_t_2)) {
                    PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
                    __Pyx_INCREF(__pyx_t_2);
                    __Pyx_INCREF(function);
                    __Pyx_DECREF_SET(__pyx_t_1, function);
                    __pyx_t_4 = 1;
                  }
                }
                #endif
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
                  __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2158, __pyx_L13_error)
                  __Pyx_GOTREF(__pyx_t_9);
                  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
                }
                __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;

                /* "tbstock/dataAcquisition/saveDataToMysql.py":2159
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 *                         start_time = current_time             # <<<<<<<<<<<<<<
 *         else:
 *             #
 */
                __Pyx_INCREF(__pyx_v_current_time);
                __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

                /* "tbstock/dataAcquisition/saveDataToMysql.py":2156
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                         self.update_json[table_name] = update_dict
 *                         self.dumpJsonToFile()
 */
              }

              /* "tbstock/dataAcquisition/saveDataToMysql.py":2154
 *                     future = executor.submit(updateSingleFutureTradeDayInfo, future_code, future_name, update_dict)
 *                     futures.append(future)
 *                 for future in tqdm(as_completed(futures), desc=table_name, total=len(futures)):             # <<<<<<<<<<<<<<
 *                     current_time = time.time()
 *                     if current_time - start_time >= self.dump_json_period:
 */
            }
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

            /* "tbstock/dataAcquisition/saveDataToMysql.py":2146
 *         if multi_thread:
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                 futures = []
 *                 start_time = time.time()
 */
          }
          __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
          __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
          __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
          goto __pyx_L18_try_end;
          __pyx_L13_error:;
          __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
          /*except:*/ {
            __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
            if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_9, &__pyx_t_1) < 0) __PYX_ERR(0, 2146, __pyx_L15_except_error)
            __Pyx_XGOTREF(__pyx_t_3);
            __Pyx_XGOTREF(__pyx_t_9);
            __Pyx_XGOTREF(__pyx_t_1);
            __pyx_t_2 = PyTuple_Pack(3, __pyx_t_3, __pyx_t_9, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_2, NULL);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 2146, __pyx_L15_except_error)
            __Pyx_GOTREF(__pyx_t_18);
            __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_18);
            __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
            if (__pyx_t_5 < 0) __PYX_ERR(0, 2146, __pyx_L15_except_error)
            __pyx_t_6 = (!__pyx_t_5);
            if (unlikely(__pyx_t_6)) {
              __Pyx_GIVEREF(__pyx_t_3);
              __Pyx_GIVEREF(__pyx_t_9);
              __Pyx_XGIVEREF(__pyx_t_1);
              __Pyx_ErrRestoreWithState(__pyx_t_3, __pyx_t_9, __pyx_t_1);
              __pyx_t_3 = 0; __pyx_t_9 = 0; __pyx_t_1 = 0; 
              __PYX_ERR(0, 2146, __pyx_L15_except_error)
            }
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
            __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
            goto __pyx_L14_exception_handled;
          }
          __pyx_L15_except_error:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          goto __pyx_L1_error;
          __pyx_L14_exception_handled:;
          __Pyx_XGIVEREF(__pyx_t_11);
          __Pyx_XGIVEREF(__pyx_t_12);
          __Pyx_XGIVEREF(__pyx_t_13);
          __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
          __pyx_L18_try_end:;
        }
      }
      /*finally:*/ {
        /*normal exit:*/{
          if (__pyx_t_10) {
            __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__12, NULL);
            __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
            if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2146, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_13);
            __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
          }
          goto __pyx_L12;
        }
        __pyx_L12:;
      }
      goto __pyx_L31;
      __pyx_L9_error:;
      __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
      goto __pyx_L1_error;
      __pyx_L31:;
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2144
 *                 return False
 * 
 *         if multi_thread:             # <<<<<<<<<<<<<<
 *             #
 *             with ThreadPoolExecutor(max_workers=workers) as executor:
 */
    goto __pyx_L8;
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2162
 *         else:
 *             #
 *             start_time = time.time()             # <<<<<<<<<<<<<<
 *             for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, total=future_code_name_df.shape[0]):  #
 *                 future_code = row['symbol']
 */
  /*else*/ {
    __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2162, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __pyx_t_9 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
      __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2162, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    }
    __pyx_v_start_time = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2163
 *             #
 *             start_time = time.time()
 *             for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, total=future_code_name_df.shape[0]):  #             # <<<<<<<<<<<<<<
 *                 future_code = row['symbol']
 *                 future_name = row['name']
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_code_name_df, __pyx_n_s_iterrows); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __pyx_t_2 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_9))) {
      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
      if (likely(__pyx_t_2)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_2);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_9, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    }
    __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_3);
    if (__Pyx_PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_desc, __pyx_v_fun_name) < 0) __PYX_ERR(0, 2163, __pyx_L1_error)
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_future_code_name_df, __pyx_n_s_shape); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_total, __pyx_t_15) < 0) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2163, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_15);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (likely(PyList_CheckExact(__pyx_t_15)) || PyTuple_CheckExact(__pyx_t_15)) {
      __pyx_t_3 = __pyx_t_15; __Pyx_INCREF(__pyx_t_3);
      __pyx_t_7 = 0;
      __pyx_t_14 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2163, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_14 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2163, __pyx_L1_error)
    }
    __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
    for (;;) {
      if (likely(!__pyx_t_14)) {
        if (likely(PyList_CheckExact(__pyx_t_3))) {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2163, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_15 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_15); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2163, __pyx_L1_error)
          #else
          __pyx_t_15 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2163, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          #endif
        } else {
          {
            Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_3);
            #if !CYTHON_ASSUME_SAFE_MACROS
            if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 2163, __pyx_L1_error)
            #endif
            if (__pyx_t_7 >= __pyx_temp) break;
          }
          #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
          __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_15); __pyx_t_7++; if (unlikely((0 < 0))) __PYX_ERR(0, 2163, __pyx_L1_error)
          #else
          __pyx_t_15 = __Pyx_PySequence_ITEM(__pyx_t_3, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2163, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_15);
          #endif
        }
      } else {
        __pyx_t_15 = __pyx_t_14(__pyx_t_3);
        if (unlikely(!__pyx_t_15)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else __PYX_ERR(0, 2163, __pyx_L1_error)
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_15);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_15))) || (PyList_CheckExact(__pyx_t_15))) {
        PyObject* sequence = __pyx_t_15;
        Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
        if (unlikely(size != 2)) {
          if (size > 2) __Pyx_RaiseTooManyValuesError(2);
          else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
          __PYX_ERR(0, 2163, __pyx_L1_error)
        }
        #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        if (likely(PyTuple_CheckExact(sequence))) {
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          __pyx_t_9 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_1 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(__pyx_t_1);
        #else
        __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        #endif
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_2 = PyObject_GetIter(__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_16 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_2);
        index = 0; __pyx_t_9 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L34_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        index = 1; __pyx_t_1 = __pyx_t_16(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L34_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2163, __pyx_L1_error)
        __pyx_t_16 = NULL;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        goto __pyx_L35_unpacking_done;
        __pyx_L34_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __pyx_t_16 = NULL;
        if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
        __PYX_ERR(0, 2163, __pyx_L1_error)
        __pyx_L35_unpacking_done:;
      }
      __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_9);
      __pyx_t_9 = 0;
      __Pyx_XDECREF_SET(__pyx_v_row, __pyx_t_1);
      __pyx_t_1 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2164
 *             start_time = time.time()
 *             for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, total=future_code_name_df.shape[0]):  #
 *                 future_code = row['symbol']             # <<<<<<<<<<<<<<
 *                 future_name = row['name']
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)
 */
      __pyx_t_15 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_symbol); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2164, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_XDECREF_SET(__pyx_v_future_code, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2165
 *             for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, total=future_code_name_df.shape[0]):  #
 *                 future_code = row['symbol']
 *                 future_name = row['name']             # <<<<<<<<<<<<<<
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)
 *                 current_time = time.time()
 */
      __pyx_t_15 = __Pyx_PyObject_Dict_GetItem(__pyx_v_row, __pyx_n_s_name); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2165, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_XDECREF_SET(__pyx_v_future_name, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2166
 *                 future_code = row['symbol']
 *                 future_name = row['name']
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)             # <<<<<<<<<<<<<<
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 */
      if (!(likely(PyString_CheckExact(__pyx_v_future_code))||((__pyx_v_future_code) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_future_code))) __PYX_ERR(0, 2166, __pyx_L1_error)
      if (!(likely(PyString_CheckExact(__pyx_v_future_name))||((__pyx_v_future_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("str", __pyx_v_future_name))) __PYX_ERR(0, 2166, __pyx_L1_error)
      if (!(likely(PyDict_CheckExact(__pyx_v_update_dict))||((__pyx_v_update_dict) == Py_None) || __Pyx_RaiseUnexpectedTypeError("dict", __pyx_v_update_dict))) __PYX_ERR(0, 2166, __pyx_L1_error)
      __pyx_t_15 = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateFutureTradeDayToMysql_updateSingleFutureTradeDayInfo(__pyx_v_updateSingleFutureTradeDayInfo, ((PyObject*)__pyx_v_future_code), ((PyObject*)__pyx_v_future_name), ((PyObject*)__pyx_v_update_dict)); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2166, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2167
 *                 future_name = row['name']
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)
 *                 current_time = time.time()             # <<<<<<<<<<<<<<
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 */
      __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_time); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2167, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_1 = NULL;
      __pyx_t_4 = 0;
      #if CYTHON_UNPACK_METHODS
      if (unlikely(PyMethod_Check(__pyx_t_9))) {
        __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
        if (likely(__pyx_t_1)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
          __Pyx_INCREF(__pyx_t_1);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_9, function);
          __pyx_t_4 = 1;
        }
      }
      #endif
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
        __pyx_t_15 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
        __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
        if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2167, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      }
      __Pyx_XDECREF_SET(__pyx_v_current_time, __pyx_t_15);
      __pyx_t_15 = 0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2168
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      __pyx_t_15 = PyNumber_Subtract(__pyx_v_current_time, __pyx_v_start_time); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2168, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_9);
      __pyx_t_1 = PyObject_RichCompare(__pyx_t_15, __pyx_t_9, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2168, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2168, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (__pyx_t_6) {

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2169
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 */
        __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2169, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        if (unlikely((PyObject_SetItem(__pyx_t_1, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 2169, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2170
 *                 if current_time - start_time >= self.dump_json_period:
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 *                     start_time = current_time
 *         if no_fault:
 */
        __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2170, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_9);
        __pyx_t_15 = NULL;
        __pyx_t_4 = 0;
        #if CYTHON_UNPACK_METHODS
        if (likely(PyMethod_Check(__pyx_t_9))) {
          __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_9);
          if (likely(__pyx_t_15)) {
            PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
            __Pyx_INCREF(__pyx_t_15);
            __Pyx_INCREF(function);
            __Pyx_DECREF_SET(__pyx_t_9, function);
            __pyx_t_4 = 1;
          }
        }
        #endif
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_15, NULL};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_9, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
          __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2170, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
          __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
        }
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2171
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 *                     start_time = current_time             # <<<<<<<<<<<<<<
 *         if no_fault:
 *             update_dict['updated'] = True
 */
        __Pyx_INCREF(__pyx_v_current_time);
        __Pyx_DECREF_SET(__pyx_v_start_time, __pyx_v_current_time);

        /* "tbstock/dataAcquisition/saveDataToMysql.py":2168
 *                 updateSingleFutureTradeDayInfo(future_code, future_name, update_dict)
 *                 current_time = time.time()
 *                 if current_time - start_time >= self.dump_json_period:             # <<<<<<<<<<<<<<
 *                     self.update_json[table_name] = update_dict
 *                     self.dumpJsonToFile()
 */
      }

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2163
 *             #
 *             start_time = time.time()
 *             for index, row in tqdm(future_code_name_df.iterrows(), desc=fun_name, total=future_code_name_df.shape[0]):  #             # <<<<<<<<<<<<<<
 *                 future_code = row['symbol']
 *                 future_name = row['name']
 */
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L8:;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2172
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  if (__pyx_cur_scope->__pyx_v_no_fault) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2173
 *                     start_time = current_time
 *         if no_fault:
 *             update_dict['updated'] = True             # <<<<<<<<<<<<<<
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()
 */
    if (unlikely((PyObject_SetItem(__pyx_v_update_dict, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2173, __pyx_L1_error)

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2172
 *                     self.dumpJsonToFile()
 *                     start_time = current_time
 *         if no_fault:             # <<<<<<<<<<<<<<
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2174
 *         if no_fault:
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict             # <<<<<<<<<<<<<<
 *         self.dumpJsonToFile()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_table_name, __pyx_v_update_dict) < 0))) __PYX_ERR(0, 2174, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2175
 *             update_dict['updated'] = True
 *         self.update_json[table_name] = update_dict
 *         self.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2175, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_9)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_9);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_9, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2175, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.DataToMysql.updateFutureTradeDayToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_fun_name);
  __Pyx_XDECREF(__pyx_v_exclude_future_list);
  __Pyx_XDECREF(__pyx_v_updated_list);
  __Pyx_XDECREF(__pyx_v_update_dict);
  __Pyx_XDECREF(__pyx_v_future_code_name_df);
  __Pyx_XDECREF(__pyx_v_updateSingleFutureTradeDayInfo);
  __Pyx_XDECREF(__pyx_v_executor);
  __Pyx_XDECREF(__pyx_v_futures);
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_index);
  __Pyx_XDECREF(__pyx_v_row);
  __Pyx_XDECREF(__pyx_v_future_code);
  __Pyx_XDECREF(__pyx_v_future_name);
  __Pyx_XDECREF(__pyx_v_future);
  __Pyx_XDECREF(__pyx_v_current_time);
  __Pyx_DECREF((PyObject *)__pyx_cur_scope);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2178
 * 
 * 
 * def tableTools():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_1tableTools(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_1tableTools = {"tableTools", (PyCFunction)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_1tableTools, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_1tableTools(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("tableTools (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_tableTools(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_tableTools(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_data_to_mysql = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("tableTools", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2179
 * 
 * def tableTools():
 *     data_to_mysql = DataToMysql()             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2019")
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DataToMysql_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2179, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2179, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_data_to_mysql = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2180
 * def tableTools():
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2019")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2020")  # test ok
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2180, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_trade_day_2018};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2180, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2181
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2019")             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2020")  # test ok
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2021")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2181, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_stock_trade_day_2019};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2181, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2182
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2019")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2020")  # test ok             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2021")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2022")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2182, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_trade_day_2020};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2183
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2019")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2020")  # test ok
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2021")             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2022")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2023")
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2183, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_stock_trade_day_2021};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2183, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2184
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2020")  # test ok
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2021")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2022")             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2023")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2024")
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2184, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_trade_day_2022};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2184, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2185
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2021")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2022")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2023")             # <<<<<<<<<<<<<<
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2024")
 *     # data_to_mysql.dataproc.deleteTable('stock_trade_day_2018')  #
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_n_s_stock_trade_day_2023};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2185, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2186
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2022")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2023")
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2024")             # <<<<<<<<<<<<<<
 *     # data_to_mysql.dataproc.deleteTable('stock_trade_day_2018')  #
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dataproc); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_clearTableContent); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2186, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_n_s_stock_trade_day_2024};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2186, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2178
 * 
 * 
 * def tableTools():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.tableTools", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_to_mysql);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2190
 * 
 * 
 * def test():             # <<<<<<<<<<<<<<
 *     start_time = '20240503'
 *     end_time = '20240530'
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_3test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_3test = {"test", (PyCFunction)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_3test, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_3test(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("test (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_2test(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_2test(CYTHON_UNUSED PyObject *__pyx_self) {
  CYTHON_UNUSED PyObject *__pyx_v_start_time = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_end_time = NULL;
  CYTHON_UNUSED PyObject *__pyx_v_stock_name = NULL;
  PyObject *__pyx_v_data_to_mysql = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  Py_UCS4 __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("test", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2191
 * 
 * def test():
 *     start_time = '20240503'             # <<<<<<<<<<<<<<
 *     end_time = '20240530'
 *     stock_name = '600096'
 */
  __Pyx_INCREF(__pyx_kp_s_20240503);
  __pyx_v_start_time = __pyx_kp_s_20240503;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2192
 * def test():
 *     start_time = '20240503'
 *     end_time = '20240530'             # <<<<<<<<<<<<<<
 *     stock_name = '600096'
 *     # stock_name = '000040'
 */
  __Pyx_INCREF(__pyx_kp_s_20240530);
  __pyx_v_end_time = __pyx_kp_s_20240530;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2193
 *     start_time = '20240503'
 *     end_time = '20240530'
 *     stock_name = '600096'             # <<<<<<<<<<<<<<
 *     # stock_name = '000040'
 *     data_to_mysql = DataToMysql()
 */
  __Pyx_INCREF(__pyx_kp_s_600096);
  __pyx_v_stock_name = __pyx_kp_s_600096;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2195
 *     stock_name = '600096'
 *     # stock_name = '000040'
 *     data_to_mysql = DataToMysql()             # <<<<<<<<<<<<<<
 *     start = time.time()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DataToMysql_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2195, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2195, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_data_to_mysql = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2196
 *     # stock_name = '000040'
 *     data_to_mysql = DataToMysql()
 *     start = time.time()             # <<<<<<<<<<<<<<
 * 
 *     # res, df = data_to_mysql.getFqFactorByDividend()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2196, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2196, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2240
 *     ## 6 stock_basic_info
 *     # data_to_mysql.updateStockBasicInfoToMysql(multi_thread=True, workers=12)
 *     data_to_mysql.updateStockBasicInfoByIndustryConcept(multi_type='thread', workers=12)             # <<<<<<<<<<<<<<
 * 
 *     # data_to_mysql.updateStockFqFactorToMysql(multi_type='thread', workers=12)
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockBasicInfoByIndustryCo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_multi_type, __pyx_n_s_thread) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2240, __pyx_L1_error)
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2240, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2256
 *     # data_to_mysql.updateStockRzrqHsgtTradeDayToMysql('hsgt', multi_thread=True, workers=12)
 * 
 *     end = time.time()             # <<<<<<<<<<<<<<
 *     print(f"time cost = {end - start} s.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2256, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2256, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_end = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2257
 * 
 *     end = time.time()
 *     print(f"time cost = {end - start} s.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_5 = 0;
  __pyx_t_6 = 127;
  __Pyx_INCREF(__pyx_kp_u_time_cost);
  __pyx_t_5 += 12;
  __Pyx_GIVEREF(__pyx_kp_u_time_cost);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u_time_cost);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_6) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_6;
  __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
  __pyx_t_3 = 0;
  __Pyx_INCREF(__pyx_kp_u_s);
  __pyx_t_5 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_s);
  PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_kp_u_s);
  __pyx_t_3 = __Pyx_PyUnicode_Join(__pyx_t_2, 3, __pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2257, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2190
 * 
 * 
 * def test():             # <<<<<<<<<<<<<<
 *     start_time = '20240503'
 *     end_time = '20240530'
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.test", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_start_time);
  __Pyx_XDECREF(__pyx_v_end_time);
  __Pyx_XDECREF(__pyx_v_stock_name);
  __Pyx_XDECREF(__pyx_v_data_to_mysql);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "tbstock/dataAcquisition/saveDataToMysql.py":2260
 * 
 * 
 * def updateStockTables():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     start = time.time()
 */

/* Python wrapper */
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_5updateStockTables(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyMethodDef __pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_5updateStockTables = {"updateStockTables", (PyCFunction)__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_5updateStockTables, METH_NOARGS, 0};
static PyObject *__pyx_pw_7tbstock_15dataAcquisition_15saveDataToMysql_5updateStockTables(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
  CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("updateStockTables (wrapper)", 0);
  __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
  __pyx_r = __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_4updateStockTables(__pyx_self);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_4updateStockTables(CYTHON_UNUSED PyObject *__pyx_self) {
  PyObject *__pyx_v_data_to_mysql = NULL;
  PyObject *__pyx_v_start = NULL;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_v_end = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  unsigned int __pyx_t_4;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_UCS4 __pyx_t_9;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("updateStockTables", 1);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2261
 * 
 * def updateStockTables():
 *     data_to_mysql = DataToMysql()             # <<<<<<<<<<<<<<
 *     start = time.time()
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_DataToMysql_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2261, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2261, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __pyx_v_data_to_mysql = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2262
 * def updateStockTables():
 *     data_to_mysql = DataToMysql()
 *     start = time.time()             # <<<<<<<<<<<<<<
 * 
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2262, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_3))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_3, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2262, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_v_start = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2264
 *     start = time.time()
 * 
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:             # <<<<<<<<<<<<<<
 *         res = utils.updateLib()
 *         if not res:
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_n_s_updateLib, __pyx_t_1, Py_NE)); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!__pyx_t_6) {
  } else {
    __pyx_t_5 = __pyx_t_6;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_update_json); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_s_updateLib); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 2264, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_7 = (!__pyx_t_6);
  __pyx_t_5 = __pyx_t_7;
  __pyx_L4_bool_binop_done:;
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2265
 * 
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:
 *         res = utils.updateLib()             # <<<<<<<<<<<<<<
 *         if not res:
 *             return
 */
    __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_updateLib); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2265, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (unlikely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2265, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __pyx_v_res = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2266
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:
 *         res = utils.updateLib()
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 *         data_to_mysql.update_json['updateLib'] = True
 */
    __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 2266, __pyx_L1_error)
    __pyx_t_7 = (!__pyx_t_5);
    if (__pyx_t_7) {

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2267
 *         res = utils.updateLib()
 *         if not res:
 *             return             # <<<<<<<<<<<<<<
 *         data_to_mysql.update_json['updateLib'] = True
 *         data_to_mysql.dumpJsonToFile()
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_r = Py_None; __Pyx_INCREF(Py_None);
      goto __pyx_L0;

      /* "tbstock/dataAcquisition/saveDataToMysql.py":2266
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:
 *         res = utils.updateLib()
 *         if not res:             # <<<<<<<<<<<<<<
 *             return
 *         data_to_mysql.update_json['updateLib'] = True
 */
    }

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2268
 *         if not res:
 *             return
 *         data_to_mysql.update_json['updateLib'] = True             # <<<<<<<<<<<<<<
 *         data_to_mysql.dumpJsonToFile()
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2268, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_n_s_updateLib, Py_True) < 0))) __PYX_ERR(0, 2268, __pyx_L1_error)
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2269
 *             return
 *         data_to_mysql.update_json['updateLib'] = True
 *         data_to_mysql.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     ## 1 stock_simple_info
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2269, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = NULL;
    __pyx_t_4 = 0;
    #if CYTHON_UNPACK_METHODS
    if (likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_1)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
        __pyx_t_4 = 1;
      }
    }
    #endif
    {
      PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
      __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2269, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2264
 *     start = time.time()
 * 
 *     if 'updateLib' not in data_to_mysql.update_json or not data_to_mysql.update_json['updateLib']:             # <<<<<<<<<<<<<<
 *         res = utils.updateLib()
 *         if not res:
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2272
 * 
 *     ## 1 stock_simple_info
 *     res = data_to_mysql.updateStockSimpleInfoToMysql()             # <<<<<<<<<<<<<<
 *     if not res:
 *         return
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockSimpleInfoToMysql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2272, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_3);
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2273
 *     ## 1 stock_simple_info
 *     res = data_to_mysql.updateStockSimpleInfoToMysql()
 *     if not res:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_res); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 2273, __pyx_L1_error)
  __pyx_t_5 = (!__pyx_t_7);
  if (__pyx_t_5) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2274
 *     res = data_to_mysql.updateStockSimpleInfoToMysql()
 *     if not res:
 *         return             # <<<<<<<<<<<<<<
 * 
 *     ## 2 stock_fq_factor  stock_dividend_info
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_r = Py_None; __Pyx_INCREF(Py_None);
    goto __pyx_L0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2273
 *     ## 1 stock_simple_info
 *     res = data_to_mysql.updateStockSimpleInfoToMysql()
 *     if not res:             # <<<<<<<<<<<<<<
 *         return
 * 
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2277
 * 
 *     ## 2 stock_fq_factor  stock_dividend_info
 *     data_to_mysql.updateStockDividendInfoToMysql(multi_type='process', workers=12)             # <<<<<<<<<<<<<<
 *     data_to_mysql.updateStockFqFactorToMysql(multi_type='thread', workers=12)  # (IP)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockDividendInfoToMysql); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_type, __pyx_n_s_process) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2277, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2278
 *     ## 2 stock_fq_factor  stock_dividend_info
 *     data_to_mysql.updateStockDividendInfoToMysql(multi_type='process', workers=12)
 *     data_to_mysql.updateStockFqFactorToMysql(multi_type='thread', workers=12)  # (IP)             # <<<<<<<<<<<<<<
 * 
 *     ## 2 stock_trade_day
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockFqFactorToMysql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_type, __pyx_n_s_thread) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2278, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2278, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2282
 *     ## 2 stock_trade_day
 *     # data_to_mysql.updateStockTradeDayInfo(method='sina', multi_thread=True, workers=12)
 *     data_to_mysql.updateStockTradeDayInfo(method='em', multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 *     # data_to_mysql.updateStockTradeDayInfo(method='baostock', multi_thread=True, workers=12)
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockTradeDayInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_method, __pyx_n_s_em) < 0) __PYX_ERR(0, 2282, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2282, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2282, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2282, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2286
 * 
 *     ## 4 stock_industry_basic_info  stock_industry_trade_day
 *     data_to_mysql.updateStockIndustryInfo(multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 5 stock_concept_basic_info  stock_concept_trade_day
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockIndustryInfo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2286, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2286, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2286, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2289
 * 
 *     ## 5 stock_concept_basic_info  stock_concept_trade_day
 *     data_to_mysql.updateStockConceptInfo(multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 6 stock_basic_info
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockConceptInfo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2289, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2289, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2292
 * 
 *     ## 6 stock_basic_info
 *     data_to_mysql.updateStockBasicInfoToMysql(multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 *     data_to_mysql.updateStockBasicInfoByIndustryConcept(multi_type='thread', workers=12)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockBasicInfoToMysql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2292, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2292, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2292, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2293
 *     ## 6 stock_basic_info
 *     data_to_mysql.updateStockBasicInfoToMysql(multi_thread=True, workers=12)
 *     data_to_mysql.updateStockBasicInfoByIndustryConcept(multi_type='thread', workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 7 stock_financial_report  stock_financial_quarter
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockBasicInfoByIndustryCo); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_type, __pyx_n_s_thread) < 0) __PYX_ERR(0, 2293, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2293, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2293, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2296
 * 
 *     ## 7 stock_financial_report  stock_financial_quarter
 *     data_to_mysql.updateStockFinancialToMysql(mode='report', multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 *     data_to_mysql.updateStockFinancialToMysql(mode='quarter', multi_thread=True, workers=12)
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockFinancialToMysql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_report) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2296, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2297
 *     ## 7 stock_financial_report  stock_financial_quarter
 *     data_to_mysql.updateStockFinancialToMysql(mode='report', multi_thread=True, workers=12)
 *     data_to_mysql.updateStockFinancialToMysql(mode='quarter', multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 8 : stock_hold_number
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockFinancialToMysql); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_s_quarter) < 0) __PYX_ERR(0, 2297, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2297, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2297, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2300
 * 
 *     ## 8 : stock_hold_number
 *     data_to_mysql.updateStockHoldNumberToMysql(multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 9 rzrq_trade_day  stock_rzrq_trade_day
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockHoldNumberToMysql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2300, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2300, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2303
 * 
 *     ## 9 rzrq_trade_day  stock_rzrq_trade_day
 *     data_to_mysql.updateRzrqHsgtTradeDayToMysql('rzrq')             # <<<<<<<<<<<<<<
 *     data_to_mysql.updateStockRzrqHsgtTradeDayToMysql(concept='rzrq', multi_thread=True, workers=10)
 * 
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateRzrqHsgtTradeDayToMysql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, __pyx_n_s_rzrq};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2303, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2304
 *     ## 9 rzrq_trade_day  stock_rzrq_trade_day
 *     data_to_mysql.updateRzrqHsgtTradeDayToMysql('rzrq')
 *     data_to_mysql.updateStockRzrqHsgtTradeDayToMysql(concept='rzrq', multi_thread=True, workers=10)             # <<<<<<<<<<<<<<
 * 
 *     ## 10 hstg_trade_day  stock_hsgt_trade_day
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateStockRzrqHsgtTradeDayToMys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_concept, __pyx_n_s_rzrq) < 0) __PYX_ERR(0, 2304, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2304, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_10) < 0) __PYX_ERR(0, 2304, __pyx_L1_error)
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2304, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2311
 * 
 *     ## 11 : index_trade_day
 *     data_to_mysql.updateIndexTradeDayToMysql()             # <<<<<<<<<<<<<<
 * 
 *     ## 12 : future_trade_day
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateIndexTradeDayToMysql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2311, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_3)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_3);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
    __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2311, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2314
 * 
 *     ## 12 : future_trade_day
 *     data_to_mysql.updateFutureTradeDayToMysql(multi_thread=True, workers=12)             # <<<<<<<<<<<<<<
 * 
 *     ## 13 : kzz_basic_info
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateFutureTradeDayToMysql); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_multi_thread, Py_True) < 0) __PYX_ERR(0, 2314, __pyx_L1_error)
  if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_workers, __pyx_int_12) < 0) __PYX_ERR(0, 2314, __pyx_L1_error)
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2314, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2317
 * 
 *     ## 13 : kzz_basic_info
 *     data_to_mysql.updateKzzBasicInfoToMysql()             # <<<<<<<<<<<<<<
 * 
 *     data_to_mysql.update_json['updated'] = True
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_updateKzzBasicInfoToMysql); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2317, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2319
 *     data_to_mysql.updateKzzBasicInfoToMysql()
 * 
 *     data_to_mysql.update_json['updated'] = True             # <<<<<<<<<<<<<<
 *     data_to_mysql.dumpJsonToFile()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_update_json); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (unlikely((PyObject_SetItem(__pyx_t_3, __pyx_n_s_updated, Py_True) < 0))) __PYX_ERR(0, 2319, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2320
 * 
 *     data_to_mysql.update_json['updated'] = True
 *     data_to_mysql.dumpJsonToFile()             # <<<<<<<<<<<<<<
 * 
 *     end = time.time()
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_data_to_mysql, __pyx_n_s_dumpJsonToFile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2320, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (likely(PyMethod_Check(__pyx_t_2))) {
    __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
    if (likely(__pyx_t_1)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_2, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2320, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2322
 *     data_to_mysql.dumpJsonToFile()
 * 
 *     end = time.time()             # <<<<<<<<<<<<<<
 *     print(f"updateStockTables time cost = {end - start} s.")
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_time); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = NULL;
  __pyx_t_4 = 0;
  #if CYTHON_UNPACK_METHODS
  if (unlikely(PyMethod_Check(__pyx_t_1))) {
    __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
    if (likely(__pyx_t_2)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_2);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_1, function);
      __pyx_t_4 = 1;
    }
  }
  #endif
  {
    PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
    __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2322, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __pyx_v_end = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2323
 * 
 *     end = time.time()
 *     print(f"updateStockTables time cost = {end - start} s.")             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = 0;
  __pyx_t_9 = 127;
  __Pyx_INCREF(__pyx_kp_u_updateStockTables_time_cost);
  __pyx_t_8 += 30;
  __Pyx_GIVEREF(__pyx_kp_u_updateStockTables_time_cost);
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_updateStockTables_time_cost);
  __pyx_t_1 = PyNumber_Subtract(__pyx_v_end, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_PyObject_FormatSimple(__pyx_t_1, __pyx_empty_unicode); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_9 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_9) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_9;
  __pyx_t_8 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
  __pyx_t_2 = 0;
  __Pyx_INCREF(__pyx_kp_u_s);
  __pyx_t_8 += 3;
  __Pyx_GIVEREF(__pyx_kp_u_s);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_s);
  __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_3, 3, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2323, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2260
 * 
 * 
 * def updateStockTables():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     start = time.time()
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("tbstock.dataAcquisition.saveDataToMysql.updateStockTables", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_data_to_mysql);
  __Pyx_XDECREF(__pyx_v_start);
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XDECREF(__pyx_v_end);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_table_columns);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_table_columns) {
    e = (*v)(p->__pyx_v_table_columns, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_columns);
  p->__pyx_v_table_columns = ((PyObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct__updateStockBasicInfoToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct__updateStockBasicInfoToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_method);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_table_base_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)o;
  if (p->__pyx_v_method) {
    e = (*v)(p->__pyx_v_method, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_table_base_name) {
    e = (*v)(p->__pyx_v_table_base_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo *)o;
  tmp = ((PyObject*)p->__pyx_v_method);
  p->__pyx_v_method = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_base_name);
  p->__pyx_v_table_base_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_1_updateStockTradeDayInfo",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_1_updateStockTradeDayInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_mode);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)o;
  if (p->__pyx_v_mode) {
    e = (*v)(p->__pyx_v_mode, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo *)o;
  tmp = ((PyObject*)p->__pyx_v_mode);
  p->__pyx_v_mode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_2_updateStockIndustryConceptBasicInfo",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_2_updateStockIndustryConceptBasicInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_mode);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_stock_industry_concept_basic_info);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_mode) {
    e = (*v)(p->__pyx_v_mode, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_stock_industry_concept_basic_info) {
    e = (*v)(p->__pyx_v_stock_industry_concept_basic_info, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_mode);
  p->__pyx_v_mode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_stock_industry_concept_basic_info);
  p->__pyx_v_stock_industry_concept_basic_info = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_mode);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_mode) {
    e = (*v)(p->__pyx_v_mode, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_mode);
  p->__pyx_v_mode = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_4_updateStockFinancialToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_4_updateStockFinancialToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_5_updateStockHoldNumberToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_5_updateStockHoldNumberToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_concept);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_start_date);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)o;
  if (p->__pyx_v_concept) {
    e = (*v)(p->__pyx_v_concept, a); if (e) return e;
  }
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_start_date) {
    e = (*v)(p->__pyx_v_start_date, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_concept);
  p->__pyx_v_concept = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_start_date);
  p->__pyx_v_start_date = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_7_updateIndexTradeDayToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_7_updateIndexTradeDayToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

#if CYTHON_USE_FREELISTS
static struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql[8];
static int __pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql = 0;
#endif

static PyObject *__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  #if CYTHON_COMPILING_IN_LIMITED_API
  allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
  o = alloc_func(t, 0);
  #else
  #if CYTHON_USE_FREELISTS
  if (likely((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql > 0) & (int)(t->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql)))) {
    o = (PyObject*)__pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql[--__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql];
    memset(o, 0, sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else
  #endif
  {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  #endif
  return o;
}

static void __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(PyObject *o) {
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)o;
  #if CYTHON_USE_TP_FINALIZE
  if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
    if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql) {
      if (PyObject_CallFinalizerFromDealloc(o)) return;
    }
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_dtype_mapping);
  Py_CLEAR(p->__pyx_v_self);
  Py_CLEAR(p->__pyx_v_table_name);
  #if CYTHON_USE_FREELISTS
  if (((int)(__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql < 8) & (int)(Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql)))) {
    __pyx_freelist_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql[__pyx_freecount_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql++] = ((struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)o);
  } else
  #endif
  {
    #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
    (*Py_TYPE(o)->tp_free)(o);
    #else
    {
      freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
      if (tp_free) tp_free(o);
    }
    #endif
  }
}

static int __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)o;
  if (p->__pyx_v_dtype_mapping) {
    e = (*v)(p->__pyx_v_dtype_mapping, a); if (e) return e;
  }
  if (p->__pyx_v_self) {
    e = (*v)(p->__pyx_v_self, a); if (e) return e;
  }
  if (p->__pyx_v_table_name) {
    e = (*v)(p->__pyx_v_table_name, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *p = (struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql *)o;
  tmp = ((PyObject*)p->__pyx_v_dtype_mapping);
  p->__pyx_v_dtype_mapping = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->__pyx_v_table_name);
  p->__pyx_v_table_name = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql_slots[] = {
  {Py_tp_dealloc, (void *)__pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql},
  {Py_tp_traverse, (void *)__pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql},
  {Py_tp_clear, (void *)__pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql},
  {Py_tp_new, (void *)__pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql},
  {0, 0},
};
static PyType_Spec __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql_spec = {
  "tbstock.dataAcquisition.saveDataToMysql.__pyx_scope_struct_8_updateFutureTradeDayToMysql",
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql),
  0,
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE,
  __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql_slots,
};
#else

static PyTypeObject __pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql = {
  PyVarObject_HEAD_INIT(0, 0)
  "tbstock.dataAcquisition.saveDataToMysql.""__pyx_scope_struct_8_updateFutureTradeDayToMysql", /*tp_name*/
  sizeof(struct __pyx_obj_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql, /*tp_dealloc*/
  #if PY_VERSION_HEX < 0x030800b4
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030800b4
  0, /*tp_vectorcall_offset*/
  #endif
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC|Py_TPFLAGS_HAVE_FINALIZE, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql, /*tp_traverse*/
  __pyx_tp_clear_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  #if !CYTHON_USE_TYPE_SPECS
  0, /*tp_dictoffset*/
  #endif
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  #if CYTHON_USE_TP_FINALIZE
  0, /*tp_finalize*/
  #else
  NULL, /*tp_finalize*/
  #endif
  #endif
  #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
  0, /*tp_vectorcall*/
  #endif
  #if __PYX_NEED_TP_PRINT_SLOT == 1
  0, /*tp_print*/
  #endif
  #if PY_VERSION_HEX >= 0x030C0000
  0, /*tp_watched*/
  #endif
  #if PY_VERSION_HEX >= 0x030d00A4
  0, /*tp_versions_used*/
  #endif
  #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
  0, /*tp_pypy_flags*/
  #endif
};
#endif

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

static int __pyx_import_star_set(PyObject *o, PyObject* py_name, char *name) {
  static const char* internal_type_names[] = {
    "__pyx_ctuple_long",
    "__pyx_ctuple_long__and_long__and_long",
    "__pyx_ctuple_long__and_long__and_long_struct",
    "__pyx_ctuple_long_struct",
    "__pyx_scope_struct_1_updateStockTradeDayInfo",
    "__pyx_scope_struct_2_updateStockIndustryConceptBasicInfo",
    "__pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo",
    "__pyx_scope_struct_4_updateStockFinancialToMysql",
    "__pyx_scope_struct_5_updateStockHoldNumberToMysql",
    "__pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql",
    "__pyx_scope_struct_7_updateIndexTradeDayToMysql",
    "__pyx_scope_struct_8_updateFutureTradeDayToMysql",
    "__pyx_scope_struct__updateStockBasicInfoToMysql",
    0
  };
  const char** type_name = internal_type_names;
  while (*type_name) {
    if (__Pyx_StrEq(name, *type_name)) {
      PyErr_Format(PyExc_TypeError, "Cannot overwrite C type %s", name);
      goto bad;
    }
    type_name++;
  }
  if (0);
  else {
    if (PyObject_SetAttr(__pyx_m, py_name, o) < 0) goto bad;
  }
  return 0;
  bad:
  return -1;
}

static int
__Pyx_import_all_from(PyObject *locals, PyObject *v)
{
    PyObject *all = PyObject_GetAttrString(v, "__all__");
    PyObject *dict, *name, *value;
    int skip_leading_underscores = 0;
    int pos, err;
    if (all == NULL) {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError))
            return -1;
        PyErr_Clear();
        dict = PyObject_GetAttrString(v, "__dict__");
        if (dict == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError))
                return -1;
            PyErr_SetString(PyExc_ImportError,
            "from-import-* object has no __dict__ and no __all__");
            return -1;
        }
#if PY_MAJOR_VERSION < 3
        all = PyObject_CallMethod(dict, (char *)"keys", NULL);
#else
        all = PyMapping_Keys(dict);
#endif
        Py_DECREF(dict);
        if (all == NULL)
            return -1;
        skip_leading_underscores = 1;
    }
    for (pos = 0, err = 0; ; pos++) {
        name = PySequence_GetItem(all, pos);
        if (name == NULL) {
            if (!PyErr_ExceptionMatches(PyExc_IndexError))
                err = -1;
            else
                PyErr_Clear();
            break;
        }
        if (skip_leading_underscores &&
#if PY_MAJOR_VERSION < 3
            likely(PyString_Check(name)) &&
            PyString_AS_STRING(name)[0] == '_')
#else
            likely(PyUnicode_Check(name)) &&
            likely(__Pyx_PyUnicode_GET_LENGTH(name)) &&
            __Pyx_PyUnicode_READ_CHAR(name, 0) == '_')
#endif
        {
            Py_DECREF(name);
            continue;
        }
        value = PyObject_GetAttr(v, name);
        if (value == NULL)
            err = -1;
        else if (PyDict_CheckExact(locals))
            err = PyDict_SetItem(locals, name, value);
        else
            err = PyObject_SetItem(locals, name, value);
        Py_DECREF(name);
        Py_XDECREF(value);
        if (err != 0)
            break;
    }
    Py_DECREF(all);
    return err;
}
static int __pyx_import_star(PyObject* m) {
    int i;
    int ret = -1;
    char* s;
    PyObject *locals = 0;
    PyObject *list = 0;
#if PY_MAJOR_VERSION >= 3
    PyObject *utf8_name = 0;
#endif
    PyObject *name;
    PyObject *item;
    locals = PyDict_New();              if (!locals) goto bad;
    if (__Pyx_import_all_from(locals, m) < 0) goto bad;
    list = PyDict_Items(locals);        if (!list) goto bad;
    for(i=0; i<PyList_GET_SIZE(list); i++) {
        name = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 0);
        item = PyTuple_GET_ITEM(PyList_GET_ITEM(list, i), 1);
#if PY_MAJOR_VERSION >= 3
        utf8_name = PyUnicode_AsUTF8String(name);
        if (!utf8_name) goto bad;
        s = PyBytes_AS_STRING(utf8_name);
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
        Py_DECREF(utf8_name); utf8_name = 0;
#else
        s = PyString_AsString(name);
        if (!s) goto bad;
        if (__pyx_import_star_set(item, name, s) < 0) goto bad;
#endif
    }
    ret = 0;
bad:
    Py_XDECREF(locals);
    Py_XDECREF(list);
#if PY_MAJOR_VERSION >= 3
    Py_XDECREF(utf8_name);
#endif
    return ret;
}


#ifndef CYTHON_SMALL_CODE
#if defined(__clang__)
    #define CYTHON_SMALL_CODE
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
    #define CYTHON_SMALL_CODE __attribute__((cold))
#else
    #define CYTHON_SMALL_CODE
#endif
#endif
/* #### Code section: pystring_table ### */

static int __Pyx_CreateStringTabAndInitStrings(void) {
  __Pyx_StringTabEntry __pyx_string_tab[] = {
    {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
    {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
    {&__pyx_kp_s_20180101, __pyx_k_20180101, sizeof(__pyx_k_20180101), 0, 0, 1, 0},
    {&__pyx_kp_s_20240503, __pyx_k_20240503, sizeof(__pyx_k_20240503), 0, 0, 1, 0},
    {&__pyx_kp_s_20240530, __pyx_k_20240530, sizeof(__pyx_k_20240530), 0, 0, 1, 0},
    {&__pyx_kp_s_20241230, __pyx_k_20241230, sizeof(__pyx_k_20241230), 0, 0, 1, 0},
    {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
    {&__pyx_kp_s_300416, __pyx_k_300416, sizeof(__pyx_k_300416), 0, 0, 1, 0},
    {&__pyx_kp_s_600096, __pyx_k_600096, sizeof(__pyx_k_600096), 0, 0, 1, 0},
    {&__pyx_kp_s_689009, __pyx_k_689009, sizeof(__pyx_k_689009), 0, 0, 1, 0},
    {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1},
    {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1},
    {&__pyx_kp_u_Beginning, __pyx_k_Beginning, sizeof(__pyx_k_Beginning), 0, 1, 0, 0},
    {&__pyx_kp_u_Call_ak_stock_zh_a_daily_datafra, __pyx_k_Call_ak_stock_zh_a_daily_datafra, sizeof(__pyx_k_Call_ak_stock_zh_a_daily_datafra), 0, 1, 0, 0},
    {&__pyx_kp_u_Call_bs_query_history_k_data_plu, __pyx_k_Call_bs_query_history_k_data_plu, sizeof(__pyx_k_Call_bs_query_history_k_data_plu), 0, 1, 0, 0},
    {&__pyx_n_s_DataFrame, __pyx_k_DataFrame, sizeof(__pyx_k_DataFrame), 0, 0, 1, 1},
    {&__pyx_kp_u_DataFrame_result_day_data_is_emp, __pyx_k_DataFrame_result_day_data_is_emp, sizeof(__pyx_k_DataFrame_result_day_data_is_emp), 0, 1, 0, 0},
    {&__pyx_kp_s_DataToMysql, __pyx_k_DataToMysql, sizeof(__pyx_k_DataToMysql), 0, 0, 1, 0},
    {&__pyx_n_s_DataToMysql_2, __pyx_k_DataToMysql_2, sizeof(__pyx_k_DataToMysql_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql___init, __pyx_k_DataToMysql___init, sizeof(__pyx_k_DataToMysql___init), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_dumpJsonToFile, __pyx_k_DataToMysql_dumpJsonToFile, sizeof(__pyx_k_DataToMysql_dumpJsonToFile), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_fixTradeDayNullValue, __pyx_k_DataToMysql_fixTradeDayNullValue, sizeof(__pyx_k_DataToMysql_fixTradeDayNullValue), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_func_concept, __pyx_k_DataToMysql_func_concept, sizeof(__pyx_k_DataToMysql_func_concept), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_func_industry, __pyx_k_DataToMysql_func_industry, sizeof(__pyx_k_DataToMysql_func_industry), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_getFqFactorByDividen, __pyx_k_DataToMysql_getFqFactorByDividen, sizeof(__pyx_k_DataToMysql_getFqFactorByDividen), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_getSuspendedStocks, __pyx_k_DataToMysql_getSuspendedStocks, sizeof(__pyx_k_DataToMysql_getSuspendedStocks), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_saveHistTradeDayInfo, __pyx_k_DataToMysql_saveHistTradeDayInfo, sizeof(__pyx_k_DataToMysql_saveHistTradeDayInfo), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_saveHistTradeDayInfo_2, __pyx_k_DataToMysql_saveHistTradeDayInfo_2, sizeof(__pyx_k_DataToMysql_saveHistTradeDayInfo_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_saveHistTradeDayInfo_3, __pyx_k_DataToMysql_saveHistTradeDayInfo_3, sizeof(__pyx_k_DataToMysql_saveHistTradeDayInfo_3), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateFutureTradeDay, __pyx_k_DataToMysql_updateFutureTradeDay, sizeof(__pyx_k_DataToMysql_updateFutureTradeDay), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateFutureTradeDay_2, __pyx_k_DataToMysql_updateFutureTradeDay_2, sizeof(__pyx_k_DataToMysql_updateFutureTradeDay_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateIndexTradeDayT, __pyx_k_DataToMysql_updateIndexTradeDayT, sizeof(__pyx_k_DataToMysql_updateIndexTradeDayT), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateIndexTradeDayT_2, __pyx_k_DataToMysql_updateIndexTradeDayT_2, sizeof(__pyx_k_DataToMysql_updateIndexTradeDayT_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateKzzBasicInfoTo, __pyx_k_DataToMysql_updateKzzBasicInfoTo, sizeof(__pyx_k_DataToMysql_updateKzzBasicInfoTo), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateRzrqHsgtTradeD, __pyx_k_DataToMysql_updateRzrqHsgtTradeD, sizeof(__pyx_k_DataToMysql_updateRzrqHsgtTradeD), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateSingleStockDiv, __pyx_k_DataToMysql_updateSingleStockDiv, sizeof(__pyx_k_DataToMysql_updateSingleStockDiv), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateSingleStockFqF, __pyx_k_DataToMysql_updateSingleStockFqF, sizeof(__pyx_k_DataToMysql_updateSingleStockFqF), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockBasicInfo, __pyx_k_DataToMysql_updateStockBasicInfo, sizeof(__pyx_k_DataToMysql_updateStockBasicInfo), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockBasicInfo_2, __pyx_k_DataToMysql_updateStockBasicInfo_2, sizeof(__pyx_k_DataToMysql_updateStockBasicInfo_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockBasicInfo_3, __pyx_k_DataToMysql_updateStockBasicInfo_3, sizeof(__pyx_k_DataToMysql_updateStockBasicInfo_3), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockConceptIn, __pyx_k_DataToMysql_updateStockConceptIn, sizeof(__pyx_k_DataToMysql_updateStockConceptIn), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockDividendI, __pyx_k_DataToMysql_updateStockDividendI, sizeof(__pyx_k_DataToMysql_updateStockDividendI), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockFinancial, __pyx_k_DataToMysql_updateStockFinancial, sizeof(__pyx_k_DataToMysql_updateStockFinancial), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockFinancial_2, __pyx_k_DataToMysql_updateStockFinancial_2, sizeof(__pyx_k_DataToMysql_updateStockFinancial_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockFqFactorT, __pyx_k_DataToMysql_updateStockFqFactorT, sizeof(__pyx_k_DataToMysql_updateStockFqFactorT), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockHoldNumbe, __pyx_k_DataToMysql_updateStockHoldNumbe, sizeof(__pyx_k_DataToMysql_updateStockHoldNumbe), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockHoldNumbe_2, __pyx_k_DataToMysql_updateStockHoldNumbe_2, sizeof(__pyx_k_DataToMysql_updateStockHoldNumbe_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryC, __pyx_k_DataToMysql_updateStockIndustryC, sizeof(__pyx_k_DataToMysql_updateStockIndustryC), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryC_2, __pyx_k_DataToMysql_updateStockIndustryC_2, sizeof(__pyx_k_DataToMysql_updateStockIndustryC_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryC_3, __pyx_k_DataToMysql_updateStockIndustryC_3, sizeof(__pyx_k_DataToMysql_updateStockIndustryC_3), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryC_4, __pyx_k_DataToMysql_updateStockIndustryC_4, sizeof(__pyx_k_DataToMysql_updateStockIndustryC_4), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryC_5, __pyx_k_DataToMysql_updateStockIndustryC_5, sizeof(__pyx_k_DataToMysql_updateStockIndustryC_5), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockIndustryI, __pyx_k_DataToMysql_updateStockIndustryI, sizeof(__pyx_k_DataToMysql_updateStockIndustryI), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockRzrqHsgtT, __pyx_k_DataToMysql_updateStockRzrqHsgtT, sizeof(__pyx_k_DataToMysql_updateStockRzrqHsgtT), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2, __pyx_k_DataToMysql_updateStockRzrqHsgtT_2, sizeof(__pyx_k_DataToMysql_updateStockRzrqHsgtT_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockSimpleInf, __pyx_k_DataToMysql_updateStockSimpleInf, sizeof(__pyx_k_DataToMysql_updateStockSimpleInf), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockTradeDayI, __pyx_k_DataToMysql_updateStockTradeDayI, sizeof(__pyx_k_DataToMysql_updateStockTradeDayI), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStockTradeDayI_2, __pyx_k_DataToMysql_updateStockTradeDayI_2, sizeof(__pyx_k_DataToMysql_updateStockTradeDayI_2), 0, 0, 1, 1},
    {&__pyx_n_s_DataToMysql_updateStrategyDict, __pyx_k_DataToMysql_updateStrategyDict, sizeof(__pyx_k_DataToMysql_updateStrategyDict), 0, 0, 1, 1},
    {&__pyx_kp_u_Data_failed_save_in, __pyx_k_Data_failed_save_in, sizeof(__pyx_k_Data_failed_save_in), 0, 1, 0, 0},
    {&__pyx_kp_u_Don_t_need_to_update, __pyx_k_Don_t_need_to_update, sizeof(__pyx_k_Don_t_need_to_update), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_date_is, __pyx_k_Failed_date_is, sizeof(__pyx_k_Failed_date_is), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_futures_main_s, __pyx_k_Failed_to_call_ak_futures_main_s, sizeof(__pyx_k_Failed_to_call_ak_futures_main_s), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_board_c, __pyx_k_Failed_to_call_ak_stock_board_c, sizeof(__pyx_k_Failed_to_call_ak_stock_board_c), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_board_h, __pyx_k_Failed_to_call_ak_stock_board_h, sizeof(__pyx_k_Failed_to_call_ak_stock_board_h), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_info_a_c, __pyx_k_Failed_to_call_ak_stock_info_a_c, sizeof(__pyx_k_Failed_to_call_ak_stock_info_a_c), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai, __pyx_k_Failed_to_call_ak_stock_zh_a_dai, sizeof(__pyx_k_Failed_to_call_ak_stock_zh_a_dai), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_2, __pyx_k_Failed_to_call_ak_stock_zh_a_dai_2, sizeof(__pyx_k_Failed_to_call_ak_stock_zh_a_dai_2), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_3, __pyx_k_Failed_to_call_ak_stock_zh_a_dai_3, sizeof(__pyx_k_Failed_to_call_ak_stock_zh_a_dai_3), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_zh_a_dai_4, __pyx_k_Failed_to_call_ak_stock_zh_a_dai_4, sizeof(__pyx_k_Failed_to_call_ak_stock_zh_a_dai_4), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_ak_stock_zh_a_his, __pyx_k_Failed_to_call_ak_stock_zh_a_his, sizeof(__pyx_k_Failed_to_call_ak_stock_zh_a_his), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_bs_query_history, __pyx_k_Failed_to_call_bs_query_history, sizeof(__pyx_k_Failed_to_call_bs_query_history), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_sdc, __pyx_k_Failed_to_call_sdc, sizeof(__pyx_k_Failed_to_call_sdc), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_sdc_stock, __pyx_k_Failed_to_call_sdc_stock, sizeof(__pyx_k_Failed_to_call_sdc_stock), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_sdc_stock_zh_inde, __pyx_k_Failed_to_call_sdc_stock_zh_inde, sizeof(__pyx_k_Failed_to_call_sdc_stock_zh_inde), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_stock_finance_mf, __pyx_k_Failed_to_call_stock_finance_mf, sizeof(__pyx_k_Failed_to_call_stock_finance_mf), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_stock_finance_mfd, __pyx_k_Failed_to_call_stock_finance_mfd, sizeof(__pyx_k_Failed_to_call_stock_finance_mfd), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_call_stock_zh_a_gdhs_d, __pyx_k_Failed_to_call_stock_zh_a_gdhs_d, sizeof(__pyx_k_Failed_to_call_stock_zh_a_gdhs_d), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_to_updateSingleStockBasic, __pyx_k_Failed_to_updateSingleStockBasic, sizeof(__pyx_k_Failed_to_updateSingleStockBasic), 0, 1, 0, 0},
    {&__pyx_kp_u_Failed_update, __pyx_k_Failed_update, sizeof(__pyx_k_Failed_update), 0, 1, 0, 0},
    {&__pyx_kp_u_Fq_factor_of, __pyx_k_Fq_factor_of, sizeof(__pyx_k_Fq_factor_of), 0, 1, 0, 0},
    {&__pyx_n_s_JR0, __pyx_k_JR0, sizeof(__pyx_k_JR0), 0, 0, 1, 1},
    {&__pyx_n_s_LR0, __pyx_k_LR0, sizeof(__pyx_k_LR0), 0, 0, 1, 1},
    {&__pyx_n_s_NaT, __pyx_k_NaT, sizeof(__pyx_k_NaT), 0, 0, 1, 1},
    {&__pyx_kp_u_Need_update_stock_concept_basic, __pyx_k_Need_update_stock_concept_basic, sizeof(__pyx_k_Need_update_stock_concept_basic), 0, 1, 0, 0},
    {&__pyx_kp_u_Need_update_stock_industry_basic, __pyx_k_Need_update_stock_industry_basic, sizeof(__pyx_k_Need_update_stock_industry_basic), 0, 1, 0, 0},
    {&__pyx_kp_u_Need_update_stock_simple_info_fi, __pyx_k_Need_update_stock_simple_info_fi, sizeof(__pyx_k_Need_update_stock_simple_info_fi), 0, 1, 0, 0},
    {&__pyx_n_s_ProcessPoolExecutor, __pyx_k_ProcessPoolExecutor, sizeof(__pyx_k_ProcessPoolExecutor), 0, 0, 1, 1},
    {&__pyx_n_s_RI0, __pyx_k_RI0, sizeof(__pyx_k_RI0), 0, 0, 1, 1},
    {&__pyx_kp_u_StockTradeDayInfo_of, __pyx_k_StockTradeDayInfo_of, sizeof(__pyx_k_StockTradeDayInfo_of), 0, 1, 0, 0},
    {&__pyx_kp_u_Succeed_save_in, __pyx_k_Succeed_save_in, sizeof(__pyx_k_Succeed_save_in), 0, 1, 0, 0},
    {&__pyx_kp_u_Succeed_to_call_getFqFactorByDiv, __pyx_k_Succeed_to_call_getFqFactorByDiv, sizeof(__pyx_k_Succeed_to_call_getFqFactorByDiv), 0, 1, 0, 0},
    {&__pyx_kp_u_Succeed_update, __pyx_k_Succeed_update, sizeof(__pyx_k_Succeed_update), 0, 1, 0, 0},
    {&__pyx_kp_u_The, __pyx_k_The, sizeof(__pyx_k_The), 0, 1, 0, 0},
    {&__pyx_kp_u_There_is_not_new_stocks_to_updat, __pyx_k_There_is_not_new_stocks_to_updat, sizeof(__pyx_k_There_is_not_new_stocks_to_updat), 0, 1, 0, 0},
    {&__pyx_n_s_ThreadPoolExecutor, __pyx_k_ThreadPoolExecutor, sizeof(__pyx_k_ThreadPoolExecutor), 0, 0, 1, 1},
    {&__pyx_kp_u_TradeDayInfo_of, __pyx_k_TradeDayInfo_of, sizeof(__pyx_k_TradeDayInfo_of), 0, 1, 0, 0},
    {&__pyx_kp_u_TradeDayInfo_of_2, __pyx_k_TradeDayInfo_of_2, sizeof(__pyx_k_TradeDayInfo_of_2), 0, 1, 0, 0},
    {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
    {&__pyx_n_s_WH0, __pyx_k_WH0, sizeof(__pyx_k_WH0), 0, 0, 1, 1},
    {&__pyx_kp_s_XX, __pyx_k_XX, sizeof(__pyx_k_XX), 0, 0, 1, 0},
    {&__pyx_kp_s_Y_m_d, __pyx_k_Y_m_d, sizeof(__pyx_k_Y_m_d), 0, 0, 1, 0},
    {&__pyx_kp_s__10, __pyx_k__10, sizeof(__pyx_k__10), 0, 0, 1, 0},
    {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0},
    {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0},
    {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0},
    {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
    {&__pyx_n_s__177, __pyx_k__177, sizeof(__pyx_k__177), 0, 0, 1, 1},
    {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0},
    {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
    {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0},
    {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
    {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0},
    {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0},
    {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0},
    {&__pyx_kp_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 0},
    {&__pyx_kp_s__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 0, 1, 0},
    {&__pyx_kp_s__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 0, 1, 0},
    {&__pyx_kp_s__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 0, 1, 0},
    {&__pyx_kp_s__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 1, 0},
    {&__pyx_kp_s__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 0, 1, 0},
    {&__pyx_kp_s__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 1, 0},
    {&__pyx_kp_s__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 1, 0},
    {&__pyx_kp_s__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 0, 1, 0},
    {&__pyx_kp_s__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 0, 1, 0},
    {&__pyx_kp_s__45, __pyx_k__45, sizeof(__pyx_k__45), 0, 0, 1, 0},
    {&__pyx_kp_s__46, __pyx_k__46, sizeof(__pyx_k__46), 0, 0, 1, 0},
    {&__pyx_kp_s__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 0, 1, 0},
    {&__pyx_kp_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 0},
    {&__pyx_kp_s__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 1, 0},
    {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0},
    {&__pyx_kp_s__50, __pyx_k__50, sizeof(__pyx_k__50), 0, 0, 1, 0},
    {&__pyx_kp_s__51, __pyx_k__51, sizeof(__pyx_k__51), 0, 0, 1, 0},
    {&__pyx_kp_s__54, __pyx_k__54, sizeof(__pyx_k__54), 0, 0, 1, 0},
    {&__pyx_kp_s__60, __pyx_k__60, sizeof(__pyx_k__60), 0, 0, 1, 0},
    {&__pyx_kp_s__61, __pyx_k__61, sizeof(__pyx_k__61), 0, 0, 1, 0},
    {&__pyx_kp_s__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 0, 1, 0},
    {&__pyx_kp_s__63, __pyx_k__63, sizeof(__pyx_k__63), 0, 0, 1, 0},
    {&__pyx_kp_s__64, __pyx_k__64, sizeof(__pyx_k__64), 0, 0, 1, 0},
    {&__pyx_kp_s__65, __pyx_k__65, sizeof(__pyx_k__65), 0, 0, 1, 0},
    {&__pyx_kp_s__66, __pyx_k__66, sizeof(__pyx_k__66), 0, 0, 1, 0},
    {&__pyx_n_s__67, __pyx_k__67, sizeof(__pyx_k__67), 0, 0, 1, 1},
    {&__pyx_kp_s__71, __pyx_k__71, sizeof(__pyx_k__71), 0, 0, 1, 0},
    {&__pyx_kp_s__72, __pyx_k__72, sizeof(__pyx_k__72), 0, 0, 1, 0},
    {&__pyx_kp_s__76, __pyx_k__76, sizeof(__pyx_k__76), 0, 0, 1, 0},
    {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0},
    {&__pyx_kp_s__87, __pyx_k__87, sizeof(__pyx_k__87), 0, 0, 1, 0},
    {&__pyx_kp_s__88, __pyx_k__88, sizeof(__pyx_k__88), 0, 0, 1, 0},
    {&__pyx_kp_s__89, __pyx_k__89, sizeof(__pyx_k__89), 0, 0, 1, 0},
    {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0},
    {&__pyx_kp_s__90, __pyx_k__90, sizeof(__pyx_k__90), 0, 0, 1, 0},
    {&__pyx_kp_s__91, __pyx_k__91, sizeof(__pyx_k__91), 0, 0, 1, 0},
    {&__pyx_n_s__94, __pyx_k__94, sizeof(__pyx_k__94), 0, 0, 1, 1},
    {&__pyx_n_s_adjust, __pyx_k_adjust, sizeof(__pyx_k_adjust), 0, 0, 1, 1},
    {&__pyx_n_s_adjustflag, __pyx_k_adjustflag, sizeof(__pyx_k_adjustflag), 0, 0, 1, 1},
    {&__pyx_n_s_ak, __pyx_k_ak, sizeof(__pyx_k_ak), 0, 0, 1, 1},
    {&__pyx_kp_u_ak_stock_zh_a_gdhs_detail_em_ret, __pyx_k_ak_stock_zh_a_gdhs_detail_em_ret, sizeof(__pyx_k_ak_stock_zh_a_gdhs_detail_em_ret), 0, 1, 0, 0},
    {&__pyx_n_s_akshare, __pyx_k_akshare, sizeof(__pyx_k_akshare), 0, 0, 1, 1},
    {&__pyx_kp_u_akshare_version, __pyx_k_akshare_version, sizeof(__pyx_k_akshare_version), 0, 1, 0, 0},
    {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
    {&__pyx_n_s_all_stock_list, __pyx_k_all_stock_list, sizeof(__pyx_k_all_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_all_stock_simple_info, __pyx_k_all_stock_simple_info, sizeof(__pyx_k_all_stock_simple_info), 0, 0, 1, 1},
    {&__pyx_n_s_all_succeed, __pyx_k_all_succeed, sizeof(__pyx_k_all_succeed), 0, 0, 1, 1},
    {&__pyx_n_s_amount, __pyx_k_amount, sizeof(__pyx_k_amount), 0, 0, 1, 1},
    {&__pyx_n_s_api, __pyx_k_api, sizeof(__pyx_k_api), 0, 0, 1, 1},
    {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
    {&__pyx_n_s_apply, __pyx_k_apply, sizeof(__pyx_k_apply), 0, 0, 1, 1},
    {&__pyx_n_s_as_completed, __pyx_k_as_completed, sizeof(__pyx_k_as_completed), 0, 0, 1, 1},
    {&__pyx_n_s_ascending, __pyx_k_ascending, sizeof(__pyx_k_ascending), 0, 0, 1, 1},
    {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
    {&__pyx_n_s_axis, __pyx_k_axis, sizeof(__pyx_k_axis), 0, 0, 1, 1},
    {&__pyx_n_s_baostock, __pyx_k_baostock, sizeof(__pyx_k_baostock), 0, 0, 1, 1},
    {&__pyx_kp_s_baostock_login_respond_error_cod, __pyx_k_baostock_login_respond_error_cod, sizeof(__pyx_k_baostock_login_respond_error_cod), 0, 0, 1, 0},
    {&__pyx_kp_s_baostock_login_respond_error_msg, __pyx_k_baostock_login_respond_error_msg, sizeof(__pyx_k_baostock_login_respond_error_msg), 0, 0, 1, 0},
    {&__pyx_kp_u_baostock_version, __pyx_k_baostock_version, sizeof(__pyx_k_baostock_version), 0, 1, 0, 0},
    {&__pyx_n_s_basic_info_df, __pyx_k_basic_info_df, sizeof(__pyx_k_basic_info_df), 0, 0, 1, 1},
    {&__pyx_n_s_basic_info_table_name, __pyx_k_basic_info_table_name, sizeof(__pyx_k_basic_info_table_name), 0, 0, 1, 1},
    {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
    {&__pyx_kp_s_bool_str, __pyx_k_bool_str, sizeof(__pyx_k_bool_str), 0, 0, 1, 0},
    {&__pyx_n_s_bs, __pyx_k_bs, sizeof(__pyx_k_bs), 0, 0, 1, 1},
    {&__pyx_n_s_by, __pyx_k_by, sizeof(__pyx_k_by), 0, 0, 1, 1},
    {&__pyx_n_s_capital_reserve_ps, __pyx_k_capital_reserve_ps, sizeof(__pyx_k_capital_reserve_ps), 0, 0, 1, 1},
    {&__pyx_n_s_cash_dividend_ps, __pyx_k_cash_dividend_ps, sizeof(__pyx_k_cash_dividend_ps), 0, 0, 1, 1},
    {&__pyx_n_s_cash_dividends, __pyx_k_cash_dividends, sizeof(__pyx_k_cash_dividends), 0, 0, 1, 1},
    {&__pyx_n_s_check_serializability, __pyx_k_check_serializability, sizeof(__pyx_k_check_serializability), 0, 0, 1, 1},
    {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
    {&__pyx_n_s_clearTableContent, __pyx_k_clearTableContent, sizeof(__pyx_k_clearTableContent), 0, 0, 1, 1},
    {&__pyx_n_s_clearTableContentByCode, __pyx_k_clearTableContentByCode, sizeof(__pyx_k_clearTableContentByCode), 0, 0, 1, 1},
    {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
    {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
    {&__pyx_n_s_co_name, __pyx_k_co_name, sizeof(__pyx_k_co_name), 0, 0, 1, 1},
    {&__pyx_n_s_cocept_name, __pyx_k_cocept_name, sizeof(__pyx_k_cocept_name), 0, 0, 1, 1},
    {&__pyx_n_s_code, __pyx_k_code, sizeof(__pyx_k_code), 0, 0, 1, 1},
    {&__pyx_kp_u_code_2, __pyx_k_code_2, sizeof(__pyx_k_code_2), 0, 1, 0, 0},
    {&__pyx_kp_u_code_is, __pyx_k_code_is, sizeof(__pyx_k_code_is), 0, 1, 0, 0},
    {&__pyx_n_s_code_str, __pyx_k_code_str, sizeof(__pyx_k_code_str), 0, 0, 1, 1},
    {&__pyx_n_s_coerce, __pyx_k_coerce, sizeof(__pyx_k_coerce), 0, 0, 1, 1},
    {&__pyx_n_s_cols, __pyx_k_cols, sizeof(__pyx_k_cols), 0, 0, 1, 1},
    {&__pyx_n_s_cols_to_convert, __pyx_k_cols_to_convert, sizeof(__pyx_k_cols_to_convert), 0, 0, 1, 1},
    {&__pyx_n_s_columns, __pyx_k_columns, sizeof(__pyx_k_columns), 0, 0, 1, 1},
    {&__pyx_n_s_combined_codes, __pyx_k_combined_codes, sizeof(__pyx_k_combined_codes), 0, 0, 1, 1},
    {&__pyx_n_s_commit, __pyx_k_commit, sizeof(__pyx_k_commit), 0, 0, 1, 1},
    {&__pyx_n_s_con, __pyx_k_con, sizeof(__pyx_k_con), 0, 0, 1, 1},
    {&__pyx_n_s_concat, __pyx_k_concat, sizeof(__pyx_k_concat), 0, 0, 1, 1},
    {&__pyx_n_s_concept, __pyx_k_concept, sizeof(__pyx_k_concept), 0, 0, 1, 1},
    {&__pyx_n_s_concept_cons_stocks, __pyx_k_concept_cons_stocks, sizeof(__pyx_k_concept_cons_stocks), 0, 0, 1, 1},
    {&__pyx_n_s_concept_history_df, __pyx_k_concept_history_df, sizeof(__pyx_k_concept_history_df), 0, 0, 1, 1},
    {&__pyx_n_s_concept_name, __pyx_k_concept_name, sizeof(__pyx_k_concept_name), 0, 0, 1, 1},
    {&__pyx_n_s_concept_trade_data_df, __pyx_k_concept_trade_data_df, sizeof(__pyx_k_concept_trade_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_concurrent_futures, __pyx_k_concurrent_futures, sizeof(__pyx_k_concurrent_futures), 0, 0, 1, 1},
    {&__pyx_n_s_cons_stocks, __pyx_k_cons_stocks, sizeof(__pyx_k_cons_stocks), 0, 0, 1, 1},
    {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
    {&__pyx_n_s_create_engine_session, __pyx_k_create_engine_session, sizeof(__pyx_k_create_engine_session), 0, 0, 1, 1},
    {&__pyx_n_s_cumprod, __pyx_k_cumprod, sizeof(__pyx_k_cumprod), 0, 0, 1, 1},
    {&__pyx_n_s_current_time, __pyx_k_current_time, sizeof(__pyx_k_current_time), 0, 0, 1, 1},
    {&__pyx_n_s_d, __pyx_k_d, sizeof(__pyx_k_d), 0, 0, 1, 1},
    {&__pyx_n_s_daily, __pyx_k_daily, sizeof(__pyx_k_daily), 0, 0, 1, 1},
    {&__pyx_n_s_data, __pyx_k_data, sizeof(__pyx_k_data), 0, 0, 1, 1},
    {&__pyx_n_s_dataAcquisition, __pyx_k_dataAcquisition, sizeof(__pyx_k_dataAcquisition), 0, 0, 1, 1},
    {&__pyx_n_s_dataManagement, __pyx_k_dataManagement, sizeof(__pyx_k_dataManagement), 0, 0, 1, 1},
    {&__pyx_n_s_dataPreprocess, __pyx_k_dataPreprocess, sizeof(__pyx_k_dataPreprocess), 0, 0, 1, 1},
    {&__pyx_n_s_data_dict, __pyx_k_data_dict, sizeof(__pyx_k_data_dict), 0, 0, 1, 1},
    {&__pyx_kp_u_data_has_not_update_from_networ, __pyx_k_data_has_not_update_from_networ, sizeof(__pyx_k_data_has_not_update_from_networ), 0, 1, 0, 0},
    {&__pyx_kp_u_data_is_wrong_in, __pyx_k_data_is_wrong_in, sizeof(__pyx_k_data_is_wrong_in), 0, 1, 0, 0},
    {&__pyx_n_s_data_list, __pyx_k_data_list, sizeof(__pyx_k_data_list), 0, 0, 1, 1},
    {&__pyx_n_s_data_to_mysql, __pyx_k_data_to_mysql, sizeof(__pyx_k_data_to_mysql), 0, 0, 1, 1},
    {&__pyx_kp_u_data_wrong_in, __pyx_k_data_wrong_in, sizeof(__pyx_k_data_wrong_in), 0, 1, 0, 0},
    {&__pyx_n_s_dataproc, __pyx_k_dataproc, sizeof(__pyx_k_dataproc), 0, 0, 1, 1},
    {&__pyx_n_s_date, __pyx_k_date, sizeof(__pyx_k_date), 0, 0, 1, 1},
    {&__pyx_kp_s_date_code_open_high_low_close_pr, __pyx_k_date_code_open_high_low_close_pr, sizeof(__pyx_k_date_code_open_high_low_close_pr), 0, 0, 1, 0},
    {&__pyx_n_s_date_data_type, __pyx_k_date_data_type, sizeof(__pyx_k_date_data_type), 0, 0, 1, 1},
    {&__pyx_n_s_datetime, __pyx_k_datetime, sizeof(__pyx_k_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_default_date, __pyx_k_default_date, sizeof(__pyx_k_default_date), 0, 0, 1, 1},
    {&__pyx_n_s_delete, __pyx_k_delete, sizeof(__pyx_k_delete), 0, 0, 1, 1},
    {&__pyx_n_s_delist_stock_df, __pyx_k_delist_stock_df, sizeof(__pyx_k_delist_stock_df), 0, 0, 1, 1},
    {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1},
    {&__pyx_n_s_desc_name, __pyx_k_desc_name, sizeof(__pyx_k_desc_name), 0, 0, 1, 1},
    {&__pyx_kp_u_detail_for_code, __pyx_k_detail_for_code, sizeof(__pyx_k_detail_for_code), 0, 1, 0, 0},
    {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
    {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
    {&__pyx_n_s_diff_code, __pyx_k_diff_code, sizeof(__pyx_k_diff_code), 0, 0, 1, 1},
    {&__pyx_n_s_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 0, 1, 1},
    {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
    {&__pyx_n_s_dispose, __pyx_k_dispose, sizeof(__pyx_k_dispose), 0, 0, 1, 1},
    {&__pyx_kp_u_dividend_data_failed_save_in, __pyx_k_dividend_data_failed_save_in, sizeof(__pyx_k_dividend_data_failed_save_in), 0, 1, 0, 0},
    {&__pyx_n_s_dividend_df, __pyx_k_dividend_df, sizeof(__pyx_k_dividend_df), 0, 0, 1, 1},
    {&__pyx_n_s_dividend_table, __pyx_k_dividend_table, sizeof(__pyx_k_dividend_table), 0, 0, 1, 1},
    {&__pyx_n_s_dividend_text, __pyx_k_dividend_text, sizeof(__pyx_k_dividend_text), 0, 0, 1, 1},
    {&__pyx_n_s_dividend_yield, __pyx_k_dividend_yield, sizeof(__pyx_k_dividend_yield), 0, 0, 1, 1},
    {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
    {&__pyx_kp_u_dont_need_to_update, __pyx_k_dont_need_to_update, sizeof(__pyx_k_dont_need_to_update), 0, 1, 0, 0},
    {&__pyx_kp_u_dont_need_to_update_2, __pyx_k_dont_need_to_update_2, sizeof(__pyx_k_dont_need_to_update_2), 0, 1, 0, 0},
    {&__pyx_n_s_drop, __pyx_k_drop, sizeof(__pyx_k_drop), 0, 0, 1, 1},
    {&__pyx_n_s_dt, __pyx_k_dt, sizeof(__pyx_k_dt), 0, 0, 1, 1},
    {&__pyx_n_s_dtype, __pyx_k_dtype, sizeof(__pyx_k_dtype), 0, 0, 1, 1},
    {&__pyx_n_s_dtype_mapping, __pyx_k_dtype_mapping, sizeof(__pyx_k_dtype_mapping), 0, 0, 1, 1},
    {&__pyx_n_s_dumpJsonToFile, __pyx_k_dumpJsonToFile, sizeof(__pyx_k_dumpJsonToFile), 0, 0, 1, 1},
    {&__pyx_n_s_dump_json_period, __pyx_k_dump_json_period, sizeof(__pyx_k_dump_json_period), 0, 0, 1, 1},
    {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
    {&__pyx_n_s_em, __pyx_k_em, sizeof(__pyx_k_em), 0, 0, 1, 1},
    {&__pyx_n_s_empty, __pyx_k_empty, sizeof(__pyx_k_empty), 0, 0, 1, 1},
    {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
    {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
    {&__pyx_n_s_end_date, __pyx_k_end_date, sizeof(__pyx_k_end_date), 0, 0, 1, 1},
    {&__pyx_n_s_end_time, __pyx_k_end_time, sizeof(__pyx_k_end_time), 0, 0, 1, 1},
    {&__pyx_n_s_engine, __pyx_k_engine, sizeof(__pyx_k_engine), 0, 0, 1, 1},
    {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
    {&__pyx_n_s_eps, __pyx_k_eps, sizeof(__pyx_k_eps), 0, 0, 1, 1},
    {&__pyx_kp_u_err_is, __pyx_k_err_is, sizeof(__pyx_k_err_is), 0, 1, 0, 0},
    {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
    {&__pyx_kp_u_error_2, __pyx_k_error_2, sizeof(__pyx_k_error_2), 0, 1, 0, 0},
    {&__pyx_n_s_error_code, __pyx_k_error_code, sizeof(__pyx_k_error_code), 0, 0, 1, 1},
    {&__pyx_n_s_error_msg, __pyx_k_error_msg, sizeof(__pyx_k_error_msg), 0, 0, 1, 1},
    {&__pyx_n_s_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 0, 1, 1},
    {&__pyx_n_s_ex_date, __pyx_k_ex_date, sizeof(__pyx_k_ex_date), 0, 0, 1, 1},
    {&__pyx_n_s_exclude_future_dict, __pyx_k_exclude_future_dict, sizeof(__pyx_k_exclude_future_dict), 0, 0, 1, 1},
    {&__pyx_n_s_exclude_future_list, __pyx_k_exclude_future_list, sizeof(__pyx_k_exclude_future_list), 0, 0, 1, 1},
    {&__pyx_n_s_executor, __pyx_k_executor, sizeof(__pyx_k_executor), 0, 0, 1, 1},
    {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
    {&__pyx_n_s_extractAdministrativeRegions, __pyx_k_extractAdministrativeRegions, sizeof(__pyx_k_extractAdministrativeRegions), 0, 0, 1, 1},
    {&__pyx_n_s_f_code, __pyx_k_f_code, sizeof(__pyx_k_f_code), 0, 0, 1, 1},
    {&__pyx_n_s_failed_list, __pyx_k_failed_list, sizeof(__pyx_k_failed_list), 0, 0, 1, 1},
    {&__pyx_kp_u_failed_to_save_in_tables_err_is, __pyx_k_failed_to_save_in_tables_err_is, sizeof(__pyx_k_failed_to_save_in_tables_err_is), 0, 1, 0, 0},
    {&__pyx_n_s_fhsz_em, __pyx_k_fhsz_em, sizeof(__pyx_k_fhsz_em), 0, 0, 1, 1},
    {&__pyx_n_s_fields, __pyx_k_fields, sizeof(__pyx_k_fields), 0, 0, 1, 1},
    {&__pyx_n_s_fillna, __pyx_k_fillna, sizeof(__pyx_k_fillna), 0, 0, 1, 1},
    {&__pyx_n_s_filter, __pyx_k_filter, sizeof(__pyx_k_filter), 0, 0, 1, 1},
    {&__pyx_n_s_filter_by, __pyx_k_filter_by, sizeof(__pyx_k_filter_by), 0, 0, 1, 1},
    {&__pyx_kp_u_financial_data_failed_save_in, __pyx_k_financial_data_failed_save_in, sizeof(__pyx_k_financial_data_failed_save_in), 0, 1, 0, 0},
    {&__pyx_kp_u_finished, __pyx_k_finished, sizeof(__pyx_k_finished), 0, 1, 0, 0},
    {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
    {&__pyx_n_s_first_date, __pyx_k_first_date, sizeof(__pyx_k_first_date), 0, 0, 1, 1},
    {&__pyx_n_s_fixTradeDayNullValue, __pyx_k_fixTradeDayNullValue, sizeof(__pyx_k_fixTradeDayNullValue), 0, 0, 1, 1},
    {&__pyx_kp_u_for_code, __pyx_k_for_code, sizeof(__pyx_k_for_code), 0, 1, 0, 0},
    {&__pyx_n_s_fq_factor_df, __pyx_k_fq_factor_df, sizeof(__pyx_k_fq_factor_df), 0, 0, 1, 1},
    {&__pyx_n_s_fq_factor_origin, __pyx_k_fq_factor_origin, sizeof(__pyx_k_fq_factor_origin), 0, 0, 1, 1},
    {&__pyx_n_s_fq_row_date, __pyx_k_fq_row_date, sizeof(__pyx_k_fq_row_date), 0, 0, 1, 1},
    {&__pyx_n_s_fq_row_date_str, __pyx_k_fq_row_date_str, sizeof(__pyx_k_fq_row_date_str), 0, 0, 1, 1},
    {&__pyx_n_s_frequency, __pyx_k_frequency, sizeof(__pyx_k_frequency), 0, 0, 1, 1},
    {&__pyx_n_s_fun_name, __pyx_k_fun_name, sizeof(__pyx_k_fun_name), 0, 0, 1, 1},
    {&__pyx_n_s_func, __pyx_k_func, sizeof(__pyx_k_func), 0, 0, 1, 1},
    {&__pyx_n_s_func_concept, __pyx_k_func_concept, sizeof(__pyx_k_func_concept), 0, 0, 1, 1},
    {&__pyx_n_s_func_index, __pyx_k_func_index, sizeof(__pyx_k_func_index), 0, 0, 1, 1},
    {&__pyx_n_s_func_industry, __pyx_k_func_industry, sizeof(__pyx_k_func_industry), 0, 0, 1, 1},
    {&__pyx_n_s_future, __pyx_k_future, sizeof(__pyx_k_future), 0, 0, 1, 1},
    {&__pyx_kp_s_futureCodeNames_csv, __pyx_k_futureCodeNames_csv, sizeof(__pyx_k_futureCodeNames_csv), 0, 0, 1, 0},
    {&__pyx_n_s_future_code, __pyx_k_future_code, sizeof(__pyx_k_future_code), 0, 0, 1, 1},
    {&__pyx_n_s_future_code_name_df, __pyx_k_future_code_name_df, sizeof(__pyx_k_future_code_name_df), 0, 0, 1, 1},
    {&__pyx_n_s_future_name, __pyx_k_future_name, sizeof(__pyx_k_future_name), 0, 0, 1, 1},
    {&__pyx_kp_s_future_no_silent_downcasting, __pyx_k_future_no_silent_downcasting, sizeof(__pyx_k_future_no_silent_downcasting), 0, 0, 1, 0},
    {&__pyx_n_s_future_trade_data_df, __pyx_k_future_trade_data_df, sizeof(__pyx_k_future_trade_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_future_trade_day, __pyx_k_future_trade_day, sizeof(__pyx_k_future_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_futures, __pyx_k_futures, sizeof(__pyx_k_futures), 0, 0, 1, 1},
    {&__pyx_n_s_futures_main_sina, __pyx_k_futures_main_sina, sizeof(__pyx_k_futures_main_sina), 0, 0, 1, 1},
    {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
    {&__pyx_n_s_getConceptStockCodes, __pyx_k_getConceptStockCodes, sizeof(__pyx_k_getConceptStockCodes), 0, 0, 1, 1},
    {&__pyx_n_s_getFqFactorByDividend, __pyx_k_getFqFactorByDividend, sizeof(__pyx_k_getFqFactorByDividend), 0, 0, 1, 1},
    {&__pyx_n_s_getFullStockCode, __pyx_k_getFullStockCode, sizeof(__pyx_k_getFullStockCode), 0, 0, 1, 1},
    {&__pyx_n_s_getIndexCodeName, __pyx_k_getIndexCodeName, sizeof(__pyx_k_getIndexCodeName), 0, 0, 1, 1},
    {&__pyx_n_s_getIndustryConceptConsText, __pyx_k_getIndustryConceptConsText, sizeof(__pyx_k_getIndustryConceptConsText), 0, 0, 1, 1},
    {&__pyx_n_s_getSingleIndustryConceptTradeDay, __pyx_k_getSingleIndustryConceptTradeDay, sizeof(__pyx_k_getSingleIndustryConceptTradeDay), 0, 0, 1, 1},
    {&__pyx_n_s_getStockFqfactorInfo, __pyx_k_getStockFqfactorInfo, sizeof(__pyx_k_getStockFqfactorInfo), 0, 0, 1, 1},
    {&__pyx_n_s_getStockSimpleInfo, __pyx_k_getStockSimpleInfo, sizeof(__pyx_k_getStockSimpleInfo), 0, 0, 1, 1},
    {&__pyx_n_s_getSuspendedStocks, __pyx_k_getSuspendedStocks, sizeof(__pyx_k_getSuspendedStocks), 0, 0, 1, 1},
    {&__pyx_n_s_get_row_data, __pyx_k_get_row_data, sizeof(__pyx_k_get_row_data), 0, 0, 1, 1},
    {&__pyx_n_s_get_table_columns, __pyx_k_get_table_columns, sizeof(__pyx_k_get_table_columns), 0, 0, 1, 1},
    {&__pyx_n_s_getframe, __pyx_k_getframe, sizeof(__pyx_k_getframe), 0, 0, 1, 1},
    {&__pyx_n_s_has_update_file, __pyx_k_has_update_file, sizeof(__pyx_k_has_update_file), 0, 0, 1, 1},
    {&__pyx_kp_u_has_updated, __pyx_k_has_updated, sizeof(__pyx_k_has_updated), 0, 1, 0, 0},
    {&__pyx_n_s_hfq_factor, __pyx_k_hfq_factor, sizeof(__pyx_k_hfq_factor), 0, 0, 1, 1},
    {&__pyx_kp_s_hfq_factor_2, __pyx_k_hfq_factor_2, sizeof(__pyx_k_hfq_factor_2), 0, 0, 1, 0},
    {&__pyx_n_s_high, __pyx_k_high, sizeof(__pyx_k_high), 0, 0, 1, 1},
    {&__pyx_kp_u_history, __pyx_k_history, sizeof(__pyx_k_history), 0, 1, 0, 0},
    {&__pyx_n_s_how, __pyx_k_how, sizeof(__pyx_k_how), 0, 0, 1, 1},
    {&__pyx_n_s_hsgt_history, __pyx_k_hsgt_history, sizeof(__pyx_k_hsgt_history), 0, 0, 1, 1},
    {&__pyx_n_s_hsgt_trade_day, __pyx_k_hsgt_trade_day, sizeof(__pyx_k_hsgt_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
    {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
    {&__pyx_n_s_if_exists, __pyx_k_if_exists, sizeof(__pyx_k_if_exists), 0, 0, 1, 1},
    {&__pyx_n_s_ignore_index, __pyx_k_ignore_index, sizeof(__pyx_k_ignore_index), 0, 0, 1, 1},
    {&__pyx_n_s_iloc, __pyx_k_iloc, sizeof(__pyx_k_iloc), 0, 0, 1, 1},
    {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
    {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
    {&__pyx_n_s_index_code, __pyx_k_index_code, sizeof(__pyx_k_index_code), 0, 0, 1, 1},
    {&__pyx_n_s_index_code_name_dict, __pyx_k_index_code_name_dict, sizeof(__pyx_k_index_code_name_dict), 0, 0, 1, 1},
    {&__pyx_n_s_index_name, __pyx_k_index_name, sizeof(__pyx_k_index_name), 0, 0, 1, 1},
    {&__pyx_n_s_index_trade_data_df, __pyx_k_index_trade_data_df, sizeof(__pyx_k_index_trade_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_index_trade_day, __pyx_k_index_trade_day, sizeof(__pyx_k_index_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_industry, __pyx_k_industry, sizeof(__pyx_k_industry), 0, 0, 1, 1},
    {&__pyx_n_s_industry_cons_stocks, __pyx_k_industry_cons_stocks, sizeof(__pyx_k_industry_cons_stocks), 0, 0, 1, 1},
    {&__pyx_n_s_industry_name, __pyx_k_industry_name, sizeof(__pyx_k_industry_name), 0, 0, 1, 1},
    {&__pyx_n_s_industry_or_concept_cons_df, __pyx_k_industry_or_concept_cons_df, sizeof(__pyx_k_industry_or_concept_cons_df), 0, 0, 1, 1},
    {&__pyx_n_s_industry_or_concept_hist_em_df, __pyx_k_industry_or_concept_hist_em_df, sizeof(__pyx_k_industry_or_concept_hist_em_df), 0, 0, 1, 1},
    {&__pyx_n_s_industry_or_concept_name_df, __pyx_k_industry_or_concept_name_df, sizeof(__pyx_k_industry_or_concept_name_df), 0, 0, 1, 1},
    {&__pyx_n_s_inf, __pyx_k_inf, sizeof(__pyx_k_inf), 0, 0, 1, 1},
    {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
    {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
    {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
    {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
    {&__pyx_n_s_inner, __pyx_k_inner, sizeof(__pyx_k_inner), 0, 0, 1, 1},
    {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
    {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
    {&__pyx_n_s_ipo_time, __pyx_k_ipo_time, sizeof(__pyx_k_ipo_time), 0, 0, 1, 1},
    {&__pyx_n_s_is, __pyx_k_is, sizeof(__pyx_k_is), 0, 0, 1, 1},
    {&__pyx_n_s_isAPrimaryBoardStock, __pyx_k_isAPrimaryBoardStock, sizeof(__pyx_k_isAPrimaryBoardStock), 0, 0, 1, 1},
    {&__pyx_kp_u_is_Empty, __pyx_k_is_Empty, sizeof(__pyx_k_is_Empty), 0, 1, 0, 0},
    {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
    {&__pyx_n_s_is_datetime, __pyx_k_is_datetime, sizeof(__pyx_k_is_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_is_datetime64_any_dtype, __pyx_k_is_datetime64_any_dtype, sizeof(__pyx_k_is_datetime64_any_dtype), 0, 0, 1, 1},
    {&__pyx_n_s_is_delist, __pyx_k_is_delist, sizeof(__pyx_k_is_delist), 0, 0, 1, 1},
    {&__pyx_n_s_is_hsgt, __pyx_k_is_hsgt, sizeof(__pyx_k_is_hsgt), 0, 0, 1, 1},
    {&__pyx_n_s_is_margin, __pyx_k_is_margin, sizeof(__pyx_k_is_margin), 0, 0, 1, 1},
    {&__pyx_kp_u_is_new, __pyx_k_is_new, sizeof(__pyx_k_is_new), 0, 1, 0, 0},
    {&__pyx_n_s_is_null_ex_data_em, __pyx_k_is_null_ex_data_em, sizeof(__pyx_k_is_null_ex_data_em), 0, 0, 1, 1},
    {&__pyx_n_s_is_null_ex_data_table, __pyx_k_is_null_ex_data_table, sizeof(__pyx_k_is_null_ex_data_table), 0, 0, 1, 1},
    {&__pyx_n_s_is_primary, __pyx_k_is_primary, sizeof(__pyx_k_is_primary), 0, 0, 1, 1},
    {&__pyx_n_s_is_session, __pyx_k_is_session, sizeof(__pyx_k_is_session), 0, 0, 1, 1},
    {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
    {&__pyx_n_s_isin, __pyx_k_isin, sizeof(__pyx_k_isin), 0, 0, 1, 1},
    {&__pyx_n_s_isna, __pyx_k_isna, sizeof(__pyx_k_isna), 0, 0, 1, 1},
    {&__pyx_kp_u_it_has_been_suspended, __pyx_k_it_has_been_suspended, sizeof(__pyx_k_it_has_been_suspended), 0, 1, 0, 0},
    {&__pyx_n_s_item, __pyx_k_item, sizeof(__pyx_k_item), 0, 0, 1, 1},
    {&__pyx_n_s_items, __pyx_k_items, sizeof(__pyx_k_items), 0, 0, 1, 1},
    {&__pyx_n_s_iterrows, __pyx_k_iterrows, sizeof(__pyx_k_iterrows), 0, 0, 1, 1},
    {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
    {&__pyx_n_s_json_file_name, __pyx_k_json_file_name, sizeof(__pyx_k_json_file_name), 0, 0, 1, 1},
    {&__pyx_kp_s_k, __pyx_k_k, sizeof(__pyx_k_k), 0, 0, 1, 0},
    {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
    {&__pyx_n_s_key_products, __pyx_k_key_products, sizeof(__pyx_k_key_products), 0, 0, 1, 1},
    {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
    {&__pyx_n_s_kzz_basic_info, __pyx_k_kzz_basic_info, sizeof(__pyx_k_kzz_basic_info), 0, 0, 1, 1},
    {&__pyx_kp_u_kzz_basic_info_dataframe, __pyx_k_kzz_basic_info_dataframe, sizeof(__pyx_k_kzz_basic_info_dataframe), 0, 1, 0, 0},
    {&__pyx_n_s_kzz_basic_info_em, __pyx_k_kzz_basic_info_em, sizeof(__pyx_k_kzz_basic_info_em), 0, 0, 1, 1},
    {&__pyx_n_s_latest_trade_day, __pyx_k_latest_trade_day, sizeof(__pyx_k_latest_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_lg, __pyx_k_lg, sizeof(__pyx_k_lg), 0, 0, 1, 1},
    {&__pyx_n_s_list, __pyx_k_list, sizeof(__pyx_k_list), 0, 0, 1, 1},
    {&__pyx_n_s_loadJsonData, __pyx_k_loadJsonData, sizeof(__pyx_k_loadJsonData), 0, 0, 1, 1},
    {&__pyx_n_s_loadTable, __pyx_k_loadTable, sizeof(__pyx_k_loadTable), 0, 0, 1, 1},
    {&__pyx_n_s_loadTableContentByCode, __pyx_k_loadTableContentByCode, sizeof(__pyx_k_loadTableContentByCode), 0, 0, 1, 1},
    {&__pyx_n_s_load_json_file, __pyx_k_load_json_file, sizeof(__pyx_k_load_json_file), 0, 0, 1, 1},
    {&__pyx_n_s_loc, __pyx_k_loc, sizeof(__pyx_k_loc), 0, 0, 1, 1},
    {&__pyx_n_s_local_engine, __pyx_k_local_engine, sizeof(__pyx_k_local_engine), 0, 0, 1, 1},
    {&__pyx_n_s_local_session, __pyx_k_local_session, sizeof(__pyx_k_local_session), 0, 0, 1, 1},
    {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
    {&__pyx_n_s_login, __pyx_k_login, sizeof(__pyx_k_login), 0, 0, 1, 1},
    {&__pyx_n_s_logout, __pyx_k_logout, sizeof(__pyx_k_logout), 0, 0, 1, 1},
    {&__pyx_n_s_low, __pyx_k_low, sizeof(__pyx_k_low), 0, 0, 1, 1},
    {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
    {&__pyx_n_s_main_business, __pyx_k_main_business, sizeof(__pyx_k_main_business), 0, 0, 1, 1},
    {&__pyx_n_s_main_fina_data_df, __pyx_k_main_fina_data_df, sizeof(__pyx_k_main_fina_data_df), 0, 0, 1, 1},
    {&__pyx_n_s_match_index, __pyx_k_match_index, sizeof(__pyx_k_match_index), 0, 0, 1, 1},
    {&__pyx_n_s_max, __pyx_k_max, sizeof(__pyx_k_max), 0, 0, 1, 1},
    {&__pyx_n_s_max_date, __pyx_k_max_date, sizeof(__pyx_k_max_date), 0, 0, 1, 1},
    {&__pyx_n_s_max_date_em, __pyx_k_max_date_em, sizeof(__pyx_k_max_date_em), 0, 0, 1, 1},
    {&__pyx_n_s_max_date_row, __pyx_k_max_date_row, sizeof(__pyx_k_max_date_row), 0, 0, 1, 1},
    {&__pyx_n_s_max_date_row_table, __pyx_k_max_date_row_table, sizeof(__pyx_k_max_date_row_table), 0, 0, 1, 1},
    {&__pyx_n_s_max_date_table, __pyx_k_max_date_table, sizeof(__pyx_k_max_date_table), 0, 0, 1, 1},
    {&__pyx_n_s_max_workers, __pyx_k_max_workers, sizeof(__pyx_k_max_workers), 0, 0, 1, 1},
    {&__pyx_kp_u_maybe_is_new_stock, __pyx_k_maybe_is_new_stock, sizeof(__pyx_k_maybe_is_new_stock), 0, 1, 0, 0},
    {&__pyx_n_s_merge, __pyx_k_merge, sizeof(__pyx_k_merge), 0, 0, 1, 1},
    {&__pyx_n_s_merged_df, __pyx_k_merged_df, sizeof(__pyx_k_merged_df), 0, 0, 1, 1},
    {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
    {&__pyx_n_s_method, __pyx_k_method, sizeof(__pyx_k_method), 0, 0, 1, 1},
    {&__pyx_n_s_min_date_em, __pyx_k_min_date_em, sizeof(__pyx_k_min_date_em), 0, 0, 1, 1},
    {&__pyx_n_s_min_date_em_str, __pyx_k_min_date_em_str, sizeof(__pyx_k_min_date_em_str), 0, 0, 1, 1},
    {&__pyx_n_s_min_date_sina, __pyx_k_min_date_sina, sizeof(__pyx_k_min_date_sina), 0, 0, 1, 1},
    {&__pyx_n_s_min_date_sina_str, __pyx_k_min_date_sina_str, sizeof(__pyx_k_min_date_sina_str), 0, 0, 1, 1},
    {&__pyx_n_s_mininterval, __pyx_k_mininterval, sizeof(__pyx_k_mininterval), 0, 0, 1, 1},
    {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
    {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
    {&__pyx_n_s_mro_entries, __pyx_k_mro_entries, sizeof(__pyx_k_mro_entries), 0, 0, 1, 1},
    {&__pyx_n_s_multi_thread, __pyx_k_multi_thread, sizeof(__pyx_k_multi_thread), 0, 0, 1, 1},
    {&__pyx_n_s_multi_type, __pyx_k_multi_type, sizeof(__pyx_k_multi_type), 0, 0, 1, 1},
    {&__pyx_n_s_mysql_table_name, __pyx_k_mysql_table_name, sizeof(__pyx_k_mysql_table_name), 0, 0, 1, 1},
    {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
    {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
    {&__pyx_n_s_name_A, __pyx_k_name_A, sizeof(__pyx_k_name_A), 0, 0, 1, 1},
    {&__pyx_n_s_name_B, __pyx_k_name_B, sizeof(__pyx_k_name_B), 0, 0, 1, 1},
    {&__pyx_n_s_nan, __pyx_k_nan, sizeof(__pyx_k_nan), 0, 0, 1, 1},
    {&__pyx_kp_u_need_to_update, __pyx_k_need_to_update, sizeof(__pyx_k_need_to_update), 0, 1, 0, 0},
    {&__pyx_n_s_need_update, __pyx_k_need_update, sizeof(__pyx_k_need_update), 0, 0, 1, 1},
    {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
    {&__pyx_n_s_new_data_fist_date_str, __pyx_k_new_data_fist_date_str, sizeof(__pyx_k_new_data_fist_date_str), 0, 0, 1, 1},
    {&__pyx_n_s_new_order, __pyx_k_new_order, sizeof(__pyx_k_new_order), 0, 0, 1, 1},
    {&__pyx_n_s_new_record, __pyx_k_new_record, sizeof(__pyx_k_new_record), 0, 0, 1, 1},
    {&__pyx_n_s_new_stocks, __pyx_k_new_stocks, sizeof(__pyx_k_new_stocks), 0, 0, 1, 1},
    {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
    {&__pyx_n_s_next_session, __pyx_k_next_session, sizeof(__pyx_k_next_session), 0, 0, 1, 1},
    {&__pyx_n_s_no_fault, __pyx_k_no_fault, sizeof(__pyx_k_no_fault), 0, 0, 1, 1},
    {&__pyx_n_s_non_serializable_attrs, __pyx_k_non_serializable_attrs, sizeof(__pyx_k_non_serializable_attrs), 0, 0, 1, 1},
    {&__pyx_kp_u_not_in_stock_basic_info, __pyx_k_not_in_stock_basic_info, sizeof(__pyx_k_not_in_stock_basic_info), 0, 1, 0, 0},
    {&__pyx_n_s_np, __pyx_k_np, sizeof(__pyx_k_np), 0, 0, 1, 1},
    {&__pyx_n_s_null_list, __pyx_k_null_list, sizeof(__pyx_k_null_list), 0, 0, 1, 1},
    {&__pyx_n_s_null_rows, __pyx_k_null_rows, sizeof(__pyx_k_null_rows), 0, 0, 1, 1},
    {&__pyx_kp_s_null_value_row_id_d_row_date_s_r, __pyx_k_null_value_row_id_d_row_date_s_r, sizeof(__pyx_k_null_value_row_id_d_row_date_s_r), 0, 0, 1, 0},
    {&__pyx_n_s_numpy, __pyx_k_numpy, sizeof(__pyx_k_numpy), 0, 0, 1, 1},
    {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
    {&__pyx_n_s_on, __pyx_k_on, sizeof(__pyx_k_on), 0, 0, 1, 1},
    {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
    {&__pyx_n_s_open_interest, __pyx_k_open_interest, sizeof(__pyx_k_open_interest), 0, 0, 1, 1},
    {&__pyx_n_s_order_by, __pyx_k_order_by, sizeof(__pyx_k_order_by), 0, 0, 1, 1},
    {&__pyx_n_s_origin_factor, __pyx_k_origin_factor, sizeof(__pyx_k_origin_factor), 0, 0, 1, 1},
    {&__pyx_n_s_outstand_share, __pyx_k_outstand_share, sizeof(__pyx_k_outstand_share), 0, 0, 1, 1},
    {&__pyx_n_s_pandas, __pyx_k_pandas, sizeof(__pyx_k_pandas), 0, 0, 1, 1},
    {&__pyx_kp_u_pandas_version, __pyx_k_pandas_version, sizeof(__pyx_k_pandas_version), 0, 1, 0, 0},
    {&__pyx_n_s_pd, __pyx_k_pd, sizeof(__pyx_k_pd), 0, 0, 1, 1},
    {&__pyx_n_s_period, __pyx_k_period, sizeof(__pyx_k_period), 0, 0, 1, 1},
    {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
    {&__pyx_n_s_pre_close, __pyx_k_pre_close, sizeof(__pyx_k_pre_close), 0, 0, 1, 1},
    {&__pyx_n_s_pre_close_first, __pyx_k_pre_close_first, sizeof(__pyx_k_pre_close_first), 0, 0, 1, 1},
    {&__pyx_n_s_preclose, __pyx_k_preclose, sizeof(__pyx_k_preclose), 0, 0, 1, 1},
    {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
    {&__pyx_n_s_print, __pyx_k_print, sizeof(__pyx_k_print), 0, 0, 1, 1},
    {&__pyx_n_s_process, __pyx_k_process, sizeof(__pyx_k_process), 0, 0, 1, 1},
    {&__pyx_n_s_province, __pyx_k_province, sizeof(__pyx_k_province), 0, 0, 1, 1},
    {&__pyx_n_s_qfq, __pyx_k_qfq, sizeof(__pyx_k_qfq), 0, 0, 1, 1},
    {&__pyx_n_s_qfq_close, __pyx_k_qfq_close, sizeof(__pyx_k_qfq_close), 0, 0, 1, 1},
    {&__pyx_n_s_qfq_factor, __pyx_k_qfq_factor, sizeof(__pyx_k_qfq_factor), 0, 0, 1, 1},
    {&__pyx_kp_s_qfq_factor_2, __pyx_k_qfq_factor_2, sizeof(__pyx_k_qfq_factor_2), 0, 0, 1, 0},
    {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
    {&__pyx_n_s_quarter, __pyx_k_quarter, sizeof(__pyx_k_quarter), 0, 0, 1, 1},
    {&__pyx_n_s_query, __pyx_k_query, sizeof(__pyx_k_query), 0, 0, 1, 1},
    {&__pyx_n_s_query_history_k_data_plus, __pyx_k_query_history_k_data_plus, sizeof(__pyx_k_query_history_k_data_plus), 0, 0, 1, 1},
    {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
    {&__pyx_n_s_read_csv, __pyx_k_read_csv, sizeof(__pyx_k_read_csv), 0, 0, 1, 1},
    {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
    {&__pyx_n_s_rename, __pyx_k_rename, sizeof(__pyx_k_rename), 0, 0, 1, 1},
    {&__pyx_n_s_rename_stock_df, __pyx_k_rename_stock_df, sizeof(__pyx_k_rename_stock_df), 0, 0, 1, 1},
    {&__pyx_n_s_replace, __pyx_k_replace, sizeof(__pyx_k_replace), 0, 0, 1, 1},
    {&__pyx_n_s_report, __pyx_k_report, sizeof(__pyx_k_report), 0, 0, 1, 1},
    {&__pyx_n_s_report_date, __pyx_k_report_date, sizeof(__pyx_k_report_date), 0, 0, 1, 1},
    {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
    {&__pyx_n_s_res_fq, __pyx_k_res_fq, sizeof(__pyx_k_res_fq), 0, 0, 1, 1},
    {&__pyx_n_s_restoration_price_hfq, __pyx_k_restoration_price_hfq, sizeof(__pyx_k_restoration_price_hfq), 0, 0, 1, 1},
    {&__pyx_n_s_restoration_price_qfq, __pyx_k_restoration_price_qfq, sizeof(__pyx_k_restoration_price_qfq), 0, 0, 1, 1},
    {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
    {&__pyx_n_s_result_day_data, __pyx_k_result_day_data, sizeof(__pyx_k_result_day_data), 0, 0, 1, 1},
    {&__pyx_n_s_return, __pyx_k_return, sizeof(__pyx_k_return), 0, 0, 1, 1},
    {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1},
    {&__pyx_n_s_round, __pyx_k_round, sizeof(__pyx_k_round), 0, 0, 1, 1},
    {&__pyx_n_s_row, __pyx_k_row, sizeof(__pyx_k_row), 0, 0, 1, 1},
    {&__pyx_n_s_row_code, __pyx_k_row_code, sizeof(__pyx_k_row_code), 0, 0, 1, 1},
    {&__pyx_n_s_row_date, __pyx_k_row_date, sizeof(__pyx_k_row_date), 0, 0, 1, 1},
    {&__pyx_n_s_row_index1, __pyx_k_row_index1, sizeof(__pyx_k_row_index1), 0, 0, 1, 1},
    {&__pyx_n_s_row_index2, __pyx_k_row_index2, sizeof(__pyx_k_row_index2), 0, 0, 1, 1},
    {&__pyx_n_s_row_indice, __pyx_k_row_indice, sizeof(__pyx_k_row_indice), 0, 0, 1, 1},
    {&__pyx_n_s_row_qfq_factor, __pyx_k_row_qfq_factor, sizeof(__pyx_k_row_qfq_factor), 0, 0, 1, 1},
    {&__pyx_kp_u_row_qfq_factor_equal_zero_when, __pyx_k_row_qfq_factor_equal_zero_when, sizeof(__pyx_k_row_qfq_factor_equal_zero_when), 0, 1, 0, 0},
    {&__pyx_n_s_rows, __pyx_k_rows, sizeof(__pyx_k_rows), 0, 0, 1, 1},
    {&__pyx_n_s_rs, __pyx_k_rs, sizeof(__pyx_k_rs), 0, 0, 1, 1},
    {&__pyx_n_s_rzrq, __pyx_k_rzrq, sizeof(__pyx_k_rzrq), 0, 0, 1, 1},
    {&__pyx_n_s_rzrq_history, __pyx_k_rzrq_history, sizeof(__pyx_k_rzrq_history), 0, 0, 1, 1},
    {&__pyx_n_s_rzrq_trade_day, __pyx_k_rzrq_trade_day, sizeof(__pyx_k_rzrq_trade_day), 0, 0, 1, 1},
    {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
    {&__pyx_n_s_saveHistTradeDayInfoBaostock, __pyx_k_saveHistTradeDayInfoBaostock, sizeof(__pyx_k_saveHistTradeDayInfoBaostock), 0, 0, 1, 1},
    {&__pyx_n_s_saveHistTradeDayInfoEm, __pyx_k_saveHistTradeDayInfoEm, sizeof(__pyx_k_saveHistTradeDayInfoEm), 0, 0, 1, 1},
    {&__pyx_n_s_saveHistTradeDayInfoSina, __pyx_k_saveHistTradeDayInfoSina, sizeof(__pyx_k_saveHistTradeDayInfoSina), 0, 0, 1, 1},
    {&__pyx_n_s_scalar, __pyx_k_scalar, sizeof(__pyx_k_scalar), 0, 0, 1, 1},
    {&__pyx_n_s_sdc, __pyx_k_sdc, sizeof(__pyx_k_sdc), 0, 0, 1, 1},
    {&__pyx_kp_u_sdc_stock_fhps_detail_em_return, __pyx_k_sdc_stock_fhps_detail_em_return, sizeof(__pyx_k_sdc_stock_fhps_detail_em_return), 0, 1, 0, 0},
    {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
    {&__pyx_n_s_session, __pyx_k_session, sizeof(__pyx_k_session), 0, 0, 1, 1},
    {&__pyx_n_s_setTableColumnValue, __pyx_k_setTableColumnValue, sizeof(__pyx_k_setTableColumnValue), 0, 0, 1, 1},
    {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
    {&__pyx_n_s_set_option, __pyx_k_set_option, sizeof(__pyx_k_set_option), 0, 0, 1, 1},
    {&__pyx_n_s_sh_calendar, __pyx_k_sh_calendar, sizeof(__pyx_k_sh_calendar), 0, 0, 1, 1},
    {&__pyx_n_s_shape, __pyx_k_shape, sizeof(__pyx_k_shape), 0, 0, 1, 1},
    {&__pyx_n_s_shift, __pyx_k_shift, sizeof(__pyx_k_shift), 0, 0, 1, 1},
    {&__pyx_n_s_shutdown, __pyx_k_shutdown, sizeof(__pyx_k_shutdown), 0, 0, 1, 1},
    {&__pyx_n_s_simple_info, __pyx_k_simple_info, sizeof(__pyx_k_simple_info), 0, 0, 1, 1},
    {&__pyx_n_s_simple_stock_code, __pyx_k_simple_stock_code, sizeof(__pyx_k_simple_stock_code), 0, 0, 1, 1},
    {&__pyx_n_s_sina, __pyx_k_sina, sizeof(__pyx_k_sina), 0, 0, 1, 1},
    {&__pyx_n_s_single, __pyx_k_single, sizeof(__pyx_k_single), 0, 0, 1, 1},
    {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
    {&__pyx_kp_u_so_execute_delete_its_all_data, __pyx_k_so_execute_delete_its_all_data, sizeof(__pyx_k_so_execute_delete_its_all_data), 0, 1, 0, 0},
    {&__pyx_n_s_sort_values, __pyx_k_sort_values, sizeof(__pyx_k_sort_values), 0, 0, 1, 1},
    {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
    {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1},
    {&__pyx_n_s_splitDataframeByYear, __pyx_k_splitDataframeByYear, sizeof(__pyx_k_splitDataframeByYear), 0, 0, 1, 1},
    {&__pyx_n_s_split_dict, __pyx_k_split_dict, sizeof(__pyx_k_split_dict), 0, 0, 1, 1},
    {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
    {&__pyx_n_s_startWithDigit, __pyx_k_startWithDigit, sizeof(__pyx_k_startWithDigit), 0, 0, 1, 1},
    {&__pyx_n_s_start_date, __pyx_k_start_date, sizeof(__pyx_k_start_date), 0, 0, 1, 1},
    {&__pyx_n_s_start_time, __pyx_k_start_time, sizeof(__pyx_k_start_time), 0, 0, 1, 1},
    {&__pyx_kp_u_stock, __pyx_k_stock, sizeof(__pyx_k_stock), 0, 1, 0, 0},
    {&__pyx_n_s_stockDataCrawler, __pyx_k_stockDataCrawler, sizeof(__pyx_k_stockDataCrawler), 0, 0, 1, 1},
    {&__pyx_n_s_stock_basic_info, __pyx_k_stock_basic_info, sizeof(__pyx_k_stock_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_basic_info_df, __pyx_k_stock_basic_info_df, sizeof(__pyx_k_stock_basic_info_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_concept_cons_em, __pyx_k_stock_board_concept_cons_em, sizeof(__pyx_k_stock_board_concept_cons_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_concept_hist_em, __pyx_k_stock_board_concept_hist_em, sizeof(__pyx_k_stock_board_concept_hist_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_concept_name_em, __pyx_k_stock_board_concept_name_em, sizeof(__pyx_k_stock_board_concept_name_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_industry_cons_em, __pyx_k_stock_board_industry_cons_em, sizeof(__pyx_k_stock_board_industry_cons_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_industry_hist_em, __pyx_k_stock_board_industry_hist_em, sizeof(__pyx_k_stock_board_industry_hist_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_board_industry_name_em, __pyx_k_stock_board_industry_name_em, sizeof(__pyx_k_stock_board_industry_name_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_code, __pyx_k_stock_code, sizeof(__pyx_k_stock_code), 0, 0, 1, 1},
    {&__pyx_n_s_stock_code_back, __pyx_k_stock_code_back, sizeof(__pyx_k_stock_code_back), 0, 0, 1, 1},
    {&__pyx_n_s_stock_concept_basic_info, __pyx_k_stock_concept_basic_info, sizeof(__pyx_k_stock_concept_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_concept_trade_day, __pyx_k_stock_concept_trade_day, sizeof(__pyx_k_stock_concept_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_dividend_info, __pyx_k_stock_dividend_info, sizeof(__pyx_k_stock_dividend_info), 0, 0, 1, 1},
    {&__pyx_kp_u_stock_dividend_info_of, __pyx_k_stock_dividend_info_of, sizeof(__pyx_k_stock_dividend_info_of), 0, 1, 0, 0},
    {&__pyx_n_s_stock_dividend_ps, __pyx_k_stock_dividend_ps, sizeof(__pyx_k_stock_dividend_ps), 0, 0, 1, 1},
    {&__pyx_n_s_stock_dividends, __pyx_k_stock_dividends, sizeof(__pyx_k_stock_dividends), 0, 0, 1, 1},
    {&__pyx_n_s_stock_fhps_detail_em, __pyx_k_stock_fhps_detail_em, sizeof(__pyx_k_stock_fhps_detail_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_finance_mfd_quarter_em, __pyx_k_stock_finance_mfd_quarter_em, sizeof(__pyx_k_stock_finance_mfd_quarter_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_finance_mfd_report_em, __pyx_k_stock_finance_mfd_report_em, sizeof(__pyx_k_stock_finance_mfd_report_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_financial_quarter, __pyx_k_stock_financial_quarter, sizeof(__pyx_k_stock_financial_quarter), 0, 0, 1, 1},
    {&__pyx_n_s_stock_financial_report, __pyx_k_stock_financial_report, sizeof(__pyx_k_stock_financial_report), 0, 0, 1, 1},
    {&__pyx_n_s_stock_fq_factor, __pyx_k_stock_fq_factor, sizeof(__pyx_k_stock_fq_factor), 0, 0, 1, 1},
    {&__pyx_n_s_stock_full_code, __pyx_k_stock_full_code, sizeof(__pyx_k_stock_full_code), 0, 0, 1, 1},
    {&__pyx_n_s_stock_hold_number, __pyx_k_stock_hold_number, sizeof(__pyx_k_stock_hold_number), 0, 0, 1, 1},
    {&__pyx_n_s_stock_hsgt_detail, __pyx_k_stock_hsgt_detail, sizeof(__pyx_k_stock_hsgt_detail), 0, 0, 1, 1},
    {&__pyx_n_s_stock_hsgt_trade_day, __pyx_k_stock_hsgt_trade_day, sizeof(__pyx_k_stock_hsgt_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_individual_info_em, __pyx_k_stock_individual_info_em, sizeof(__pyx_k_stock_individual_info_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_individual_info_em_df, __pyx_k_stock_individual_info_em_df, sizeof(__pyx_k_stock_individual_info_em_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_basic_info, __pyx_k_stock_industry_basic_info, sizeof(__pyx_k_stock_industry_basic_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_concept_basic, __pyx_k_stock_industry_concept_basic, sizeof(__pyx_k_stock_industry_concept_basic), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_concept_basic_inf, __pyx_k_stock_industry_concept_basic_inf, sizeof(__pyx_k_stock_industry_concept_basic_inf), 0, 0, 1, 1},
    {&__pyx_n_s_stock_industry_trade_day, __pyx_k_stock_industry_trade_day, sizeof(__pyx_k_stock_industry_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_info_a_code_name, __pyx_k_stock_info_a_code_name, sizeof(__pyx_k_stock_info_a_code_name), 0, 0, 1, 1},
    {&__pyx_n_s_stock_item, __pyx_k_stock_item, sizeof(__pyx_k_stock_item), 0, 0, 1, 1},
    {&__pyx_n_s_stock_len, __pyx_k_stock_len, sizeof(__pyx_k_stock_len), 0, 0, 1, 1},
    {&__pyx_n_s_stock_name, __pyx_k_stock_name, sizeof(__pyx_k_stock_name), 0, 0, 1, 1},
    {&__pyx_n_s_stock_name_new, __pyx_k_stock_name_new, sizeof(__pyx_k_stock_name_new), 0, 0, 1, 1},
    {&__pyx_n_s_stock_query, __pyx_k_stock_query, sizeof(__pyx_k_stock_query), 0, 0, 1, 1},
    {&__pyx_n_s_stock_rzrq_detail, __pyx_k_stock_rzrq_detail, sizeof(__pyx_k_stock_rzrq_detail), 0, 0, 1, 1},
    {&__pyx_n_s_stock_rzrq_trade_day, __pyx_k_stock_rzrq_trade_day, sizeof(__pyx_k_stock_rzrq_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_simple_code, __pyx_k_stock_simple_code, sizeof(__pyx_k_stock_simple_code), 0, 0, 1, 1},
    {&__pyx_n_s_stock_simple_info, __pyx_k_stock_simple_info, sizeof(__pyx_k_stock_simple_info), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tfp_em, __pyx_k_stock_tfp_em, sizeof(__pyx_k_stock_tfp_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_tfp_em_df, __pyx_k_stock_tfp_em_df, sizeof(__pyx_k_stock_tfp_em_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_to_update, __pyx_k_stock_to_update, sizeof(__pyx_k_stock_to_update), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day, __pyx_k_stock_trade_day, sizeof(__pyx_k_stock_trade_day), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2, __pyx_k_stock_trade_day_2, sizeof(__pyx_k_stock_trade_day_2), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2018, __pyx_k_stock_trade_day_2018, sizeof(__pyx_k_stock_trade_day_2018), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2019, __pyx_k_stock_trade_day_2019, sizeof(__pyx_k_stock_trade_day_2019), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2020, __pyx_k_stock_trade_day_2020, sizeof(__pyx_k_stock_trade_day_2020), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2021, __pyx_k_stock_trade_day_2021, sizeof(__pyx_k_stock_trade_day_2021), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2022, __pyx_k_stock_trade_day_2022, sizeof(__pyx_k_stock_trade_day_2022), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2023, __pyx_k_stock_trade_day_2023, sizeof(__pyx_k_stock_trade_day_2023), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_2024, __pyx_k_stock_trade_day_2024, sizeof(__pyx_k_stock_trade_day_2024), 0, 0, 1, 1},
    {&__pyx_n_s_stock_trade_day_df, __pyx_k_stock_trade_day_df, sizeof(__pyx_k_stock_trade_day_df), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_daily, __pyx_k_stock_zh_a_daily, sizeof(__pyx_k_stock_zh_a_daily), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_gdhs, __pyx_k_stock_zh_a_gdhs, sizeof(__pyx_k_stock_zh_a_gdhs), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_gdhs_detail_em, __pyx_k_stock_zh_a_gdhs_detail_em, sizeof(__pyx_k_stock_zh_a_gdhs_detail_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist, __pyx_k_stock_zh_a_hist, sizeof(__pyx_k_stock_zh_a_hist), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist_em_bfq, __pyx_k_stock_zh_a_hist_em_bfq, sizeof(__pyx_k_stock_zh_a_hist_em_bfq), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist_sina_bfq, __pyx_k_stock_zh_a_hist_sina_bfq, sizeof(__pyx_k_stock_zh_a_hist_sina_bfq), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist_sina_fq_factor, __pyx_k_stock_zh_a_hist_sina_fq_factor, sizeof(__pyx_k_stock_zh_a_hist_sina_fq_factor), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist_sina_hfq, __pyx_k_stock_zh_a_hist_sina_hfq, sizeof(__pyx_k_stock_zh_a_hist_sina_hfq), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_a_hist_sina_qfq, __pyx_k_stock_zh_a_hist_sina_qfq, sizeof(__pyx_k_stock_zh_a_hist_sina_qfq), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zh_index_daily_em, __pyx_k_stock_zh_index_daily_em, sizeof(__pyx_k_stock_zh_index_daily_em), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zyjs_ths, __pyx_k_stock_zyjs_ths, sizeof(__pyx_k_stock_zyjs_ths), 0, 0, 1, 1},
    {&__pyx_n_s_stock_zyjs_ths_df, __pyx_k_stock_zyjs_ths_df, sizeof(__pyx_k_stock_zyjs_ths_df), 0, 0, 1, 1},
    {&__pyx_n_s_stocks_list, __pyx_k_stocks_list, sizeof(__pyx_k_stocks_list), 0, 0, 1, 1},
    {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
    {&__pyx_n_s_strftime, __pyx_k_strftime, sizeof(__pyx_k_strftime), 0, 0, 1, 1},
    {&__pyx_n_s_strptime, __pyx_k_strptime, sizeof(__pyx_k_strptime), 0, 0, 1, 1},
    {&__pyx_n_s_submit, __pyx_k_submit, sizeof(__pyx_k_submit), 0, 0, 1, 1},
    {&__pyx_n_s_succeed, __pyx_k_succeed, sizeof(__pyx_k_succeed), 0, 0, 1, 1},
    {&__pyx_kp_u_succeed_2, __pyx_k_succeed_2, sizeof(__pyx_k_succeed_2), 0, 1, 0, 0},
    {&__pyx_n_s_suffixes, __pyx_k_suffixes, sizeof(__pyx_k_suffixes), 0, 0, 1, 1},
    {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
    {&__pyx_n_s_suspended_stock_list, __pyx_k_suspended_stock_list, sizeof(__pyx_k_suspended_stock_list), 0, 0, 1, 1},
    {&__pyx_n_s_symbol, __pyx_k_symbol, sizeof(__pyx_k_symbol), 0, 0, 1, 1},
    {&__pyx_n_s_synchronize_session, __pyx_k_synchronize_session, sizeof(__pyx_k_synchronize_session), 0, 0, 1, 1},
    {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
    {&__pyx_n_s_tableTools, __pyx_k_tableTools, sizeof(__pyx_k_tableTools), 0, 0, 1, 1},
    {&__pyx_n_s_table_base_name, __pyx_k_table_base_name, sizeof(__pyx_k_table_base_name), 0, 0, 1, 1},
    {&__pyx_kp_u_table_code_name_first_date_prov, __pyx_k_table_code_name_first_date_prov, sizeof(__pyx_k_table_code_name_first_date_prov), 0, 1, 0, 0},
    {&__pyx_n_s_table_columns, __pyx_k_table_columns, sizeof(__pyx_k_table_columns), 0, 0, 1, 1},
    {&__pyx_kp_u_table_has_been_updated, __pyx_k_table_has_been_updated, sizeof(__pyx_k_table_has_been_updated), 0, 1, 0, 0},
    {&__pyx_kp_u_table_has_been_updated_2, __pyx_k_table_has_been_updated_2, sizeof(__pyx_k_table_has_been_updated_2), 0, 1, 0, 0},
    {&__pyx_kp_u_table_has_been_updated_by_updat, __pyx_k_table_has_been_updated_by_updat, sizeof(__pyx_k_table_has_been_updated_by_updat), 0, 1, 0, 0},
    {&__pyx_kp_u_table_has_been_updated_by_updat_2, __pyx_k_table_has_been_updated_by_updat_2, sizeof(__pyx_k_table_has_been_updated_by_updat_2), 0, 1, 0, 0},
    {&__pyx_kp_u_table_industry_concept_is_margi, __pyx_k_table_industry_concept_is_margi, sizeof(__pyx_k_table_industry_concept_is_margi), 0, 1, 0, 0},
    {&__pyx_n_s_table_max_date_str, __pyx_k_table_max_date_str, sizeof(__pyx_k_table_max_date_str), 0, 0, 1, 1},
    {&__pyx_n_s_table_name, __pyx_k_table_name, sizeof(__pyx_k_table_name), 0, 0, 1, 1},
    {&__pyx_n_s_table_name_year, __pyx_k_table_name_year, sizeof(__pyx_k_table_name_year), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock, __pyx_k_tbstock, sizeof(__pyx_k_tbstock), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_dataAcquisition_models, __pyx_k_tbstock_dataAcquisition_models, sizeof(__pyx_k_tbstock_dataAcquisition_models), 0, 0, 1, 1},
    {&__pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_k_tbstock_dataAcquisition_saveData, sizeof(__pyx_k_tbstock_dataAcquisition_saveData), 0, 0, 1, 0},
    {&__pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_k_tbstock_dataAcquisition_saveData_2, sizeof(__pyx_k_tbstock_dataAcquisition_saveData_2), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_dataAcquisition_stockDat, __pyx_k_tbstock_dataAcquisition_stockDat, sizeof(__pyx_k_tbstock_dataAcquisition_stockDat), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_dataManagement_dataPrepr, __pyx_k_tbstock_dataManagement_dataPrepr, sizeof(__pyx_k_tbstock_dataManagement_dataPrepr), 0, 0, 1, 1},
    {&__pyx_n_s_tbstock_utils, __pyx_k_tbstock_utils, sizeof(__pyx_k_tbstock_utils), 0, 0, 1, 1},
    {&__pyx_n_s_temp, __pyx_k_temp, sizeof(__pyx_k_temp), 0, 0, 1, 1},
    {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
    {&__pyx_n_s_test_2, __pyx_k_test_2, sizeof(__pyx_k_test_2), 0, 0, 1, 1},
    {&__pyx_n_s_test_simple_code, __pyx_k_test_simple_code, sizeof(__pyx_k_test_simple_code), 0, 0, 1, 1},
    {&__pyx_n_s_thread, __pyx_k_thread, sizeof(__pyx_k_thread), 0, 0, 1, 1},
    {&__pyx_n_s_time, __pyx_k_time, sizeof(__pyx_k_time), 0, 0, 1, 1},
    {&__pyx_kp_u_time_cost, __pyx_k_time_cost, sizeof(__pyx_k_time_cost), 0, 1, 0, 0},
    {&__pyx_n_s_to_datetime, __pyx_k_to_datetime, sizeof(__pyx_k_to_datetime), 0, 0, 1, 1},
    {&__pyx_n_s_to_list, __pyx_k_to_list, sizeof(__pyx_k_to_list), 0, 0, 1, 1},
    {&__pyx_n_s_to_numeric, __pyx_k_to_numeric, sizeof(__pyx_k_to_numeric), 0, 0, 1, 1},
    {&__pyx_n_s_to_sql, __pyx_k_to_sql, sizeof(__pyx_k_to_sql), 0, 0, 1, 1},
    {&__pyx_n_s_today_date, __pyx_k_today_date, sizeof(__pyx_k_today_date), 0, 0, 1, 1},
    {&__pyx_n_s_total, __pyx_k_total, sizeof(__pyx_k_total), 0, 0, 1, 1},
    {&__pyx_n_s_tqdm, __pyx_k_tqdm, sizeof(__pyx_k_tqdm), 0, 0, 1, 1},
    {&__pyx_kp_u_trade_data_failed_to_save_in_ta, __pyx_k_trade_data_failed_to_save_in_ta, sizeof(__pyx_k_trade_data_failed_to_save_in_ta), 0, 1, 0, 0},
    {&__pyx_kp_u_trade_day_data_failed_save_in, __pyx_k_trade_day_data_failed_save_in, sizeof(__pyx_k_trade_day_data_failed_save_in), 0, 1, 0, 0},
    {&__pyx_kp_u_trade_day_data_is_empty, __pyx_k_trade_day_data_is_empty, sizeof(__pyx_k_trade_day_data_is_empty), 0, 1, 0, 0},
    {&__pyx_n_s_tradestatus, __pyx_k_tradestatus, sizeof(__pyx_k_tradestatus), 0, 0, 1, 1},
    {&__pyx_n_s_turn, __pyx_k_turn, sizeof(__pyx_k_turn), 0, 0, 1, 1},
    {&__pyx_n_s_turn_over, __pyx_k_turn_over, sizeof(__pyx_k_turn_over), 0, 0, 1, 1},
    {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
    {&__pyx_n_s_unassign_profit_ps, __pyx_k_unassign_profit_ps, sizeof(__pyx_k_unassign_profit_ps), 0, 0, 1, 1},
    {&__pyx_kp_u_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 1, 0, 0},
    {&__pyx_n_s_updateFutureTradeDayToMysql, __pyx_k_updateFutureTradeDayToMysql, sizeof(__pyx_k_updateFutureTradeDayToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateIndexTradeDayToMysql, __pyx_k_updateIndexTradeDayToMysql, sizeof(__pyx_k_updateIndexTradeDayToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateKzzBasicInfoToMysql, __pyx_k_updateKzzBasicInfoToMysql, sizeof(__pyx_k_updateKzzBasicInfoToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateLib, __pyx_k_updateLib, sizeof(__pyx_k_updateLib), 0, 0, 1, 1},
    {&__pyx_n_s_updateRzrqHsgtTradeDayToMysql, __pyx_k_updateRzrqHsgtTradeDayToMysql, sizeof(__pyx_k_updateRzrqHsgtTradeDayToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleFutureTradeDayInfo, __pyx_k_updateSingleFutureTradeDayInfo, sizeof(__pyx_k_updateSingleFutureTradeDayInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleIndexTradeDayInfo, __pyx_k_updateSingleIndexTradeDayInfo, sizeof(__pyx_k_updateSingleIndexTradeDayInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockBasicInfo, __pyx_k_updateSingleStockBasicInfo, sizeof(__pyx_k_updateSingleStockBasicInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockDividendInfo, __pyx_k_updateSingleStockDividendInfo, sizeof(__pyx_k_updateSingleStockDividendInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockFinancialData, __pyx_k_updateSingleStockFinancialData, sizeof(__pyx_k_updateSingleStockFinancialData), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockFqFactor, __pyx_k_updateSingleStockFqFactor, sizeof(__pyx_k_updateSingleStockFqFactor), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockHoldNumber, __pyx_k_updateSingleStockHoldNumber, sizeof(__pyx_k_updateSingleStockHoldNumber), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockRzrqHsgtData, __pyx_k_updateSingleStockRzrqHsgtData, sizeof(__pyx_k_updateSingleStockRzrqHsgtData), 0, 0, 1, 1},
    {&__pyx_n_s_updateSingleStockTradeDayInfo, __pyx_k_updateSingleStockTradeDayInfo, sizeof(__pyx_k_updateSingleStockTradeDayInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockBasicInfoByIndustryCo, __pyx_k_updateStockBasicInfoByIndustryCo, sizeof(__pyx_k_updateStockBasicInfoByIndustryCo), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockBasicInfoToMysql, __pyx_k_updateStockBasicInfoToMysql, sizeof(__pyx_k_updateStockBasicInfoToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockConceptInfo, __pyx_k_updateStockConceptInfo, sizeof(__pyx_k_updateStockConceptInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockDividendInfoToMysql, __pyx_k_updateStockDividendInfoToMysql, sizeof(__pyx_k_updateStockDividendInfoToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockFinancialToMysql, __pyx_k_updateStockFinancialToMysql, sizeof(__pyx_k_updateStockFinancialToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockFqFactorToMysql, __pyx_k_updateStockFqFactorToMysql, sizeof(__pyx_k_updateStockFqFactorToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockHoldNumberToMysql, __pyx_k_updateStockHoldNumberToMysql, sizeof(__pyx_k_updateStockHoldNumberToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockIndustryConceptBasicI, __pyx_k_updateStockIndustryConceptBasicI, sizeof(__pyx_k_updateStockIndustryConceptBasicI), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockIndustryConceptTradeD, __pyx_k_updateStockIndustryConceptTradeD, sizeof(__pyx_k_updateStockIndustryConceptTradeD), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockIndustryInfo, __pyx_k_updateStockIndustryInfo, sizeof(__pyx_k_updateStockIndustryInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockRzrqHsgtTradeDayToMys, __pyx_k_updateStockRzrqHsgtTradeDayToMys, sizeof(__pyx_k_updateStockRzrqHsgtTradeDayToMys), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockSimpleInfoToMysql, __pyx_k_updateStockSimpleInfoToMysql, sizeof(__pyx_k_updateStockSimpleInfoToMysql), 0, 0, 1, 1},
    {&__pyx_n_s_updateStockTables, __pyx_k_updateStockTables, sizeof(__pyx_k_updateStockTables), 0, 0, 1, 1},
    {&__pyx_kp_u_updateStockTables_time_cost, __pyx_k_updateStockTables_time_cost, sizeof(__pyx_k_updateStockTables_time_cost), 0, 1, 0, 0},
    {&__pyx_n_s_updateStockTradeDayInfo, __pyx_k_updateStockTradeDayInfo, sizeof(__pyx_k_updateStockTradeDayInfo), 0, 0, 1, 1},
    {&__pyx_n_s_updateStrategyDict, __pyx_k_updateStrategyDict, sizeof(__pyx_k_updateStrategyDict), 0, 0, 1, 1},
    {&__pyx_kp_s_update_concept, __pyx_k_update_concept, sizeof(__pyx_k_update_concept), 0, 0, 1, 0},
    {&__pyx_kp_u_update_concept_There_exist, __pyx_k_update_concept_There_exist, sizeof(__pyx_k_update_concept_There_exist), 0, 1, 0, 0},
    {&__pyx_n_s_update_db_logs_dir, __pyx_k_update_db_logs_dir, sizeof(__pyx_k_update_db_logs_dir), 0, 0, 1, 1},
    {&__pyx_n_s_update_dict, __pyx_k_update_dict, sizeof(__pyx_k_update_dict), 0, 0, 1, 1},
    {&__pyx_kp_s_update_industry, __pyx_k_update_industry, sizeof(__pyx_k_update_industry), 0, 0, 1, 0},
    {&__pyx_kp_u_update_industry_This, __pyx_k_update_industry_This, sizeof(__pyx_k_update_industry_This), 0, 1, 0, 0},
    {&__pyx_n_s_update_json, __pyx_k_update_json, sizeof(__pyx_k_update_json), 0, 0, 1, 1},
    {&__pyx_n_s_update_list, __pyx_k_update_list, sizeof(__pyx_k_update_list), 0, 0, 1, 1},
    {&__pyx_n_s_update_range, __pyx_k_update_range, sizeof(__pyx_k_update_range), 0, 0, 1, 1},
    {&__pyx_n_s_updated, __pyx_k_updated, sizeof(__pyx_k_updated), 0, 0, 1, 1},
    {&__pyx_n_s_updated_concept, __pyx_k_updated_concept, sizeof(__pyx_k_updated_concept), 0, 0, 1, 1},
    {&__pyx_n_s_updated_industry, __pyx_k_updated_industry, sizeof(__pyx_k_updated_industry), 0, 0, 1, 1},
    {&__pyx_n_s_updated_list, __pyx_k_updated_list, sizeof(__pyx_k_updated_list), 0, 0, 1, 1},
    {&__pyx_n_s_updated_list_index, __pyx_k_updated_list_index, sizeof(__pyx_k_updated_list_index), 0, 0, 1, 1},
    {&__pyx_kp_s_updatelog_json, __pyx_k_updatelog_json, sizeof(__pyx_k_updatelog_json), 0, 0, 1, 0},
    {&__pyx_n_s_utils, __pyx_k_utils, sizeof(__pyx_k_utils), 0, 0, 1, 1},
    {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
    {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
    {&__pyx_n_s_version, __pyx_k_version, sizeof(__pyx_k_version), 0, 0, 1, 1},
    {&__pyx_n_s_volume, __pyx_k_volume, sizeof(__pyx_k_volume), 0, 0, 1, 1},
    {&__pyx_n_s_wait, __pyx_k_wait, sizeof(__pyx_k_wait), 0, 0, 1, 1},
    {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
    {&__pyx_n_s_workers, __pyx_k_workers, sizeof(__pyx_k_workers), 0, 0, 1, 1},
    {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
    {&__pyx_kp_s_xx, __pyx_k_xx, sizeof(__pyx_k_xx), 0, 0, 1, 0},
    {&__pyx_n_s_year, __pyx_k_year, sizeof(__pyx_k_year), 0, 0, 1, 1},
    {&__pyx_n_s_year_list, __pyx_k_year_list, sizeof(__pyx_k_year_list), 0, 0, 1, 1},
    {&__pyx_n_s_year_stock_data, __pyx_k_year_stock_data, sizeof(__pyx_k_year_stock_data), 0, 0, 1, 1},
    {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
    {0, 0, 0, 0, 0, 0, 0}
  };
  return __Pyx_InitStrings(__pyx_string_tab);
}
/* #### Code section: cached_builtins ### */
static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 18, __pyx_L1_error)
  __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 26, __pyx_L1_error)
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 396, __pyx_L1_error)
  __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 415, __pyx_L1_error)
  __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) __PYX_ERR(0, 506, __pyx_L1_error)
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 2112, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: cached_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":125
 *         simple_info['is_primary'] = simple_info['code'].apply(utils.isAPrimaryBoardStock)
 *         simple_info = simple_info[simple_info['is_primary']]
 *         simple_info = simple_info.drop('is_primary', axis=1)             # <<<<<<<<<<<<<<
 * 
 *         #
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_n_s_is_primary); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 125, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":134
 * 
 *         #
 *         merged_df = pd.merge(simple_info, all_stock_simple_info, on='code', how='inner', suffixes=('_A', '_B'))             # <<<<<<<<<<<<<<
 *         rename_stock_df = merged_df[merged_df['name_A'] != merged_df['name_B']]
 *         for index, row in rename_stock_df.iterrows():
 */
  __pyx_tuple__7 = PyTuple_Pack(2, __pyx_n_s_A, __pyx_n_s_B); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 134, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":272
 *                 stocks_list = industry_cons_stocks.split(',')
 *                 if multi_type == 'thread':
 *                     with ThreadPoolExecutor(max_workers=workers) as executor:             # <<<<<<<<<<<<<<
 *                         futures = []
 *                         for stock_code in stocks_list:  #
 */
  __pyx_tuple__12 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 272, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":405
 *                 # -
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 *                 main_business = stock_zyjs_ths_df.loc[0, '']             # <<<<<<<<<<<<<<
 *                 key_products = stock_zyjs_ths_df.loc[0, '']
 * 
 */
  __pyx_tuple__14 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__13); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 405, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":406
 *                 stock_zyjs_ths_df = ak.stock_zyjs_ths(symbol=stock_code)
 *                 main_business = stock_zyjs_ths_df.loc[0, '']
 *                 key_products = stock_zyjs_ths_df.loc[0, '']             # <<<<<<<<<<<<<<
 * 
 *                 # # -- ip
 */
  __pyx_tuple__16 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__15); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 406, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":428
 *                 #
 *                 stock_basic_info_df.loc[0, list(new_record.keys())] = list(new_record.values())
 *                 stock_basic_info_df.fillna('0', inplace=True)             # <<<<<<<<<<<<<<
 * 
 *                 #
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_0); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 428, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":399
 *         update_range = [x for x in update_range if all_stock_simple_info.loc[x, 'code'] in failed_list]
 * 
 *         def updateSingleStockBasicInfo(stock_code, stock_name, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             stock_basic_info_df = pd.DataFrame(columns=table_columns)
 */
  __pyx_tuple__23 = PyTuple_Pack(13, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_update_dict, __pyx_n_s_stock_basic_info_df, __pyx_n_s_stock_zyjs_ths_df, __pyx_n_s_main_business, __pyx_n_s_key_products, __pyx_n_s_stock_individual_info_em_df, __pyx_n_s_data_dict, __pyx_n_s_first_date, __pyx_n_s_province, __pyx_n_s_new_record, __pyx_n_s_e); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 399, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);
  __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__23, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockBasicInfo, 399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 399, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":487
 *         # temp['hfq_factor'] = []
 *         # temp['date'] = pd.to_datetime(temp['date'])
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()             # <<<<<<<<<<<<<<
 *         temp.loc[0, 'qfq_factor'] = 1.0
 *         temp.loc[0, 'hfq_factor'] = 1.0
 */
  __pyx_tuple__25 = PyTuple_Pack(3, __pyx_int_1900, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);
  __pyx_tuple__26 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_date); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 487, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":488
 *         # temp['date'] = pd.to_datetime(temp['date'])
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()
 *         temp.loc[0, 'qfq_factor'] = 1.0             # <<<<<<<<<<<<<<
 *         temp.loc[0, 'hfq_factor'] = 1.0
 * 
 */
  __pyx_tuple__27 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_qfq_factor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(0, 488, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":489
 *         temp.loc[0, 'date'] = datetime(1900, 1, 1).date()
 *         temp.loc[0, 'qfq_factor'] = 1.0
 *         temp.loc[0, 'hfq_factor'] = 1.0             # <<<<<<<<<<<<<<
 * 
 *         try:
 */
  __pyx_tuple__28 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_hfq_factor); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 489, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":493
 *         try:
 *             basic_info_df = self.dataproc.loadTableContentByCode('stock_basic_info', stock_code)
 *             ipo_time = basic_info_df.loc[0, 'first_date'].strftime('%Y%m%d')             # <<<<<<<<<<<<<<
 *             stock_trade_day_df = ak.stock_zh_a_hist(symbol=stock_code, period="daily", start_date=ipo_time,
 *                                                     end_date=self.today_date,
 */
  __pyx_tuple__29 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_first_date); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 493, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":499
 * 
 *             stock_trade_day_df[''] = stock_trade_day_df[''].shift(1)
 *             stock_trade_day_df.loc[0, ''] = stock_trade_day_df.iloc[0][''] / (1.0 + stock_trade_day_df.iloc[0][''] / 100)             # <<<<<<<<<<<<<<
 *             stock_trade_day_df[''] = (stock_trade_day_df[''] - stock_trade_day_df['']) / stock_trade_day_df[''] * 100.0
 *             stock_trade_day_df[''] = pd.to_datetime(stock_trade_day_df['']).dt.date
 */
  __pyx_tuple__34 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__32); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 499, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":541
 *             temp['qfq_factor'] = temp['qfq_factor'].shift(1)
 *             temp.loc[0, 'qfq_factor'] = 1.0
 *             temp['hfq_factor'] = temp['hfq_factor'].iloc[::-1].cumprod().iloc[::-1]             # <<<<<<<<<<<<<<
 * 
 *             # ipo
 */
  __pyx_slice__37 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 541, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__37);
  __Pyx_GIVEREF(__pyx_slice__37);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":675
 *         if not is_datetime:
 *             stock_zh_a_hist_sina_qfq['date'] = pd.to_datetime(stock_zh_a_hist_sina_qfq['date'])
 *         stock_zh_a_hist_sina_qfq.sort_values('date', inplace=True, ascending=False)             # <<<<<<<<<<<<<<
 *         new_data_fist_date_str = stock_zh_a_hist_sina_qfq.loc[0, 'date'].strftime("%Y%m%d")  # date
 * 
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_date); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 675, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":825
 *                 utils.logger.warning(f"sdc.stock_fhps_detail_em return empty for code = {stock_code}: maybe is new stock ")
 *                 return True, stock_code
 *             fhsz_em.sort_values('', inplace=True, ascending=False)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f"Failed to call stock_finance_mfd_em for code = {stock_code}: {e} ")
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s__39); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 825, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":838
 * 
 *         #
 *         max_date_em = fhsz_em.loc[0, '']             # <<<<<<<<<<<<<<
 *         max_date_row_table = local_session.query(globals()[table_name]).filter(globals()[table_name].code == stock_code).order_by(
 *             globals()[table_name].report_date.desc()).first()
 */
  __pyx_tuple__41 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__39); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 838, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":854
 *             pass
 *         elif max_date_table == max_date_em:
 *             is_null_ex_data_em = fhsz_em.loc[0, ''] is pd.NaT             # <<<<<<<<<<<<<<
 *             if is_null_ex_data_em or not is_null_ex_data_table:
 *                 need_update = False
 */
  __pyx_tuple__43 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__42); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 854, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":961
 *                     pre_close.loc[row_indice] = pre_close.loc[row_indice] / row_qfq_factor
 * 
 *         pre_close.fillna(0, inplace=True)             # <<<<<<<<<<<<<<
 * 
 *         # set new colum
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 961, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":987
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]             # <<<<<<<<<<<<<<
 *         end_date = end_date[0:4] + '-' + end_date[4:6] + '-' + end_date[6:]
 * 
 */
  __pyx_slice__53 = PySlice_New(__pyx_int_0, __pyx_int_4, Py_None); if (unlikely(!__pyx_slice__53)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__53);
  __Pyx_GIVEREF(__pyx_slice__53);
  __pyx_slice__55 = PySlice_New(__pyx_int_4, __pyx_int_6, Py_None); if (unlikely(!__pyx_slice__55)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__55);
  __Pyx_GIVEREF(__pyx_slice__55);
  __pyx_slice__56 = PySlice_New(__pyx_int_6, Py_None, Py_None); if (unlikely(!__pyx_slice__56)) __PYX_ERR(0, 987, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__56);
  __Pyx_GIVEREF(__pyx_slice__56);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1030
 * 
 *         result_day_data["date"] = pd.to_datetime(result_day_data["date"], errors="coerce")
 *         cols_to_convert = result_day_data.columns[2:]             # <<<<<<<<<<<<<<
 *         result_day_data[cols_to_convert] = result_day_data[cols_to_convert].apply(pd.to_numeric, errors="coerce")
 *         result_day_data['turn_over'] = result_day_data['turn_over'] / 100.0
 */
  __pyx_slice__57 = PySlice_New(__pyx_int_2, Py_None, Py_None); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 1030, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_slice__57);
  __Pyx_GIVEREF(__pyx_slice__57);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1059
 *                     return False
 *             # TODO akshare
 *             stock_zh_a_hist_em_bfq.sort_values('', inplace=True, ascending=True)  #             # <<<<<<<<<<<<<<
 *         except Exception as e:
 *             utils.logger.error(f'Failed to call ak.stock_zh_a_hist for stock_code = {simple_stock_code}: {e} ')
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s__35); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 1059, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1064
 *             return False
 * 
 *         min_date_em = stock_zh_a_hist_em_bfq.loc[0, '']             # <<<<<<<<<<<<<<
 *         min_date_em_str = min_date_em.strftime('%Y%m%d')
 * 
 */
  __pyx_tuple__59 = PyTuple_Pack(2, __pyx_int_0, __pyx_kp_s__35); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1064, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1167
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockTradeDayInfo(code_str, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             # ,
 */
  __pyx_tuple__68 = PyTuple_Pack(9, __pyx_n_s_code_str, __pyx_n_s_update_dict, __pyx_n_s_pre_close_first, __pyx_n_s_start_date, __pyx_n_s_year, __pyx_n_s_mysql_table_name, __pyx_n_s_max_date_row, __pyx_n_s_max_date_table, __pyx_n_s_res); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 1167, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__68);
  __Pyx_GIVEREF(__pyx_tuple__68);
  __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockTradeDayInfo, 1167, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 1167, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1275
 *                     utils.logger.info(f'Failed date is {row_date}, code is {row_code}.')
 *                     continue
 *                 row.qfq_close = stock_zh_a_hist_sina_qfq.loc[0, 'close']             # <<<<<<<<<<<<<<
 *             session.commit()
 *         session.close()
 */
  __pyx_tuple__70 = PyTuple_Pack(2, __pyx_int_0, __pyx_n_s_close); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 1275, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__70);
  __Pyx_GIVEREF(__pyx_tuple__70);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1317
 *         update_range = range(0, rows)
 * 
 *         def getIndustryConceptConsText(stock_industry_concept_basic, i) -> bool:             # <<<<<<<<<<<<<<
 *             name = stock_industry_concept_basic.loc[i, 'name']
 *             try:
 */
  __pyx_tuple__73 = PyTuple_Pack(6, __pyx_n_s_stock_industry_concept_basic, __pyx_n_s_i, __pyx_n_s_name, __pyx_n_s_industry_or_concept_cons_df, __pyx_n_s_combined_codes, __pyx_n_s_e); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(0, 1317, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__73);
  __Pyx_GIVEREF(__pyx_tuple__73);
  __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_getIndustryConceptConsText, 1317, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(0, 1317, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1350
 *                     return False
 * 
 *         default_date = datetime(2100, 1, 1)             # <<<<<<<<<<<<<<
 *         stock_industry_concept_basic.fillna(default_date, inplace=True)
 * 
 */
  __pyx_tuple__75 = PyTuple_Pack(3, __pyx_int_2100, __pyx_int_1, __pyx_int_1); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(0, 1350, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__75);
  __Pyx_GIVEREF(__pyx_tuple__75);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1409
 *         update_range = [x for x in update_range if x not in updated_list_index]
 * 
 *         def getSingleIndustryConceptTradeDayInfo(name, code, update_dict) -> bool:             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             #
 */
  __pyx_tuple__77 = PyTuple_Pack(9, __pyx_n_s_name, __pyx_n_s_code, __pyx_n_s_update_dict, __pyx_n_s_start_date, __pyx_n_s_max_date_row, __pyx_n_s_max_date_table, __pyx_n_s_industry_or_concept_hist_em_df, __pyx_n_s_new_order, __pyx_n_s_e); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 1409, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__77);
  __Pyx_GIVEREF(__pyx_tuple__77);
  __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_getSingleIndustryConceptTradeDay, 1409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 1409, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1556
 *         update_range = [x for x in update_range if x not in updated_list]  #
 * 
 *         def updateSingleStockFinancialData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */
  __pyx_tuple__79 = PyTuple_Pack(8, __pyx_n_s_stock_code, __pyx_n_s_update_dict, __pyx_n_s_stock_code_back, __pyx_n_s_main_fina_data_df, __pyx_n_s_e, __pyx_n_s_max_date_em, __pyx_n_s_max_date_table, __pyx_n_s_match_index); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 1556, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__79);
  __Pyx_GIVEREF(__pyx_tuple__79);
  __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockFinancialData, 1556, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 1556, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1669
 *         # update_range = [x for x in update_range if x not in updated_list]
 * 
 *         def updateSingleStockHoldNumber(stock_code, update_dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             try:
 */
  __pyx_tuple__81 = PyTuple_Pack(8, __pyx_n_s_stock_code, __pyx_n_s_update_dict, __pyx_n_s_stock_code_back, __pyx_n_s_stock_zh_a_gdhs, __pyx_n_s_e, __pyx_n_s_max_date_em, __pyx_n_s_max_date_table, __pyx_n_s_match_index); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 1669, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__81);
  __Pyx_GIVEREF(__pyx_tuple__81);
  __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockHoldNumber, 1669, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 1669, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1850
 *         all_stock_list = [x for x in all_stock_list if x not in updated_list]
 * 
 *         def updateSingleStockRzrqHsgtData(stock_code: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             max_date_table = session.query(func.max(globals()[table_name].date)).filter(globals()[table_name].code == stock_code).scalar()
 */
  __pyx_tuple__83 = PyTuple_Pack(8, __pyx_n_s_stock_code, __pyx_n_s_update_dict, __pyx_n_s_max_date_table, __pyx_n_s_mode, __pyx_n_s_concept_trade_data_df, __pyx_n_s_e, __pyx_n_s_data, __pyx_n_s_max_date_em); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 1850, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__83);
  __Pyx_GIVEREF(__pyx_tuple__83);
  __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockRzrqHsgtData, 1850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 1850, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1971
 *         index_code_name_dict = {key: value for key, value in index_code_name_dict.items() if key not in updated_list}
 * 
 *         def updateSingleIndexTradeDayInfo(index_code: str, index_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */
  __pyx_tuple__85 = PyTuple_Pack(10, __pyx_n_s_index_code, __pyx_n_s_index_name, __pyx_n_s_update_dict, __pyx_n_s_pre_close_first, __pyx_n_s_start_date, __pyx_n_s_max_date_row, __pyx_n_s_max_date_table, __pyx_n_s_index_trade_data_df, __pyx_n_s_pre_close, __pyx_n_s_e); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 1971, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__85);
  __Pyx_GIVEREF(__pyx_tuple__85);
  __pyx_codeobj__86 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__85, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleIndexTradeDayInfo, 1971, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__86)) __PYX_ERR(0, 1971, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2078
 *         future_code_name_df = future_code_name_df[~future_code_name_df['symbol'].isin(updated_list)]
 * 
 *         def updateSingleFutureTradeDayInfo(future_code: str, future_name: str, update_dict: dict):             # <<<<<<<<<<<<<<
 *             nonlocal no_fault
 *             pre_close_first = 0
 */
  __pyx_tuple__92 = PyTuple_Pack(10, __pyx_n_s_future_code, __pyx_n_s_future_name, __pyx_n_s_update_dict, __pyx_n_s_pre_close_first, __pyx_n_s_start_date, __pyx_n_s_max_date_row, __pyx_n_s_max_date_table, __pyx_n_s_future_trade_data_df, __pyx_n_s_pre_close, __pyx_n_s_e); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 2078, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__92);
  __Pyx_GIVEREF(__pyx_tuple__92);
  __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleFutureTradeDayInfo, 2078, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 2078, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":12
 * from tqdm import tqdm
 * 
 * import tbstock.dataManagement.dataPreprocess as dataproc             # <<<<<<<<<<<<<<
 * from tbstock.dataAcquisition.models import *
 * from tbstock.utils import utils
 */
  __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_tbstock, __pyx_n_s_dataManagement, __pyx_n_s_dataPreprocess); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__95);
  __Pyx_GIVEREF(__pyx_tuple__95);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":15
 * from tbstock.dataAcquisition.models import *
 * from tbstock.utils import utils
 * import tbstock.dataAcquisition.stockDataCrawler as sdc             # <<<<<<<<<<<<<<
 * 
 * # ##############################################
 */
  __pyx_tuple__96 = PyTuple_Pack(3, __pyx_n_s_tbstock, __pyx_n_s_dataAcquisition, __pyx_n_s_stockDataCrawler); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__96);
  __Pyx_GIVEREF(__pyx_tuple__96);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":23
 * 
 * test_simple_code = "300416"
 * pd.set_option('future.no_silent_downcasting', True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_tuple__97 = PyTuple_Pack(2, __pyx_kp_s_future_no_silent_downcasting, Py_True); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__97);
  __Pyx_GIVEREF(__pyx_tuple__97);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":26
 * 
 * 
 * class DataToMysql(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dump_json_period=10):
 *         self.start_date = utils.start_date
 */
  __pyx_tuple__98 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__98);
  __Pyx_GIVEREF(__pyx_tuple__98);
  __pyx_tuple__99 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__99);
  __Pyx_GIVEREF(__pyx_tuple__99);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":27
 * 
 * class DataToMysql(object):
 *     def __init__(self, dump_json_period=10):             # <<<<<<<<<<<<<<
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date
 */
  __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_dump_json_period); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__100);
  __Pyx_GIVEREF(__pyx_tuple__100);
  __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_init, 27, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 27, __pyx_L1_error)
  __pyx_tuple__102 = PyTuple_Pack(1, ((PyObject *)__pyx_int_10)); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__102);
  __Pyx_GIVEREF(__pyx_tuple__102);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":56
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 */
  __pyx_tuple__103 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__103)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__103);
  __Pyx_GIVEREF(__pyx_tuple__103);
  __pyx_codeobj__104 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__103, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_dumpJsonToFile, 56, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__104)) __PYX_ERR(0, 56, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":60
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */
  __pyx_tuple__105 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_table_name, __pyx_n_s_fun_name, __pyx_n_s_update_dict, __pyx_n_s_simple_info, __pyx_n_s_e, __pyx_n_s_dtype_mapping); if (unlikely(!__pyx_tuple__105)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__105);
  __Pyx_GIVEREF(__pyx_tuple__105);
  __pyx_codeobj__106 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__105, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateKzzBasicInfoToMysql, 60, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__106)) __PYX_ERR(0, 60, __pyx_L1_error)
  __pyx_tuple__107 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_kzz_basic_info)); if (unlikely(!__pyx_tuple__107)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__107);
  __Pyx_GIVEREF(__pyx_tuple__107);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":98
 *         return True
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */
  __pyx_tuple__108 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_table_name, __pyx_n_s_fun_name, __pyx_n_s_update_dict, __pyx_n_s_simple_info, __pyx_n_s_e, __pyx_n_s_dtype_mapping, __pyx_n_s_all_stock_simple_info, __pyx_n_s_diff_code, __pyx_n_s_merged_df, __pyx_n_s_rename_stock_df, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_stock_code, __pyx_n_s_stock_name_new, __pyx_n_s_stock_to_update, __pyx_n_s_delist_stock_df); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__108);
  __Pyx_GIVEREF(__pyx_tuple__108);
  __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockSimpleInfoToMysql, 98, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 98, __pyx_L1_error)
  __pyx_tuple__110 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_stock_simple_info)); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__110);
  __Pyx_GIVEREF(__pyx_tuple__110);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":171
 *         return True
 * 
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):
 */
  __pyx_tuple__111 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_industry_name, __pyx_n_s_multi_type, __pyx_n_s_local_engine, __pyx_n_s_local_session, __pyx_n_s_stock_query); if (unlikely(!__pyx_tuple__111)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__111);
  __Pyx_GIVEREF(__pyx_tuple__111);
  __pyx_codeobj__112 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__111, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_func_industry, 171, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__112)) __PYX_ERR(0, 171, __pyx_L1_error)
  __pyx_tuple__113 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_single)); if (unlikely(!__pyx_tuple__113)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__113);
  __Pyx_GIVEREF(__pyx_tuple__113);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":201
 *         return True
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True
 */
  __pyx_tuple__114 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_concept_name, __pyx_n_s_multi_type, __pyx_n_s_local_engine, __pyx_n_s_local_session, __pyx_n_s_stock_query); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__114);
  __Pyx_GIVEREF(__pyx_tuple__114);
  __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_func_concept, 201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 201, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":232
 *         return True
 * 
 *     def updateStockBasicInfoByIndustryConcept(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_industry_basic_infostock_concept_basic_infostock_basic_info
 */
  __pyx_tuple__116 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_table_name, __pyx_n_s_fun_name, __pyx_n_s_update_dict, __pyx_n_s_all_succeed, __pyx_n_s_stock_industry_basic_info, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_industry_name, __pyx_n_s_industry_cons_stocks, __pyx_n_s_stocks_list, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_stock_code, __pyx_n_s_future, __pyx_n_s_stock_concept_basic_info, __pyx_n_s_concept_name, __pyx_n_s_concept_cons_stocks); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__116);
  __Pyx_GIVEREF(__pyx_tuple__116);
  __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockBasicInfoByIndustryCo, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 232, __pyx_L1_error)
  __pyx_tuple__118 = PyTuple_Pack(2, ((PyObject*)__pyx_n_s_single), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__118);
  __Pyx_GIVEREF(__pyx_tuple__118);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */
  __pyx_tuple__119 = PyTuple_Pack(26, __pyx_n_s_self, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_update_dict, __pyx_n_s_failed_list, __pyx_n_s_all_stock_simple_info, __pyx_n_s_rows, __pyx_n_s_cols, __pyx_n_s_dtype_mapping, __pyx_n_s_table_columns, __pyx_n_s_update_range, __pyx_n_s_updateSingleStockBasicInfo, __pyx_n_s_updateSingleStockBasicInfo, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_start_time, __pyx_n_s_index, __pyx_n_s_stock_code, __pyx_n_s_stock_name, __pyx_n_s_future, __pyx_n_s_current_time, __pyx_n_s_res, __pyx_n_s_x); if (unlikely(!__pyx_tuple__119)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__119);
  __Pyx_GIVEREF(__pyx_tuple__119);
  __pyx_codeobj__120 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 26, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__119, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockBasicInfoToMysql, 346, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__120)) __PYX_ERR(0, 346, __pyx_L1_error)
  __pyx_tuple__121 = PyTuple_Pack(2, ((PyObject *)Py_True), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__121)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__121);
  __Pyx_GIVEREF(__pyx_tuple__121);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":480
 *         self.dumpJsonToFile()
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):             # <<<<<<<<<<<<<<
 *         dividend_table = 'stock_dividend_info'
 *         temp = pd.DataFrame()
 */
  __pyx_tuple__122 = PyTuple_Pack(17, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_dividend_table, __pyx_n_s_temp, __pyx_n_s_basic_info_df, __pyx_n_s_ipo_time, __pyx_n_s_stock_trade_day_df, __pyx_n_s_dividend_df, __pyx_n_s_i, __pyx_n_s_value, __pyx_n_s_row_index1, __pyx_n_s_cash_dividends, __pyx_n_s_stock_dividends, __pyx_n_s_row_index2, __pyx_n_s_restoration_price_qfq, __pyx_n_s_restoration_price_hfq, __pyx_n_s_e); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__122);
  __Pyx_GIVEREF(__pyx_tuple__122);
  __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 17, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_getFqFactorByDividend, 480, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 480, __pyx_L1_error)
  __pyx_tuple__124 = PyTuple_Pack(1, ((PyObject*)__pyx_kp_s_689009)); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__124);
  __Pyx_GIVEREF(__pyx_tuple__124);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":553
 *             return False, temp
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'
 */
  __pyx_tuple__125 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_multi_type, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_all_stock_simple_info, __pyx_n_s_update_range, __pyx_n_s_desc_name, __pyx_n_s_start_time, __pyx_n_s_stock_code, __pyx_n_s_succeed, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x); if (unlikely(!__pyx_tuple__125)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__125);
  __Pyx_GIVEREF(__pyx_tuple__125);
  __pyx_codeobj__126 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockFqFactorToMysql, 553, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__126)) __PYX_ERR(0, 553, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":640
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_fq_factor'
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)
 */
  __pyx_tuple__127 = PyTuple_Pack(19, __pyx_n_s_self, __pyx_n_s_stock_simple_code, __pyx_n_s_dtype_mapping, __pyx_n_s_multi_type, __pyx_n_s_table_name, __pyx_n_s_stock_full_code, __pyx_n_s_local_engine, __pyx_n_s_local_session, __pyx_n_s_stock_zh_a_hist_sina_qfq, __pyx_n_s_e, __pyx_n_s_succeed, __pyx_n_s_fq_factor_df, __pyx_n_s_date_data_type, __pyx_n_s_is_datetime, __pyx_n_s_new_data_fist_date_str, __pyx_n_s_max_date, __pyx_n_s_table_max_date_str, __pyx_n_s_stock_zh_a_hist_sina_hfq, __pyx_n_s_stock_zh_a_hist_sina_fq_factor); if (unlikely(!__pyx_tuple__127)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__127);
  __Pyx_GIVEREF(__pyx_tuple__127);
  __pyx_codeobj__128 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 19, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__127, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockFqFactor, 640, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__128)) __PYX_ERR(0, 640, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":723
 *                 local_engine.dispose()
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__125, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockDividendInfoToMysql, 723, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 723, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":817
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_dividend_info'
 *         #
 */
  __pyx_tuple__130 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_stock_code, __pyx_n_s_dtype_mapping, __pyx_n_s_multi_type, __pyx_n_s_table_name, __pyx_n_s_fhsz_em, __pyx_n_s_e, __pyx_n_s_local_engine, __pyx_n_s_local_session, __pyx_n_s_max_date_em, __pyx_n_s_max_date_row_table, __pyx_n_s_max_date_table, __pyx_n_s_is_null_ex_data_table, __pyx_n_s_need_update, __pyx_n_s_is_null_ex_data_em, __pyx_n_s_match_index); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__130);
  __Pyx_GIVEREF(__pyx_tuple__130);
  __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateSingleStockDividendInfo, 817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 817, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":892
 *                 local_engine.dispose()
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):             # <<<<<<<<<<<<<<
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:
 */
  __pyx_tuple__132 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_succeed, __pyx_n_s_stock_item, __pyx_n_s_update_dict); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__132);
  __Pyx_GIVEREF(__pyx_tuple__132);
  __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStrategyDict, 892, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 892, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":902
 *                 update_dict['failed_list'].append(stock_item)
 * 
 *     def getSuspendedStocks(self) -> list:             # <<<<<<<<<<<<<<
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 */
  __pyx_tuple__134 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_stock_tfp_em_df, __pyx_n_s_suspended_stock_list); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__134);
  __Pyx_GIVEREF(__pyx_tuple__134);
  __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_getSuspendedStocks, 902, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 902, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":907
 *         return suspended_stock_list
 * 
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',             # <<<<<<<<<<<<<<
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):
 */
  __pyx_tuple__136 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_simple_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_pre_close_first, __pyx_n_s_stock_code, __pyx_n_s_stock_zh_a_hist_sina_bfq, __pyx_n_s_e, __pyx_n_s_min_date_sina, __pyx_n_s_min_date_sina_str, __pyx_n_s_pre_close, __pyx_n_s_res_fq, __pyx_n_s_fq_factor_origin, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_fq_row_date, __pyx_n_s_fq_row_date_str, __pyx_n_s_row_qfq_factor, __pyx_n_s_row_indice, __pyx_n_s_dtype_mapping, __pyx_n_s_split_dict, __pyx_n_s_year, __pyx_n_s_year_stock_data, __pyx_n_s_table_name_year); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__136);
  __Pyx_GIVEREF(__pyx_tuple__136);
  __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_saveHistTradeDayInfoSina, 907, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 907, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":985
 *             return False
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):             # <<<<<<<<<<<<<<
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 */
  __pyx_tuple__138 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_simple_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_pre_close_first, __pyx_n_s_stock_code, __pyx_n_s_rs, __pyx_n_s_data_list, __pyx_n_s_result_day_data, __pyx_n_s_e, __pyx_n_s_dtype_mapping, __pyx_n_s_cols_to_convert, __pyx_n_s_split_dict, __pyx_n_s_year, __pyx_n_s_year_stock_data, __pyx_n_s_table_name_year); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__138);
  __Pyx_GIVEREF(__pyx_tuple__138);
  __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_saveHistTradeDayInfoBaostock, 985, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 985, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1046
 *             return False
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):             # <<<<<<<<<<<<<<
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 */
  __pyx_tuple__140 = PyTuple_Pack(24, __pyx_n_s_self, __pyx_n_s_simple_stock_code, __pyx_n_s_start_date, __pyx_n_s_end_date, __pyx_n_s_pre_close_first, __pyx_n_s_period, __pyx_n_s_stock_zh_a_hist_em_bfq, __pyx_n_s_e, __pyx_n_s_min_date_em, __pyx_n_s_min_date_em_str, __pyx_n_s_pre_close, __pyx_n_s_res_fq, __pyx_n_s_fq_factor_origin, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_fq_row_date, __pyx_n_s_fq_row_date_str, __pyx_n_s_row_qfq_factor, __pyx_n_s_row_indice, __pyx_n_s_dtype_mapping, __pyx_n_s_split_dict, __pyx_n_s_year, __pyx_n_s_year_stock_data, __pyx_n_s_table_name_year); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__140);
  __Pyx_GIVEREF(__pyx_tuple__140);
  __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(6, 0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_saveHistTradeDayInfoEm, 1046, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __pyx_tuple__142 = PyTuple_Pack(2, ((PyObject *)__pyx_int_0), ((PyObject*)__pyx_n_s_daily)); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__142);
  __Pyx_GIVEREF(__pyx_tuple__142);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */
  __pyx_tuple__143 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_method, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_base_name, __pyx_n_s_no_fault, __pyx_n_s_lg, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_all_stock_simple_info, __pyx_n_s_update_range, __pyx_n_s_updateSingleStockTradeDayInfo, __pyx_n_s_updateSingleStockTradeDayInfo, __pyx_n_s_start_time, __pyx_n_s_stock_code, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__143);
  __Pyx_GIVEREF(__pyx_tuple__143);
  __pyx_codeobj__144 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__143, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockTradeDayInfo, 1124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__144)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __pyx_tuple__145 = PyTuple_Pack(3, ((PyObject*)__pyx_n_s_sina), ((PyObject *)Py_True), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__145)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__145);
  __Pyx_GIVEREF(__pyx_tuple__145);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1252
 *             bs.logout()  #
 * 
 *     def fixTradeDayNullValue(self):             # <<<<<<<<<<<<<<
 *         '''
 *         null
 */
  __pyx_tuple__146 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_null_list, __pyx_n_s_year, __pyx_n_s_table_name, __pyx_n_s_null_rows, __pyx_n_s_row, __pyx_n_s_row_date, __pyx_n_s_row_code, __pyx_n_s_stock_zh_a_hist_sina_qfq, __pyx_n_s_e); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__146);
  __Pyx_GIVEREF(__pyx_tuple__146);
  __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_fixTradeDayNullValue, 1252, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1252, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */
  __pyx_tuple__148 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_dtype_mapping, __pyx_n_s_stock_industry_concept_basic, __pyx_n_s_industry_or_concept_name_df, __pyx_n_s_rows, __pyx_n_s_update_dict, __pyx_n_s_update_range, __pyx_n_s_getIndustryConceptConsText, __pyx_n_s_getIndustryConceptConsText, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_i, __pyx_n_s_future, __pyx_n_s_res, __pyx_n_s_default_date, __pyx_n_s_e); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__148);
  __Pyx_GIVEREF(__pyx_tuple__148);
  __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockIndustryConceptBasicI, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __pyx_tuple__150 = PyTuple_Pack(3, ((PyObject*)__pyx_n_s_industry), ((PyObject *)Py_True), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__150);
  __Pyx_GIVEREF(__pyx_tuple__150);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */
  __pyx_tuple__151 = PyTuple_Pack(29, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_no_fault, __pyx_n_s_table_name, __pyx_n_s_basic_info_table_name, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_stock_industry_concept_basic_inf, __pyx_n_s_rows, __pyx_n_s_cols, __pyx_n_s_func_index, __pyx_n_s_updated_list_index, __pyx_n_s_update_range, __pyx_n_s_getSingleIndustryConceptTradeDay, __pyx_n_s_getSingleIndustryConceptTradeDay, __pyx_n_s_start_time, __pyx_n_s_i, __pyx_n_s_name, __pyx_n_s_code, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x, __pyx_n_s_x); if (unlikely(!__pyx_tuple__151)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__151);
  __Pyx_GIVEREF(__pyx_tuple__151);
  __pyx_codeobj__152 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__151, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockIndustryConceptTradeD, 1367, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__152)) __PYX_ERR(0, 1367, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1501
 *         utils.logger.info(f"update {table_name} finished.")
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:
 */
  __pyx_tuple__153 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_res); if (unlikely(!__pyx_tuple__153)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__153);
  __Pyx_GIVEREF(__pyx_tuple__153);
  __pyx_codeobj__154 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockIndustryInfo, 1501, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__154)) __PYX_ERR(0, 1501, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1506
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:
 */
  __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__153, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockConceptInfo, 1506, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1506, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_tuple__156 = PyTuple_Pack(21, __pyx_n_s_self, __pyx_n_s_mode, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_all_stock_simple_info, __pyx_n_s_update_range, __pyx_n_s_updateSingleStockFinancialData, __pyx_n_s_updateSingleStockFinancialData, __pyx_n_s_start_time, __pyx_n_s_stock_code, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__156);
  __Pyx_GIVEREF(__pyx_tuple__156);
  __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 21, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockFinancialToMysql, 1511, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __pyx_tuple__158 = PyTuple_Pack(3, ((PyObject*)__pyx_n_s_report), ((PyObject *)Py_True), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__158);
  __Pyx_GIVEREF(__pyx_tuple__158);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */
  __pyx_tuple__159 = PyTuple_Pack(20, __pyx_n_s_self, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_all_stock_simple_info, __pyx_n_s_update_range, __pyx_n_s_updateSingleStockHoldNumber, __pyx_n_s_updateSingleStockHoldNumber, __pyx_n_s_start_time, __pyx_n_s_stock_code, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x); if (unlikely(!__pyx_tuple__159)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__159);
  __Pyx_GIVEREF(__pyx_tuple__159);
  __pyx_codeobj__160 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 20, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__159, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockHoldNumberToMysql, 1634, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__160)) __PYX_ERR(0, 1634, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1748
 *         self.dumpJsonToFile()
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq
 */
  __pyx_tuple__161 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_concept, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_max_date, __pyx_n_s_mode, __pyx_n_s_concept_history_df, __pyx_n_s_e); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__161);
  __Pyx_GIVEREF(__pyx_tuple__161);
  __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateRzrqHsgtTradeDayToMysql, 1748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __pyx_tuple__163 = PyTuple_Pack(1, ((PyObject*)__pyx_n_s_rzrq)); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__163);
  __Pyx_GIVEREF(__pyx_tuple__163);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */
  __pyx_tuple__164 = PyTuple_Pack(23, __pyx_n_s_self, __pyx_n_s_concept, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_start_date, __pyx_n_s_table_name, __pyx_n_s_cocept_name, __pyx_n_s_no_fault, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_all_stock_list, __pyx_n_s_stock_len, __pyx_n_s_updateSingleStockRzrqHsgtData, __pyx_n_s_updateSingleStockRzrqHsgtData, __pyx_n_s_start_time, __pyx_n_s_code_str, __pyx_n_s_current_time, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_future, __pyx_n_s_x); if (unlikely(!__pyx_tuple__164)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__164);
  __Pyx_GIVEREF(__pyx_tuple__164);
  __pyx_codeobj__165 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 23, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__164, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockRzrqHsgtTradeDayToMys, 1811, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__165)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __pyx_tuple__166 = PyTuple_Pack(3, ((PyObject*)__pyx_n_s_rzrq), ((PyObject *)Py_True), ((PyObject *)__pyx_int_12)); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__166);
  __Pyx_GIVEREF(__pyx_tuple__166);

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */
  __pyx_tuple__167 = PyTuple_Pack(16, __pyx_n_s_self, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_index_code_name_dict, __pyx_n_s_updateSingleIndexTradeDayInfo, __pyx_n_s_updateSingleIndexTradeDayInfo, __pyx_n_s_start_time, __pyx_n_s_index_code, __pyx_n_s_index_name, __pyx_n_s_current_time, __pyx_n_s_key, __pyx_n_s_value); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__167);
  __Pyx_GIVEREF(__pyx_tuple__167);
  __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 16, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateIndexTradeDayToMysql, 1940, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1940, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */
  __pyx_tuple__169 = PyTuple_Pack(22, __pyx_n_s_self, __pyx_n_s_multi_thread, __pyx_n_s_workers, __pyx_n_s_fun_name, __pyx_n_s_table_name, __pyx_n_s_no_fault, __pyx_n_s_exclude_future_list, __pyx_n_s_updated_list, __pyx_n_s_update_dict, __pyx_n_s_dtype_mapping, __pyx_n_s_future_code_name_df, __pyx_n_s_updateSingleFutureTradeDayInfo, __pyx_n_s_updateSingleFutureTradeDayInfo, __pyx_n_s_executor, __pyx_n_s_futures, __pyx_n_s_start_time, __pyx_n_s_index, __pyx_n_s_row, __pyx_n_s_future_code, __pyx_n_s_future_name, __pyx_n_s_future, __pyx_n_s_current_time); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__169);
  __Pyx_GIVEREF(__pyx_tuple__169);
  __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 22, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateFutureTradeDayToMysql, 2045, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 2045, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2178
 * 
 * 
 * def tableTools():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 */
  __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_data_to_mysql); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__171);
  __Pyx_GIVEREF(__pyx_tuple__171);
  __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_tableTools, 2178, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 2178, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2190
 * 
 * 
 * def test():             # <<<<<<<<<<<<<<
 *     start_time = '20240503'
 *     end_time = '20240530'
 */
  __pyx_tuple__173 = PyTuple_Pack(6, __pyx_n_s_start_time, __pyx_n_s_end_time, __pyx_n_s_stock_name, __pyx_n_s_data_to_mysql, __pyx_n_s_start, __pyx_n_s_end); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__173);
  __Pyx_GIVEREF(__pyx_tuple__173);
  __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_test, 2190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 2190, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2260
 * 
 * 
 * def updateStockTables():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     start = time.time()
 */
  __pyx_tuple__175 = PyTuple_Pack(4, __pyx_n_s_data_to_mysql, __pyx_n_s_start, __pyx_n_s_res, __pyx_n_s_end); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_tuple__175);
  __Pyx_GIVEREF(__pyx_tuple__175);
  __pyx_codeobj__176 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__175, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_tbstock_dataAcquisition_saveData, __pyx_n_s_updateStockTables, 2260, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__176)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}
/* #### Code section: init_constants ### */

static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
  __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_keys.method_name = &__pyx_n_s_keys;
  __pyx_umethod_PyDict_Type_values.type = (PyObject*)&PyDict_Type;
  __pyx_umethod_PyDict_Type_values.method_name = &__pyx_n_s_values;
  if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
  __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_0_01 = PyFloat_FromDouble(0.01); if (unlikely(!__pyx_float_0_01)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_10_0 = PyFloat_FromDouble(10.0); if (unlikely(!__pyx_float_10_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_float_100_0 = PyFloat_FromDouble(100.0); if (unlikely(!__pyx_float_100_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_12 = PyInt_FromLong(12); if (unlikely(!__pyx_int_12)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_100 = PyInt_FromLong(100); if (unlikely(!__pyx_int_100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_1900 = PyInt_FromLong(1900); if (unlikely(!__pyx_int_1900)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_2100 = PyInt_FromLong(2100); if (unlikely(!__pyx_int_2100)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  return 0;
  __pyx_L1_error:;
  return -1;
}
/* #### Code section: init_globals ### */

static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
  return 0;
}
/* #### Code section: init_module ### */

static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/

static int __Pyx_modinit_global_init_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
  /*--- Global init code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
  /*--- Variable export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_export_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
  /*--- Function export code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_type_init_code(void) {
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
  /*--- Type init code ---*/
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql)) __PYX_ERR(0, 346, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct__updateStockBasicInfoToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo)) __PYX_ERR(0, 1124, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_1_updateStockTradeDayInfo->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo)) __PYX_ERR(0, 1284, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_2_updateStockIndustryConceptBasicInfo->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo)) __PYX_ERR(0, 1367, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_3_updateStockIndustryConceptTradeDayInfo->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql)) __PYX_ERR(0, 1511, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql) < 0) __PYX_ERR(0, 1511, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql) < 0) __PYX_ERR(0, 1511, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_4_updateStockFinancialToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql)) __PYX_ERR(0, 1634, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql) < 0) __PYX_ERR(0, 1634, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql) < 0) __PYX_ERR(0, 1634, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_5_updateStockHoldNumberToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql)) __PYX_ERR(0, 1811, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_6_updateStockRzrqHsgtTradeDayToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql)) __PYX_ERR(0, 1940, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql) < 0) __PYX_ERR(0, 1940, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql) < 0) __PYX_ERR(0, 1940, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_7_updateIndexTradeDayToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  #if CYTHON_USE_TYPE_SPECS
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql_spec, NULL); if (unlikely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql)) __PYX_ERR(0, 2045, __pyx_L1_error)
  if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql_spec, __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql) < 0) __PYX_ERR(0, 2045, __pyx_L1_error)
  #else
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql = &__pyx_type_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  #endif
  #if !CYTHON_USE_TYPE_SPECS
  if (__Pyx_PyType_Ready(__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql) < 0) __PYX_ERR(0, 2045, __pyx_L1_error)
  #endif
  #if PY_MAJOR_VERSION < 3
  __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql->tp_print = 0;
  #endif
  #if !CYTHON_COMPILING_IN_LIMITED_API
  if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql->tp_dictoffset && __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql->tp_getattro == PyObject_GenericGetAttr)) {
    __pyx_ptype_7tbstock_15dataAcquisition_15saveDataToMysql___pyx_scope_struct_8_updateFutureTradeDayToMysql->tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict;
  }
  #endif
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_modinit_type_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
  /*--- Type import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_variable_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
  /*--- Variable import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}

static int __Pyx_modinit_function_import_code(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
  /*--- Function import code ---*/
  __Pyx_RefNannyFinishContext();
  return 0;
}


#if PY_MAJOR_VERSION >= 3
#if CYTHON_PEP489_MULTI_PHASE_INIT
static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
static int __pyx_pymod_exec_saveDataToMysql(PyObject* module); /*proto*/
static PyModuleDef_Slot __pyx_moduledef_slots[] = {
  {Py_mod_create, (void*)__pyx_pymod_create},
  {Py_mod_exec, (void*)__pyx_pymod_exec_saveDataToMysql},
  {0, NULL}
};
#endif

#ifdef __cplusplus
namespace {
  struct PyModuleDef __pyx_moduledef =
  #else
  static struct PyModuleDef __pyx_moduledef =
  #endif
  {
      PyModuleDef_HEAD_INIT,
      "saveDataToMysql",
      0, /* m_doc */
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      0, /* m_size */
    #elif CYTHON_USE_MODULE_STATE
      sizeof(__pyx_mstate), /* m_size */
    #else
      -1, /* m_size */
    #endif
      __pyx_methods /* m_methods */,
    #if CYTHON_PEP489_MULTI_PHASE_INIT
      __pyx_moduledef_slots, /* m_slots */
    #else
      NULL, /* m_reload */
    #endif
    #if CYTHON_USE_MODULE_STATE
      __pyx_m_traverse, /* m_traverse */
      __pyx_m_clear, /* m_clear */
      NULL /* m_free */
    #else
      NULL, /* m_traverse */
      NULL, /* m_clear */
      NULL /* m_free */
    #endif
  };
  #ifdef __cplusplus
} /* anonymous namespace */
#endif
#endif

#ifndef CYTHON_NO_PYINIT_EXPORT
#define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
#elif PY_MAJOR_VERSION < 3
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" void
#else
#define __Pyx_PyMODINIT_FUNC void
#endif
#else
#ifdef __cplusplus
#define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
#else
#define __Pyx_PyMODINIT_FUNC PyObject *
#endif
#endif


#if PY_MAJOR_VERSION < 3
__Pyx_PyMODINIT_FUNC initsaveDataToMysql(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC initsaveDataToMysql(void)
#else
__Pyx_PyMODINIT_FUNC PyInit_saveDataToMysql(void) CYTHON_SMALL_CODE; /*proto*/
__Pyx_PyMODINIT_FUNC PyInit_saveDataToMysql(void)
#if CYTHON_PEP489_MULTI_PHASE_INIT
{
  return PyModuleDef_Init(&__pyx_moduledef);
}
static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
    #if PY_VERSION_HEX >= 0x030700A1
    static PY_INT64_T main_interpreter_id = -1;
    PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
    if (main_interpreter_id == -1) {
        main_interpreter_id = current_id;
        return (unlikely(current_id == -1)) ? -1 : 0;
    } else if (unlikely(main_interpreter_id != current_id))
    #else
    static PyInterpreterState *main_interpreter = NULL;
    PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
    if (!main_interpreter) {
        main_interpreter = current_interpreter;
    } else if (unlikely(main_interpreter != current_interpreter))
    #endif
    {
        PyErr_SetString(
            PyExc_ImportError,
            "Interpreter change detected - this module can only be loaded into one interpreter per process.");
        return -1;
    }
    return 0;
}
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
#else
static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
#endif
{
    PyObject *value = PyObject_GetAttrString(spec, from_name);
    int result = 0;
    if (likely(value)) {
        if (allow_none || value != Py_None) {
#if CYTHON_COMPILING_IN_LIMITED_API
            result = PyModule_AddObject(module, to_name, value);
#else
            result = PyDict_SetItemString(moddict, to_name, value);
#endif
        }
        Py_DECREF(value);
    } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
        PyErr_Clear();
    } else {
        result = -1;
    }
    return result;
}
static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
    PyObject *module = NULL, *moddict, *modname;
    CYTHON_UNUSED_VAR(def);
    if (__Pyx_check_single_interpreter())
        return NULL;
    if (__pyx_m)
        return __Pyx_NewRef(__pyx_m);
    modname = PyObject_GetAttrString(spec, "name");
    if (unlikely(!modname)) goto bad;
    module = PyModule_NewObject(modname);
    Py_DECREF(modname);
    if (unlikely(!module)) goto bad;
#if CYTHON_COMPILING_IN_LIMITED_API
    moddict = module;
#else
    moddict = PyModule_GetDict(module);
    if (unlikely(!moddict)) goto bad;
#endif
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
    if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
    return module;
bad:
    Py_XDECREF(module);
    return NULL;
}


static CYTHON_SMALL_CODE int __pyx_pymod_exec_saveDataToMysql(PyObject *__pyx_pyinit_module)
#endif
#endif
{
  int stringtab_initialized = 0;
  #if CYTHON_USE_MODULE_STATE
  int pystate_addmodule_run = 0;
  #endif
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  if (__pyx_m) {
    if (__pyx_m == __pyx_pyinit_module) return 0;
    PyErr_SetString(PyExc_RuntimeError, "Module 'saveDataToMysql' has already been imported. Re-initialisation is not supported.");
    return -1;
  }
  #elif PY_MAJOR_VERSION >= 3
  if (__pyx_m) return __Pyx_NewRef(__pyx_m);
  #endif
  /*--- Module creation code ---*/
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  __pyx_m = __pyx_pyinit_module;
  Py_INCREF(__pyx_m);
  #else
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4("saveDataToMysql", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #elif CYTHON_USE_MODULE_STATE
  __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
  {
    int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
    __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "saveDataToMysql" pseudovariable */
    if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    pystate_addmodule_run = 1;
  }
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #endif
  CYTHON_UNUSED_VAR(__pyx_t_1);
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
  Py_INCREF(__pyx_d);
  __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
  if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if CYTHON_REFNANNY
__Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
if (!__Pyx_RefNanny) {
  PyErr_Clear();
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
  if (!__Pyx_RefNanny)
      Py_FatalError("failed to import 'refnanny' module");
}
#endif
  __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_saveDataToMysql(void)", 0);
  if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pxy_PyFrame_Initialize_Offsets
  __Pxy_PyFrame_Initialize_Offsets();
  #endif
  __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
  __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
  #ifdef __Pyx_CyFunction_USED
  if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_AsyncGen_USED
  if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  PyEval_InitThreads();
  #endif
  /*--- Initialize various global constants etc. ---*/
  if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  stringtab_initialized = 1;
  if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif
  if (__pyx_module_is_main_tbstock__dataAcquisition__saveDataToMysql) {
    if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
    if (!PyDict_GetItemString(modules, "tbstock.dataAcquisition.saveDataToMysql")) {
      if (unlikely((PyDict_SetItemString(modules, "tbstock.dataAcquisition.saveDataToMysql", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  /*--- Global type/function init code ---*/
  (void)__Pyx_modinit_global_init_code();
  (void)__Pyx_modinit_variable_export_code();
  (void)__Pyx_modinit_function_export_code();
  if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
  (void)__Pyx_modinit_type_import_code();
  (void)__Pyx_modinit_variable_import_code();
  (void)__Pyx_modinit_function_import_code();
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  #endif

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1
 * import sys             # <<<<<<<<<<<<<<
 * import time
 * from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2
 * import sys
 * import time             # <<<<<<<<<<<<<<
 * from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
 * from datetime import datetime
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_time, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_time, __pyx_t_2) < 0) __PYX_ERR(0, 2, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":3
 * import sys
 * import time
 * from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed             # <<<<<<<<<<<<<<
 * from datetime import datetime
 * 
 */
  __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_ThreadPoolExecutor);
  __Pyx_GIVEREF(__pyx_n_s_ThreadPoolExecutor);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ThreadPoolExecutor)) __PYX_ERR(0, 3, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_ProcessPoolExecutor);
  __Pyx_GIVEREF(__pyx_n_s_ProcessPoolExecutor);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_ProcessPoolExecutor)) __PYX_ERR(0, 3, __pyx_L1_error);
  __Pyx_INCREF(__pyx_n_s_as_completed);
  __Pyx_GIVEREF(__pyx_n_s_as_completed);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_as_completed)) __PYX_ERR(0, 3, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_concurrent_futures, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ThreadPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ThreadPoolExecutor, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_ProcessPoolExecutor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProcessPoolExecutor, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_as_completed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_as_completed, __pyx_t_2) < 0) __PYX_ERR(0, 3, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":4
 * import time
 * from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
 * from datetime import datetime             # <<<<<<<<<<<<<<
 * 
 * import akshare as ak
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s_datetime);
  __Pyx_GIVEREF(__pyx_n_s_datetime);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s_datetime)) __PYX_ERR(0, 4, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_datetime, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_datetime); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_datetime, __pyx_t_3) < 0) __PYX_ERR(0, 4, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":6
 * from datetime import datetime
 * 
 * import akshare as ak             # <<<<<<<<<<<<<<
 * import baostock as bs
 * import numpy as np
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_akshare, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_ak, __pyx_t_2) < 0) __PYX_ERR(0, 6, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":7
 * 
 * import akshare as ak
 * import baostock as bs             # <<<<<<<<<<<<<<
 * import numpy as np
 * import pandas as pd
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_baostock, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_bs, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":8
 * import akshare as ak
 * import baostock as bs
 * import numpy as np             # <<<<<<<<<<<<<<
 * import pandas as pd
 * from tqdm import tqdm
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_numpy, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":9
 * import baostock as bs
 * import numpy as np
 * import pandas as pd             # <<<<<<<<<<<<<<
 * from tqdm import tqdm
 * 
 */
  __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_pandas, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_pd, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":10
 * import numpy as np
 * import pandas as pd
 * from tqdm import tqdm             # <<<<<<<<<<<<<<
 * 
 * import tbstock.dataManagement.dataPreprocess as dataproc
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_tqdm);
  __Pyx_GIVEREF(__pyx_n_s_tqdm);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_tqdm)) __PYX_ERR(0, 10, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_tqdm, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_tqdm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tqdm, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":12
 * from tqdm import tqdm
 * 
 * import tbstock.dataManagement.dataPreprocess as dataproc             # <<<<<<<<<<<<<<
 * from tbstock.dataAcquisition.models import *
 * from tbstock.utils import utils
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_tbstock_dataManagement_dataPrepr, __pyx_tuple__95); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_dataproc, __pyx_t_3) < 0) __PYX_ERR(0, 12, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":13
 * 
 * import tbstock.dataManagement.dataPreprocess as dataproc
 * from tbstock.dataAcquisition.models import *             # <<<<<<<<<<<<<<
 * from tbstock.utils import utils
 * import tbstock.dataAcquisition.stockDataCrawler as sdc
 */
  __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_INCREF(__pyx_n_s__94);
  __Pyx_GIVEREF(__pyx_n_s__94);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_s__94)) __PYX_ERR(0, 13, __pyx_L1_error);
  __pyx_t_2 = __Pyx_Import(__pyx_n_s_tbstock_dataAcquisition_models, __pyx_t_3, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 13, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_import_star(__pyx_t_2) < 0) __PYX_ERR(0, 13, __pyx_L1_error);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":14
 * import tbstock.dataManagement.dataPreprocess as dataproc
 * from tbstock.dataAcquisition.models import *
 * from tbstock.utils import utils             # <<<<<<<<<<<<<<
 * import tbstock.dataAcquisition.stockDataCrawler as sdc
 * 
 */
  __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_INCREF(__pyx_n_s_utils);
  __Pyx_GIVEREF(__pyx_n_s_utils);
  if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_utils)) __PYX_ERR(0, 14, __pyx_L1_error);
  __pyx_t_3 = __Pyx_Import(__pyx_n_s_tbstock_utils, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_utils); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_utils, __pyx_t_2) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":15
 * from tbstock.dataAcquisition.models import *
 * from tbstock.utils import utils
 * import tbstock.dataAcquisition.stockDataCrawler as sdc             # <<<<<<<<<<<<<<
 * 
 * # ##############################################
 */
  __pyx_t_3 = __Pyx_ImportDottedModule(__pyx_n_s_tbstock_dataAcquisition_stockDat, __pyx_tuple__96); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_sdc, __pyx_t_3) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":18
 * 
 * # ##############################################
 * print(f'pandas version: {pd.__version__}')             # <<<<<<<<<<<<<<
 * print(f'akshare version: {ak.__version__}')
 * print(f'baostock version: {bs.__version__}')
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_pandas_version, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 18, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":19
 * # ##############################################
 * print(f'pandas version: {pd.__version__}')
 * print(f'akshare version: {ak.__version__}')             # <<<<<<<<<<<<<<
 * print(f'baostock version: {bs.__version__}')
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_ak); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_akshare_version, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 19, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":20
 * print(f'pandas version: {pd.__version__}')
 * print(f'akshare version: {ak.__version__}')
 * print(f'baostock version: {bs.__version__}')             # <<<<<<<<<<<<<<
 * 
 * test_simple_code = "300416"
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_bs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_version); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_FormatSimple(__pyx_t_2, __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_2 = __Pyx_PyUnicode_Concat(__pyx_kp_u_baostock_version, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 20, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":22
 * print(f'baostock version: {bs.__version__}')
 * 
 * test_simple_code = "300416"             # <<<<<<<<<<<<<<
 * pd.set_option('future.no_silent_downcasting', True)
 * 
 */
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_simple_code, __pyx_kp_s_300416) < 0) __PYX_ERR(0, 22, __pyx_L1_error)

  /* "tbstock/dataAcquisition/saveDataToMysql.py":23
 * 
 * test_simple_code = "300416"
 * pd.set_option('future.no_silent_downcasting', True)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_set_option); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__97, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 23, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":26
 * 
 * 
 * class DataToMysql(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dump_json_period=10):
 *         self.start_date = utils.start_date
 */
  __pyx_t_3 = __Pyx_PEP560_update_bases(__pyx_tuple__99); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_3, __pyx_n_s_DataToMysql_2, __pyx_n_s_DataToMysql_2, (PyObject *) NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_4);
  if (__pyx_t_3 != __pyx_tuple__99) {
    if (unlikely((PyDict_SetItemString(__pyx_t_4, "__orig_bases__", __pyx_tuple__99) < 0))) __PYX_ERR(0, 26, __pyx_L1_error)
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":27
 * 
 * class DataToMysql(object):
 *     def __init__(self, dump_json_period=10):             # <<<<<<<<<<<<<<
 *         self.start_date = utils.start_date
 *         self.today_date = utils.today_date
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_1__init__, 0, __pyx_n_s_DataToMysql___init, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__102);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":56
 *             print("DataToMysql :", self.non_serializable_attrs)
 * 
 *     def dumpJsonToFile(self):             # <<<<<<<<<<<<<<
 *         #  JSON
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_3dumpJsonToFile, 0, __pyx_n_s_DataToMysql_dumpJsonToFile, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__104)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_dumpJsonToFile, __pyx_t_5) < 0) __PYX_ERR(0, 56, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":60
 *         utils.dumpJsonToFile(self.load_json_file, self.update_json, self.json_file_name)
 * 
 *     def updateKzzBasicInfoToMysql(self, table_name='kzz_basic_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_5updateKzzBasicInfoToMysql, 0, __pyx_n_s_DataToMysql_updateKzzBasicInfoTo, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__106)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__107);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateKzzBasicInfoToMysql, __pyx_t_5) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":98
 *         return True
 * 
 *     def updateStockSimpleInfoToMysql(self, table_name='stock_simple_info'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         #
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_7updateStockSimpleInfoToMysql, 0, __pyx_n_s_DataToMysql_updateStockSimpleInf, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__110);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockSimpleInfoToMysql, __pyx_t_5) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":171
 *         return True
 * 
 *     def func_industry(self, stock_code, industry_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         #
 *         if not utils.isAPrimaryBoardStock(stock_code):
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_9func_industry, 0, __pyx_n_s_DataToMysql_func_industry, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__112)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__113);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_func_industry, __pyx_t_5) < 0) __PYX_ERR(0, 171, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":201
 *         return True
 * 
 *     def func_concept(self, stock_code, concept_name, multi_type='single'):             # <<<<<<<<<<<<<<
 *         if not utils.isAPrimaryBoardStock(stock_code):
 *             return True
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_11func_concept, 0, __pyx_n_s_DataToMysql_func_concept, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__113);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_func_concept, __pyx_t_5) < 0) __PYX_ERR(0, 201, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":232
 *         return True
 * 
 *     def updateStockBasicInfoByIndustryConcept(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_industry_basic_infostock_concept_basic_infostock_basic_info
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_13updateStockBasicInfoByIndustryConcept, 0, __pyx_n_s_DataToMysql_updateStockBasicInfo_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__118);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockBasicInfoByIndustryCo, __pyx_t_5) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":346
 *             utils.logger.info(f'The {table_name} table has been updated by update_concept.')
 * 
 *     def updateStockBasicInfoToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         stock_basic_info
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_15updateStockBasicInfoToMysql, 0, __pyx_n_s_DataToMysql_updateStockBasicInfo_3, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__120)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__121);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockBasicInfoToMysql, __pyx_t_5) < 0) __PYX_ERR(0, 346, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":480
 *         self.dumpJsonToFile()
 * 
 *     def getFqFactorByDividend(self, stock_code='689009'):             # <<<<<<<<<<<<<<
 *         dividend_table = 'stock_dividend_info'
 *         temp = pd.DataFrame()
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_17getFqFactorByDividend, 0, __pyx_n_s_DataToMysql_getFqFactorByDividen, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__124);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getFqFactorByDividend, __pyx_t_5) < 0) __PYX_ERR(0, 480, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":553
 *             return False, temp
 * 
 *     def updateStockFqFactorToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_fq_factor'
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_19updateStockFqFactorToMysql, 0, __pyx_n_s_DataToMysql_updateStockFqFactorT, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__126)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__118);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockFqFactorToMysql, __pyx_t_5) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":640
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockFqFactor(self, stock_simple_code, dtype_mapping, multi_type='single') -> (bool, str):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_fq_factor'
 *         stock_full_code = utils.getFullStockCode(stock_simple_code)
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_kp_s_bool_str) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_21updateSingleStockFqFactor, 0, __pyx_n_s_DataToMysql_updateSingleStockFqF, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__128)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__113);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateSingleStockFqFactor, __pyx_t_6) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":723
 *                 local_engine.dispose()
 * 
 *     def updateStockDividendInfoToMysql(self, multi_type='single', workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_23updateStockDividendInfoToMysql, 0, __pyx_n_s_DataToMysql_updateStockDividendI, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__118);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockDividendInfoToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 723, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":817
 *         self.dumpJsonToFile()
 * 
 *     def updateSingleStockDividendInfo(self, stock_code: str, dtype_mapping, multi_type='single'):             # <<<<<<<<<<<<<<
 *         table_name = 'stock_dividend_info'
 *         #
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_stock_code, __pyx_n_s_str) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_25updateSingleStockDividendInfo, 0, __pyx_n_s_DataToMysql_updateSingleStockDiv, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__113);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateSingleStockDividendInfo, __pyx_t_5) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":892
 *                 local_engine.dispose()
 * 
 *     def updateStrategyDict(self, succeed, stock_item, update_dict):             # <<<<<<<<<<<<<<
 *         if succeed:
 *             if stock_item not in update_dict['update_list']:
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_27updateStrategyDict, 0, __pyx_n_s_DataToMysql_updateStrategyDict, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStrategyDict, __pyx_t_5) < 0) __PYX_ERR(0, 892, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":902
 *                 update_dict['failed_list'].append(stock_item)
 * 
 *     def getSuspendedStocks(self) -> list:             # <<<<<<<<<<<<<<
 *         stock_tfp_em_df = ak.stock_tfp_em(date=self.latest_trade_day)
 *         suspended_stock_list = list(stock_tfp_em_df[''])
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_list) < 0) __PYX_ERR(0, 902, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_29getSuspendedStocks, 0, __pyx_n_s_DataToMysql_getSuspendedStocks, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_getSuspendedStocks, __pyx_t_6) < 0) __PYX_ERR(0, 902, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":907
 *         return suspended_stock_list
 * 
 *     def saveHistTradeDayInfoSina(self, simple_stock_code=test_simple_code, start_date='20180101',             # <<<<<<<<<<<<<<
 *                                  end_date='20241230', pre_close_first=0) -> bool:
 *         if utils.startWithDigit(simple_stock_code):
 */
  __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 907, __pyx_L1_error)
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_31saveHistTradeDayInfoSina, 0, __pyx_n_s_DataToMysql_saveHistTradeDayInfo, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (!__Pyx_CyFunction_InitDefaults(__pyx_t_5, sizeof(__pyx_defaults), 1)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_test_simple_code); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_CyFunction_Defaults(__pyx_defaults, __pyx_t_5)->__pyx_arg_simple_stock_code = __pyx_t_7;
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_7 = 0;
  __Pyx_CyFunction_SetDefaultsGetter(__pyx_t_5, __pyx_pf_7tbstock_15dataAcquisition_15saveDataToMysql_6__defaults__);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_5, __pyx_t_6);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_saveHistTradeDayInfoSina, __pyx_t_5) < 0) __PYX_ERR(0, 907, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":985
 *             return False
 * 
 *     def saveHistTradeDayInfoBaostock(self, simple_stock_code, start_date, end_date, pre_close_first=0):             # <<<<<<<<<<<<<<
 *         stock_code = utils.getFullStockCode(simple_stock_code, 'xx.')
 *         start_date = start_date[0:4] + '-' + start_date[4:6] + '-' + start_date[6:]
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_33saveHistTradeDayInfoBaostock, 0, __pyx_n_s_DataToMysql_saveHistTradeDayInfo_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__52);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_saveHistTradeDayInfoBaostock, __pyx_t_5) < 0) __PYX_ERR(0, 985, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1046
 *             return False
 * 
 *     def saveHistTradeDayInfoEm(self, simple_stock_code, start_date, end_date, pre_close_first=0, period="daily"):             # <<<<<<<<<<<<<<
 *         try:
 *             stock_zh_a_hist_em_bfq = ak.stock_zh_a_hist(symbol=simple_stock_code, period=period, start_date=start_date,
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_35saveHistTradeDayInfoEm, 0, __pyx_n_s_DataToMysql_saveHistTradeDayInfo_3, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__142);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_saveHistTradeDayInfoEm, __pyx_t_5) < 0) __PYX_ERR(0, 1046, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1124
 *             return False
 * 
 *     def updateStockTradeDayInfo(self, method='sina', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 *         method='sina':
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_37updateStockTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateStockTradeDayI_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__144)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__145);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockTradeDayInfo, __pyx_t_5) < 0) __PYX_ERR(0, 1124, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1252
 *             bs.logout()  #
 * 
 *     def fixTradeDayNullValue(self):             # <<<<<<<<<<<<<<
 *         '''
 *         null
 */
  __pyx_t_5 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_39fixTradeDayNullValue, 0, __pyx_n_s_DataToMysql_fixTradeDayNullValue, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_fixTradeDayNullValue, __pyx_t_5) < 0) __PYX_ERR(0, 1252, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1284
 *             return False, null_list
 * 
 *     def updateStockIndustryConceptBasicInfo(self, mode='industry', multi_thread=True, workers=12) -> bool:             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if mode == 'industry':
 */
  __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_5);
  if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_return, __pyx_n_s_bool) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_41updateStockIndustryConceptBasicInfo, 0, __pyx_n_s_DataToMysql_updateStockIndustryC_4, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__150);
  __Pyx_CyFunction_SetAnnotationsDict(__pyx_t_6, __pyx_t_5);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockIndustryConceptBasicI, __pyx_t_6) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1367
 *         return True
 * 
 *     def updateStockIndustryConceptTradeDayInfo(self, mode='industry', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         no_fault = True
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_43updateStockIndustryConceptTradeDayInfo, 0, __pyx_n_s_DataToMysql_updateStockIndustryC_5, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__152)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__150);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockIndustryConceptTradeD, __pyx_t_6) < 0) __PYX_ERR(0, 1367, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1501
 *         utils.logger.info(f"update {table_name} finished.")
 * 
 *     def updateStockIndustryInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('industry', False, workers)
 *         if res:
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_45updateStockIndustryInfo, 0, __pyx_n_s_DataToMysql_updateStockIndustryI, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__154)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__121);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockIndustryInfo, __pyx_t_6) < 0) __PYX_ERR(0, 1501, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1506
 *             self.updateStockIndustryConceptTradeDayInfo('industry', multi_thread, workers)
 * 
 *     def updateStockConceptInfo(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         res = self.updateStockIndustryConceptBasicInfo('concept', multi_thread, workers)
 *         if res:
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_47updateStockConceptInfo, 0, __pyx_n_s_DataToMysql_updateStockConceptIn, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__121);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockConceptInfo, __pyx_t_6) < 0) __PYX_ERR(0, 1506, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1511
 *             self.updateStockIndustryConceptTradeDayInfo('concept', multi_thread, workers)
 * 
 *     def updateStockFinancialToMysql(self, mode='report', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         '''
 * 
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_49updateStockFinancialToMysql, 0, __pyx_n_s_DataToMysql_updateStockFinancial_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__158);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockFinancialToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 1511, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1634
 *         self.dumpJsonToFile()
 * 
 *     def updateStockHoldNumberToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'stock_hold_number'
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_51updateStockHoldNumberToMysql, 0, __pyx_n_s_DataToMysql_updateStockHoldNumbe_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__160)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__121);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockHoldNumberToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 1634, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1748
 *         self.dumpJsonToFile()
 * 
 *     def updateRzrqHsgtTradeDayToMysql(self, concept='rzrq'):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         if concept == 'rzrq':  # rzrq
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_53updateRzrqHsgtTradeDayToMysql, 0, __pyx_n_s_DataToMysql_updateRzrqHsgtTradeD, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1748, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__163);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateRzrqHsgtTradeDayToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 1748, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1811
 *             return False
 * 
 *     def updateStockRzrqHsgtTradeDayToMysql(self, concept='rzrq', multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         start_date = datetime.strptime(self.start_date, '%Y%m%d').date()
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_55updateStockRzrqHsgtTradeDayToMysql, 0, __pyx_n_s_DataToMysql_updateStockRzrqHsgtT_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__165)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__166);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateStockRzrqHsgtTradeDayToMys, __pyx_t_6) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1940
 *         self.dumpJsonToFile()
 * 
 *     def updateIndexTradeDayToMysql(self):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'index_trade_day'
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_57updateIndexTradeDayToMysql, 0, __pyx_n_s_DataToMysql_updateIndexTradeDayT_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateIndexTradeDayToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 1940, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2045
 *         self.dumpJsonToFile()
 * 
 *     def updateFutureTradeDayToMysql(self, multi_thread=True, workers=12):             # <<<<<<<<<<<<<<
 *         fun_name = sys._getframe().f_code.co_name
 *         table_name = 'future_trade_day'
 */
  __pyx_t_6 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_11DataToMysql_59updateFutureTradeDayToMysql, 0, __pyx_n_s_DataToMysql_updateFutureTradeDay_2, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_6, __pyx_tuple__121);
  if (__Pyx_SetNameInClass(__pyx_t_4, __pyx_n_s_updateFutureTradeDayToMysql, __pyx_t_6) < 0) __PYX_ERR(0, 2045, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":26
 * 
 * 
 * class DataToMysql(object):             # <<<<<<<<<<<<<<
 *     def __init__(self, dump_json_period=10):
 *         self.start_date = utils.start_date
 */
  __pyx_t_6 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_DataToMysql_2, __pyx_t_3, __pyx_t_4, NULL, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_6);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_DataToMysql_2, __pyx_t_6) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2178
 * 
 * 
 * def tableTools():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     data_to_mysql.dataproc.clearTableContent("stock_trade_day_2018")  #
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_1tableTools, 0, __pyx_n_s_tableTools, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_tableTools, __pyx_t_3) < 0) __PYX_ERR(0, 2178, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2190
 * 
 * 
 * def test():             # <<<<<<<<<<<<<<
 *     start_time = '20240503'
 *     end_time = '20240530'
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_3test, 0, __pyx_n_s_test, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 2190, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2260
 * 
 * 
 * def updateStockTables():             # <<<<<<<<<<<<<<
 *     data_to_mysql = DataToMysql()
 *     start = time.time()
 */
  __pyx_t_3 = __Pyx_CyFunction_New(&__pyx_mdef_7tbstock_15dataAcquisition_15saveDataToMysql_5updateStockTables, 0, __pyx_n_s_updateStockTables, NULL, __pyx_n_s_tbstock_dataAcquisition_saveData_2, __pyx_d, ((PyObject *)__pyx_codeobj__176)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_updateStockTables, __pyx_t_3) < 0) __PYX_ERR(0, 2260, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "tbstock/dataAcquisition/saveDataToMysql.py":2326
 * 
 * 
 * if __name__ == '__main__':             # <<<<<<<<<<<<<<
 *     # test()
 *     updateStockTables()
 */
  __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_n_s_main, Py_EQ)); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 2326, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_8) {

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2328
 * if __name__ == '__main__':
 *     # test()
 *     updateStockTables()             # <<<<<<<<<<<<<<
 */
    __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_updateStockTables); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2328, __pyx_L1_error)
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "tbstock/dataAcquisition/saveDataToMysql.py":2326
 * 
 * 
 * if __name__ == '__main__':             # <<<<<<<<<<<<<<
 *     # test()
 *     updateStockTables()
 */
  }

  /* "tbstock/dataAcquisition/saveDataToMysql.py":1
 * import sys             # <<<<<<<<<<<<<<
 * import time
 * from concurrent.futures import ThreadPoolExecutor, ProcessPoolExecutor, as_completed
 */
  __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_GOTREF(__pyx_t_2);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test_2, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  if (__pyx_m) {
    if (__pyx_d && stringtab_initialized) {
      __Pyx_AddTraceback("init tbstock.dataAcquisition.saveDataToMysql", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    #if !CYTHON_USE_MODULE_STATE
    Py_CLEAR(__pyx_m);
    #else
    Py_DECREF(__pyx_m);
    if (pystate_addmodule_run) {
      PyObject *tp, *value, *tb;
      PyErr_Fetch(&tp, &value, &tb);
      PyState_RemoveModule(&__pyx_moduledef);
      PyErr_Restore(tp, value, tb);
    }
    #endif
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init tbstock.dataAcquisition.saveDataToMysql");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if CYTHON_PEP489_MULTI_PHASE_INIT
  return (__pyx_m != NULL) ? 0 : -1;
  #elif PY_MAJOR_VERSION >= 3
  return __pyx_m;
  #else
  return;
  #endif
}
/* #### Code section: cleanup_globals ### */
/* #### Code section: cleanup_module ### */
/* #### Code section: main_method ### */
/* #### Code section: utility_code_pragmas ### */
#ifdef _MSC_VER
#pragma warning( push )
/* Warning 4127: conditional expression is constant
 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
 * compile-time, so this warning is not useful
 */
#pragma warning( disable : 4127 )
#endif



/* #### Code section: utility_code_def ### */

/* --- Runtime support code --- */
/* Refnanny */
#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule(modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, "RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif

/* PyErrExceptionMatches */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
    int result;
    PyObject *exc_type;
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *current_exception = tstate->current_exception;
    if (unlikely(!current_exception)) return 0;
    exc_type = (PyObject*) Py_TYPE(current_exception);
    if (exc_type == err) return 1;
#else
    exc_type = tstate->curexc_type;
    if (exc_type == err) return 1;
    if (unlikely(!exc_type)) return 0;
#endif
    #if CYTHON_AVOID_BORROWED_REFS
    Py_INCREF(exc_type);
    #endif
    if (unlikely(PyTuple_Check(err))) {
        result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
    } else {
        result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
    }
    #if CYTHON_AVOID_BORROWED_REFS
    Py_DECREF(exc_type);
    #endif
    return result;
}
#endif

/* PyErrFetchRestore */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject *tmp_value;
    assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
    if (value) {
        #if CYTHON_COMPILING_IN_CPYTHON
        if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
        #endif
            PyException_SetTraceback(value, tb);
    }
    tmp_value = tstate->current_exception;
    tstate->current_exception = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
#else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
#if PY_VERSION_HEX >= 0x030C00A6
    PyObject* exc_value;
    exc_value = tstate->current_exception;
    tstate->current_exception = 0;
    *value = exc_value;
    *type = NULL;
    *tb = NULL;
    if (exc_value) {
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        #if CYTHON_COMPILING_IN_CPYTHON
        *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
        Py_XINCREF(*tb);
        #else
        *tb = PyException_GetTraceback(exc_value);
        #endif
    }
#else
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
#endif
}
#endif

/* PyObjectGetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#endif

/* PyObjectGetAttrStrNoError */
#if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
        __Pyx_PyErr_Clear();
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
    PyObject *result;
#if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
    (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
    return result;
#else
#if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
        return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
    }
#endif
    result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
    if (unlikely(!result)) {
        __Pyx_PyObject_GetAttrStr_ClearAttributeError();
    }
    return result;
#endif
}

/* GetBuiltinName */
static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
    if (unlikely(!result) && !PyErr_Occurred()) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

/* TupleAndListFromArray */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
    PyObject *v;
    Py_ssize_t i;
    for (i = 0; i < length; i++) {
        v = dest[i] = src[i];
        Py_INCREF(v);
    }
}
static CYTHON_INLINE PyObject *
__Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        Py_INCREF(__pyx_empty_tuple);
        return __pyx_empty_tuple;
    }
    res = PyTuple_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
    return res;
}
static CYTHON_INLINE PyObject *
__Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
{
    PyObject *res;
    if (n <= 0) {
        return PyList_New(0);
    }
    res = PyList_New(n);
    if (unlikely(res == NULL)) return NULL;
    __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
    return res;
}
#endif

/* BytesEquals */
static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
    if (s1 == s2) {
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        const char *ps1, *ps2;
        Py_ssize_t length = PyBytes_GET_SIZE(s1);
        if (length != PyBytes_GET_SIZE(s2))
            return (equals == Py_NE);
        ps1 = PyBytes_AS_STRING(s1);
        ps2 = PyBytes_AS_STRING(s2);
        if (ps1[0] != ps2[0]) {
            return (equals == Py_NE);
        } else if (length == 1) {
            return (equals == Py_EQ);
        } else {
            int result;
#if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
            Py_hash_t hash1, hash2;
            hash1 = ((PyBytesObject*)s1)->ob_shash;
            hash2 = ((PyBytesObject*)s2)->ob_shash;
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                return (equals == Py_NE);
            }
#endif
            result = memcmp(ps1, ps2, (size_t)length);
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
#endif
}

/* UnicodeEquals */
static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_RichCompareBool(s1, s2, equals);
#else
#if PY_MAJOR_VERSION < 3
    PyObject* owned_ref = NULL;
#endif
    int s1_is_unicode, s2_is_unicode;
    if (s1 == s2) {
        goto return_eq;
    }
    s1_is_unicode = PyUnicode_CheckExact(s1);
    s2_is_unicode = PyUnicode_CheckExact(s2);
#if PY_MAJOR_VERSION < 3
    if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
        owned_ref = PyUnicode_FromObject(s2);
        if (unlikely(!owned_ref))
            return -1;
        s2 = owned_ref;
        s2_is_unicode = 1;
    } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
        owned_ref = PyUnicode_FromObject(s1);
        if (unlikely(!owned_ref))
            return -1;
        s1 = owned_ref;
        s1_is_unicode = 1;
    } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
        return __Pyx_PyBytes_Equals(s1, s2, equals);
    }
#endif
    if (s1_is_unicode & s2_is_unicode) {
        Py_ssize_t length;
        int kind;
        void *data1, *data2;
        if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
            return -1;
        length = __Pyx_PyUnicode_GET_LENGTH(s1);
        if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
            goto return_ne;
        }
#if CYTHON_USE_UNICODE_INTERNALS
        {
            Py_hash_t hash1, hash2;
        #if CYTHON_PEP393_ENABLED
            hash1 = ((PyASCIIObject*)s1)->hash;
            hash2 = ((PyASCIIObject*)s2)->hash;
        #else
            hash1 = ((PyUnicodeObject*)s1)->hash;
            hash2 = ((PyUnicodeObject*)s2)->hash;
        #endif
            if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
                goto return_ne;
            }
        }
#endif
        kind = __Pyx_PyUnicode_KIND(s1);
        if (kind != __Pyx_PyUnicode_KIND(s2)) {
            goto return_ne;
        }
        data1 = __Pyx_PyUnicode_DATA(s1);
        data2 = __Pyx_PyUnicode_DATA(s2);
        if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
            goto return_ne;
        } else if (length == 1) {
            goto return_eq;
        } else {
            int result = memcmp(data1, data2, (size_t)(length * kind));
            #if PY_MAJOR_VERSION < 3
            Py_XDECREF(owned_ref);
            #endif
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & s2_is_unicode) {
        goto return_ne;
    } else if ((s2 == Py_None) & s1_is_unicode) {
        goto return_ne;
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        #if PY_MAJOR_VERSION < 3
        Py_XDECREF(owned_ref);
        #endif
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
return_eq:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_EQ);
return_ne:
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(owned_ref);
    #endif
    return (equals == Py_NE);
#endif
}

/* fastcall */
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
{
    Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
    for (i = 0; i < n; i++)
    {
        if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
    }
    for (i = 0; i < n; i++)
    {
        int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
        if (unlikely(eq != 0)) {
            if (unlikely(eq < 0)) return NULL;
            return kwvalues[i];
        }
    }
    return NULL;
}
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
    Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
    PyObject *dict;
    dict = PyDict_New();
    if (unlikely(!dict))
        return NULL;
    for (i=0; i<nkwargs; i++) {
        PyObject *key = PyTuple_GET_ITEM(kwnames, i);
        if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
            goto bad;
    }
    return dict;
bad:
    Py_DECREF(dict);
    return NULL;
}
#endif
#endif

/* RaiseDoubleKeywords */
static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AsString(kw_name));
        #endif
}

/* ParseKeywords */
static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject *const *kwvalues,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;
    int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
    while (1) {
        Py_XDECREF(key); key = NULL;
        Py_XDECREF(value); value = NULL;
        if (kwds_is_tuple) {
            Py_ssize_t size;
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(kwds);
#else
            size = PyTuple_Size(kwds);
            if (size < 0) goto bad;
#endif
            if (pos >= size) break;
#if CYTHON_AVOID_BORROWED_REFS
            key = __Pyx_PySequence_ITEM(kwds, pos);
            if (!key) goto bad;
#elif CYTHON_ASSUME_SAFE_MACROS
            key = PyTuple_GET_ITEM(kwds, pos);
#else
            key = PyTuple_GetItem(kwds, pos);
            if (!key) goto bad;
#endif
            value = kwvalues[pos];
            pos++;
        }
        else
        {
            if (!PyDict_Next(kwds, &pos, &key, &value)) break;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(key);
#endif
        }
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
            Py_INCREF(value);
            Py_DECREF(key);
#endif
            key = NULL;
            value = NULL;
            continue;
        }
#if !CYTHON_AVOID_BORROWED_REFS
        Py_INCREF(key);
#endif
        Py_INCREF(value);
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key)
                );
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
#if CYTHON_AVOID_BORROWED_REFS
                    value = NULL;
#endif
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    Py_XDECREF(key);
    Py_XDECREF(value);
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    #if PY_MAJOR_VERSION < 3
    PyErr_Format(PyExc_TypeError,
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
    PyErr_Format(PyExc_TypeError,
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    Py_XDECREF(key);
    Py_XDECREF(value);
    return -1;
}

/* RaiseArgTupleInvalid */
static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;
    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

/* PyDictVersioning */
#if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
}
static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
    PyObject **dictptr = NULL;
    Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
    if (offset) {
#if CYTHON_COMPILING_IN_CPYTHON
        dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
#else
        dictptr = _PyObject_GetDictPtr(obj);
#endif
    }
    return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
}
static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
    PyObject *dict = Py_TYPE(obj)->tp_dict;
    if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
        return 0;
    return obj_dict_version == __Pyx_get_object_dict_version(obj);
}
#endif

/* GetModuleGlobalName */
#if CYTHON_USE_DICT_VERSIONS
static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
#else
static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
#endif
{
    PyObject *result;
#if !CYTHON_AVOID_BORROWED_REFS
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
    result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    } else if (unlikely(PyErr_Occurred())) {
        return NULL;
    }
#elif CYTHON_COMPILING_IN_LIMITED_API
    if (unlikely(!__pyx_m)) {
        return NULL;
    }
    result = PyObject_GetAttr(__pyx_m, name);
    if (likely(result)) {
        return result;
    }
#else
    result = PyDict_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
#endif
#else
    result = PyObject_GetItem(__pyx_d, name);
    __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
    if (likely(result)) {
        return __Pyx_NewRef(result);
    }
    PyErr_Clear();
#endif
    return __Pyx_GetBuiltinName(name);
}

/* PyObjectSetAttrStr */
#if CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#endif

/* PyFunctionFastCall */
#if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
                                               PyObject *globals) {
    PyFrameObject *f;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject **fastlocals;
    Py_ssize_t i;
    PyObject *result;
    assert(globals != NULL);
    /* XXX Perhaps we should create a specialized
       PyFrame_New() that doesn't take locals, but does
       take builtins without sanity checking them.
       */
    assert(tstate != NULL);
    f = PyFrame_New(tstate, co, globals, NULL);
    if (f == NULL) {
        return NULL;
    }
    fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
    for (i = 0; i < na; i++) {
        Py_INCREF(*args);
        fastlocals[i] = *args++;
    }
    result = PyEval_EvalFrameEx(f,0);
    ++tstate->recursion_depth;
    Py_DECREF(f);
    --tstate->recursion_depth;
    return result;
}
static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
    PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
    PyObject *globals = PyFunction_GET_GLOBALS(func);
    PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
    PyObject *closure;
#if PY_MAJOR_VERSION >= 3
    PyObject *kwdefs;
#endif
    PyObject *kwtuple, **k;
    PyObject **d;
    Py_ssize_t nd;
    Py_ssize_t nk;
    PyObject *result;
    assert(kwargs == NULL || PyDict_Check(kwargs));
    nk = kwargs ? PyDict_Size(kwargs) : 0;
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
        return NULL;
    }
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
        return NULL;
    }
    #endif
    if (
#if PY_MAJOR_VERSION >= 3
            co->co_kwonlyargcount == 0 &&
#endif
            likely(kwargs == NULL || nk == 0) &&
            co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
        if (argdefs == NULL && co->co_argcount == nargs) {
            result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
            goto done;
        }
        else if (nargs == 0 && argdefs != NULL
                 && co->co_argcount == Py_SIZE(argdefs)) {
            /* function called with no arguments, but all parameters have
               a default value: use default values as arguments .*/
            args = &PyTuple_GET_ITEM(argdefs, 0);
            result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
            goto done;
        }
    }
    if (kwargs != NULL) {
        Py_ssize_t pos, i;
        kwtuple = PyTuple_New(2 * nk);
        if (kwtuple == NULL) {
            result = NULL;
            goto done;
        }
        k = &PyTuple_GET_ITEM(kwtuple, 0);
        pos = i = 0;
        while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
            Py_INCREF(k[i]);
            Py_INCREF(k[i+1]);
            i += 2;
        }
        nk = i / 2;
    }
    else {
        kwtuple = NULL;
        k = NULL;
    }
    closure = PyFunction_GET_CLOSURE(func);
#if PY_MAJOR_VERSION >= 3
    kwdefs = PyFunction_GET_KW_DEFAULTS(func);
#endif
    if (argdefs != NULL) {
        d = &PyTuple_GET_ITEM(argdefs, 0);
        nd = Py_SIZE(argdefs);
    }
    else {
        d = NULL;
        nd = 0;
    }
#if PY_MAJOR_VERSION >= 3
    result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, kwdefs, closure);
#else
    result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
                               args, (int)nargs,
                               k, (int)nk,
                               d, (int)nd, closure);
#endif
    Py_XDECREF(kwtuple);
done:
    Py_LeaveRecursiveCall();
    return result;
}
#endif

/* PyObjectCall */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = Py_TYPE(func)->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectCallMethO */
#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
    self = __Pyx_CyOrPyCFunction_GET_SELF(func);
    #if PY_MAJOR_VERSION < 3
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    #else
    if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
        return NULL;
    #endif
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

/* PyObjectFastCall */
#if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
    PyObject *argstuple;
    PyObject *result = 0;
    size_t i;
    argstuple = PyTuple_New((Py_ssize_t)nargs);
    if (unlikely(!argstuple)) return NULL;
    for (i = 0; i < nargs; i++) {
        Py_INCREF(args[i]);
        if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
    }
    result = __Pyx_PyObject_Call(func, argstuple, kwargs);
  bad:
    Py_DECREF(argstuple);
    return result;
}
#endif
static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
    Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
#if CYTHON_COMPILING_IN_CPYTHON
    if (nargs == 0 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
            return __Pyx_PyObject_CallMethO(func, NULL);
    }
    else if (nargs == 1 && kwargs == NULL) {
        if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
            return __Pyx_PyObject_CallMethO(func, args[0]);
    }
#endif
    #if PY_VERSION_HEX < 0x030800B1
    #if CYTHON_FAST_PYCCALL
    if (PyCFunction_Check(func)) {
        if (kwargs) {
            return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
        } else {
            return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
        }
    }
    #if PY_VERSION_HEX >= 0x030700A1
    if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
        return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
    }
    #endif
    #endif
    #if CYTHON_FAST_PYCALL
    if (PyFunction_Check(func)) {
        return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
    }
    #endif
    #endif
    if (kwargs == NULL) {
        #if CYTHON_VECTORCALL
        #if PY_VERSION_HEX < 0x03090000
        vectorcallfunc f = _PyVectorcall_Function(func);
        #else
        vectorcallfunc f = PyVectorcall_Function(func);
        #endif
        if (f) {
            return f(func, args, (size_t)nargs, NULL);
        }
        #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
        if (__Pyx_CyFunction_CheckExact(func)) {
            __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
            if (f) return f(func, args, (size_t)nargs, NULL);
        }
        #endif
    }
    if (nargs == 0) {
        return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
    }
    #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
    return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
    #else
    return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
    #endif
}

/* RaiseTooManyValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
}

/* RaiseNeedMoreValuesToUnpack */
static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
                 index, (index == 1) ? "" : "s");
}

/* IterFinish */
static CYTHON_INLINE int __Pyx_IterFinish(void) {
    PyObject* exc_type;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    exc_type = __Pyx_PyErr_CurrentExceptionType();
    if (unlikely(exc_type)) {
        if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
            return -1;
        __Pyx_PyErr_Clear();
        return 0;
    }
    return 0;
}

/* UnpackItemEndCheck */
static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    }
    return __Pyx_IterFinish();
}

/* GetItemInt */
static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (unlikely(!j)) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyList_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    Py_ssize_t wrapped_i = i;
    if (wraparound & unlikely(i < 0)) {
        wrapped_i += PyTuple_GET_SIZE(o);
    }
    if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_subscript) {
            PyObject *r, *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return NULL;
            r = mm->mp_subscript(o, key);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return NULL;
                    PyErr_Clear();
                }
            }
            return sm->sq_item(o, i);
        }
    }
#else
    if (is_list || !PyMapping_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

/* PyObjectCallOneArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *args[2] = {NULL, arg};
    return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* ObjectGetItem */
#if CYTHON_USE_TYPE_SLOTS
static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
    PyObject *runerr = NULL;
    Py_ssize_t key_value;
    key_value = __Pyx_PyIndex_AsSsize_t(index);
    if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
        return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
    }
    if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
        __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
        PyErr_Clear();
        PyErr_Format(PyExc_IndexError,
            "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
        __Pyx_DECREF_TypeName(index_type_name);
    }
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
    __Pyx_TypeName obj_type_name;
    if (likely(PyType_Check(obj))) {
        PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
        if (!meth) {
            PyErr_Clear();
        } else {
            PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
            Py_DECREF(meth);
            return result;
        }
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return NULL;
}
static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
    PyTypeObject *tp = Py_TYPE(obj);
    PyMappingMethods *mm = tp->tp_as_mapping;
    PySequenceMethods *sm = tp->tp_as_sequence;
    if (likely(mm && mm->mp_subscript)) {
        return mm->mp_subscript(obj, key);
    }
    if (likely(sm && sm->sq_item)) {
        return __Pyx_PyObject_GetIndex(obj, key);
    }
    return __Pyx_PyObject_GetItem_Slow(obj, key);
}
#endif

/* DictGetItem */
#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred()) {
            if (unlikely(PyTuple_Check(key))) {
                PyObject* args = PyTuple_Pack(1, key);
                if (likely(args)) {
                    PyErr_SetObject(PyExc_KeyError, args);
                    Py_DECREF(args);
                }
            } else {
                PyErr_SetObject(PyExc_KeyError, key);
            }
        }
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#endif

/* JoinPyUnicode */
static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
                                      Py_UCS4 max_char) {
#if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyObject *result_uval;
    int result_ukind, kind_shift;
    Py_ssize_t i, char_pos;
    void *result_udata;
    CYTHON_MAYBE_UNUSED_VAR(max_char);
#if CYTHON_PEP393_ENABLED
    result_uval = PyUnicode_New(result_ulength, max_char);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
    kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_DATA(result_uval);
#else
    result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
    if (unlikely(!result_uval)) return NULL;
    result_ukind = sizeof(Py_UNICODE);
    kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
    result_udata = PyUnicode_AS_UNICODE(result_uval);
#endif
    assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
    char_pos = 0;
    for (i=0; i < value_count; i++) {
        int ukind;
        Py_ssize_t ulength;
        void *udata;
        PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
        if (unlikely(__Pyx_PyUnicode_READY(uval)))
            goto bad;
        ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
        if (unlikely(!ulength))
            continue;
        if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
            goto overflow;
        ukind = __Pyx_PyUnicode_KIND(uval);
        udata = __Pyx_PyUnicode_DATA(uval);
        if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
            memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
        } else {
            #if PY_VERSION_HEX >= 0x030d0000
            if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
            #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
            _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
            #else
            Py_ssize_t j;
            for (j=0; j < ulength; j++) {
                Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
                __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
            }
            #endif
        }
        char_pos += ulength;
    }
    return result_uval;
overflow:
    PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
bad:
    Py_DECREF(result_uval);
    return NULL;
#else
    CYTHON_UNUSED_VAR(max_char);
    CYTHON_UNUSED_VAR(result_ulength);
    CYTHON_UNUSED_VAR(value_count);
    return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
#endif
}

/* GetTopmostException */
#if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
static _PyErr_StackItem *
__Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
{
    _PyErr_StackItem *exc_info = tstate->exc_info;
    while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
           exc_info->previous_item != NULL)
    {
        exc_info = exc_info->previous_item;
    }
    return exc_info;
}
#endif

/* SaveResetException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    PyObject *exc_value = exc_info->exc_value;
    if (exc_value == NULL || exc_value == Py_None) {
        *value = NULL;
        *type = NULL;
        *tb = NULL;
    } else {
        *value = exc_value;
        Py_INCREF(*value);
        *type = (PyObject*) Py_TYPE(exc_value);
        Py_INCREF(*type);
        *tb = PyException_GetTraceback(exc_value);
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
    *type = exc_info->exc_type;
    *value = exc_info->exc_value;
    *tb = exc_info->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #else
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
  #endif
}
static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    PyObject *tmp_value = exc_info->exc_value;
    exc_info->exc_value = value;
    Py_XDECREF(tmp_value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
  #else
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    #if CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = type;
    exc_info->exc_value = value;
    exc_info->exc_traceback = tb;
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
  #endif
}
#endif

/* GetException */
#if CYTHON_FAST_THREAD_STATE
static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
#else
static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
#endif
{
    PyObject *local_type = NULL, *local_value, *local_tb = NULL;
#if CYTHON_FAST_THREAD_STATE
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if PY_VERSION_HEX >= 0x030C00A6
    local_value = tstate->current_exception;
    tstate->current_exception = 0;
    if (likely(local_value)) {
        local_type = (PyObject*) Py_TYPE(local_value);
        Py_INCREF(local_type);
        local_tb = PyException_GetTraceback(local_value);
    }
  #else
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
  #endif
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
    if (unlikely(tstate->current_exception))
#elif CYTHON_FAST_THREAD_STATE
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_FAST_THREAD_STATE
    #if CYTHON_USE_EXC_INFO_STACK
    {
        _PyErr_StackItem *exc_info = tstate->exc_info;
      #if PY_VERSION_HEX >= 0x030B00a4
        tmp_value = exc_info->exc_value;
        exc_info->exc_value = local_value;
        tmp_type = NULL;
        tmp_tb = NULL;
        Py_XDECREF(local_type);
        Py_XDECREF(local_tb);
      #else
        tmp_type = exc_info->exc_type;
        tmp_value = exc_info->exc_value;
        tmp_tb = exc_info->exc_traceback;
        exc_info->exc_type = local_type;
        exc_info->exc_value = local_value;
        exc_info->exc_traceback = local_tb;
      #endif
    }
    #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    #endif
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

/* SwapException */
#if CYTHON_FAST_THREAD_STATE
static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
  #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_value = exc_info->exc_value;
    exc_info->exc_value = *value;
    if (tmp_value == NULL || tmp_value == Py_None) {
        Py_XDECREF(tmp_value);
        tmp_value = NULL;
        tmp_type = NULL;
        tmp_tb = NULL;
    } else {
        tmp_type = (PyObject*) Py_TYPE(tmp_value);
        Py_INCREF(tmp_type);
        #if CYTHON_COMPILING_IN_CPYTHON
        tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
        Py_XINCREF(tmp_tb);
        #else
        tmp_tb = PyException_GetTraceback(tmp_value);
        #endif
    }
  #elif CYTHON_USE_EXC_INFO_STACK
    _PyErr_StackItem *exc_info = tstate->exc_info;
    tmp_type = exc_info->exc_type;
    tmp_value = exc_info->exc_value;
    tmp_tb = exc_info->exc_traceback;
    exc_info->exc_type = *type;
    exc_info->exc_value = *value;
    exc_info->exc_traceback = *tb;
  #else
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = *type;
    tstate->exc_value = *value;
    tstate->exc_traceback = *tb;
  #endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#else
static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}
#endif

/* GetAttr */
static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
#if CYTHON_USE_TYPE_SLOTS
#if PY_MAJOR_VERSION >= 3
    if (likely(PyUnicode_Check(n)))
#else
    if (likely(PyString_Check(n)))
#endif
        return __Pyx_PyObject_GetAttrStr(o, n);
#endif
    return PyObject_GetAttr(o, n);
}

/* Globals */
static PyObject* __Pyx_Globals(void) {
    return __Pyx_NewRef(__pyx_d);
}

/* PyObjectLookupSpecial */
#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
    PyObject *res;
    PyTypeObject *tp = Py_TYPE(obj);
#if PY_MAJOR_VERSION < 3
    if (unlikely(PyInstance_Check(obj)))
        return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
#endif
    res = _PyType_Lookup(tp, attr_name);
    if (likely(res)) {
        descrgetfunc f = Py_TYPE(res)->tp_descr_get;
        if (!f) {
            Py_INCREF(res);
        } else {
            res = f(res, obj, (PyObject *)tp);
        }
    } else if (with_error) {
        PyErr_SetObject(PyExc_AttributeError, attr_name);
    }
    return res;
}
#endif

/* RaiseClosureNameError */
static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
    PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
}

/* UnpackUnboundCMethod */
static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
    PyObject *result;
    PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
    if (unlikely(!selfless_args)) return NULL;
    result = PyObject_Call(method, selfless_args, kwargs);
    Py_DECREF(selfless_args);
    return result;
}
static PyMethodDef __Pyx_UnboundCMethod_Def = {
     "CythonUnboundCMethod",
     __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
     METH_VARARGS | METH_KEYWORDS,
     NULL
};
static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
    PyObject *method;
    method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
    if (unlikely(!method))
        return -1;
    target->method = method;
#if CYTHON_COMPILING_IN_CPYTHON
    #if PY_MAJOR_VERSION >= 3
    if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
    #else
    if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
    #endif
    {
        PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
        target->func = descr->d_method->ml_meth;
        target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
    } else
#endif
#if CYTHON_COMPILING_IN_PYPY
#else
    if (PyCFunction_Check(method))
#endif
    {
        PyObject *self;
        int self_found;
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        self = PyObject_GetAttrString(method, "__self__");
        if (!self) {
            PyErr_Clear();
        }
#else
        self = PyCFunction_GET_SELF(method);
#endif
        self_found = (self && self != Py_None);
#if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
        Py_XDECREF(self);
#endif
        if (self_found) {
            PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
            if (unlikely(!unbound_method)) return -1;
            Py_DECREF(method);
            target->method = unbound_method;
        }
    }
    return 0;
}

/* CallUnboundCMethod0 */
static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
    PyObject *args, *result = NULL;
    if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
#if CYTHON_ASSUME_SAFE_MACROS
    args = PyTuple_New(1);
    if (unlikely(!args)) goto bad;
    Py_INCREF(self);
    PyTuple_SET_ITEM(args, 0, self);
#else
    args = PyTuple_Pack(1, self);
    if (unlikely(!args)) goto bad;
#endif
    result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
    Py_DECREF(args);
bad:
    return result;
}

/* py_dict_values */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_values, d);
    else
        return PyDict_Values(d);
}

/* py_dict_keys */
static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
    if (PY_MAJOR_VERSION >= 3)
        return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
    else
        return PyDict_Keys(d);
}

/* PyObjectCall2Args */
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
    PyObject *args[3] = {NULL, arg1, arg2};
    return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectGetMethod */
static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
    PyObject *attr;
#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
    __Pyx_TypeName type_name;
    PyTypeObject *tp = Py_TYPE(obj);
    PyObject *descr;
    descrgetfunc f = NULL;
    PyObject **dictptr, *dict;
    int meth_found = 0;
    assert (*method == NULL);
    if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
        attr = __Pyx_PyObject_GetAttrStr(obj, name);
        goto try_unpack;
    }
    if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
        return 0;
    }
    descr = _PyType_Lookup(tp, name);
    if (likely(descr != NULL)) {
        Py_INCREF(descr);
#if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
        if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
#elif PY_MAJOR_VERSION >= 3
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
        #endif
#else
        #ifdef __Pyx_CyFunction_USED
        if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
        #else
        if (likely(PyFunction_Check(descr)))
        #endif
#endif
        {
            meth_found = 1;
        } else {
            f = Py_TYPE(descr)->tp_descr_get;
            if (f != NULL && PyDescr_IsData(descr)) {
                attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
                Py_DECREF(descr);
                goto try_unpack;
            }
        }
    }
    dictptr = _PyObject_GetDictPtr(obj);
    if (dictptr != NULL && (dict = *dictptr) != NULL) {
        Py_INCREF(dict);
        attr = __Pyx_PyDict_GetItemStr(dict, name);
        if (attr != NULL) {
            Py_INCREF(attr);
            Py_DECREF(dict);
            Py_XDECREF(descr);
            goto try_unpack;
        }
        Py_DECREF(dict);
    }
    if (meth_found) {
        *method = descr;
        return 1;
    }
    if (f != NULL) {
        attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
        Py_DECREF(descr);
        goto try_unpack;
    }
    if (likely(descr != NULL)) {
        *method = descr;
        return 0;
    }
    type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return 0;
#else
    attr = __Pyx_PyObject_GetAttrStr(obj, name);
    goto try_unpack;
#endif
try_unpack:
#if CYTHON_UNPACK_METHODS
    if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
        PyObject *function = PyMethod_GET_FUNCTION(attr);
        Py_INCREF(function);
        Py_DECREF(attr);
        *method = function;
        return 1;
    }
#endif
    *method = attr;
    return 0;
}

/* PyObjectCallMethod1 */
#if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
    PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
    Py_DECREF(method);
    return result;
}
#endif
static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
#if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
    PyObject *args[2] = {obj, arg};
    (void) __Pyx_PyObject_GetMethod;
    (void) __Pyx_PyObject_CallOneArg;
    (void) __Pyx_PyObject_Call2Args;
    return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
#else
    PyObject *method = NULL, *result;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_Call2Args(method, obj, arg);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) return NULL;
    return __Pyx__PyObject_CallMethod1(method, arg);
#endif
}

/* append */
static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

/* FixUpExtensionType */
#if CYTHON_USE_TYPE_SPECS
static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
#if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    CYTHON_UNUSED_VAR(spec);
    CYTHON_UNUSED_VAR(type);
#else
    const PyType_Slot *slot = spec->slots;
    while (slot && slot->slot && slot->slot != Py_tp_members)
        slot++;
    if (slot && slot->slot == Py_tp_members) {
        int changed = 0;
#if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
        const
#endif
            PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
        while (memb && memb->name) {
            if (memb->name[0] == '_' && memb->name[1] == '_') {
#if PY_VERSION_HEX < 0x030900b1
                if (strcmp(memb->name, "__weaklistoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_weaklistoffset = memb->offset;
                    changed = 1;
                }
                else if (strcmp(memb->name, "__dictoffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
                    type->tp_dictoffset = memb->offset;
                    changed = 1;
                }
#if CYTHON_METH_FASTCALL
                else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
                    assert(memb->type == T_PYSSIZET);
                    assert(memb->flags == READONLY);
#if PY_VERSION_HEX >= 0x030800b4
                    type->tp_vectorcall_offset = memb->offset;
#else
                    type->tp_print = (printfunc) memb->offset;
#endif
                    changed = 1;
                }
#endif
#else
                if ((0));
#endif
#if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
                else if (strcmp(memb->name, "__module__") == 0) {
                    PyObject *descr;
                    assert(memb->type == T_OBJECT);
                    assert(memb->flags == 0 || memb->flags == READONLY);
                    descr = PyDescr_NewMember(type, memb);
                    if (unlikely(!descr))
                        return -1;
                    if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
                        Py_DECREF(descr);
                        return -1;
                    }
                    Py_DECREF(descr);
                    changed = 1;
                }
#endif
            }
            memb++;
        }
        if (changed)
            PyType_Modified(type);
    }
#endif
    return 0;
}
#endif

/* FetchSharedCythonModule */
static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
    return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
}

/* FetchCommonType */
static int __Pyx_VerifyCachedType(PyObject *cached_type,
                               const char *name,
                               Py_ssize_t basicsize,
                               Py_ssize_t expected_basicsize) {
    if (!PyType_Check(cached_type)) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s is not a type object", name);
        return -1;
    }
    if (basicsize != expected_basicsize) {
        PyErr_Format(PyExc_TypeError,
            "Shared Cython type %.200s has the wrong size, try recompiling",
            name);
        return -1;
    }
    return 0;
}
#if !CYTHON_USE_TYPE_SPECS
static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* abi_module;
    const char* object_name;
    PyTypeObject *cached_type = NULL;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    object_name = strrchr(type->tp_name, '.');
    object_name = object_name ? object_name+1 : type->tp_name;
    cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        if (__Pyx_VerifyCachedType(
              (PyObject *)cached_type,
              object_name,
              cached_type->tp_basicsize,
              type->tp_basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    if (PyType_Ready(type) < 0) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
        goto bad;
    Py_INCREF(type);
    cached_type = type;
done:
    Py_DECREF(abi_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#else
static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
    PyObject *abi_module, *cached_type = NULL;
    const char* object_name = strrchr(spec->name, '.');
    object_name = object_name ? object_name+1 : spec->name;
    abi_module = __Pyx_FetchSharedCythonABIModule();
    if (!abi_module) return NULL;
    cached_type = PyObject_GetAttrString(abi_module, object_name);
    if (cached_type) {
        Py_ssize_t basicsize;
#if CYTHON_COMPILING_IN_LIMITED_API
        PyObject *py_basicsize;
        py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
        if (unlikely(!py_basicsize)) goto bad;
        basicsize = PyLong_AsSsize_t(py_basicsize);
        Py_DECREF(py_basicsize);
        py_basicsize = 0;
        if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
#else
        basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
#endif
        if (__Pyx_VerifyCachedType(
              cached_type,
              object_name,
              basicsize,
              spec->basicsize) < 0) {
            goto bad;
        }
        goto done;
    }
    if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
    PyErr_Clear();
    CYTHON_UNUSED_VAR(module);
    cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
    if (unlikely(!cached_type)) goto bad;
    if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
    if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
done:
    Py_DECREF(abi_module);
    assert(cached_type == NULL || PyType_Check(cached_type));
    return (PyTypeObject *) cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}
#endif

/* PyVectorcallFastCallDict */
#if CYTHON_METH_FASTCALL
static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    PyObject *res = NULL;
    PyObject *kwnames;
    PyObject **newargs;
    PyObject **kwvalues;
    Py_ssize_t i, pos;
    size_t j;
    PyObject *key, *value;
    unsigned long keys_are_strings;
    Py_ssize_t nkw = PyDict_GET_SIZE(kw);
    newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
    if (unlikely(newargs == NULL)) {
        PyErr_NoMemory();
        return NULL;
    }
    for (j = 0; j < nargs; j++) newargs[j] = args[j];
    kwnames = PyTuple_New(nkw);
    if (unlikely(kwnames == NULL)) {
        PyMem_Free(newargs);
        return NULL;
    }
    kwvalues = newargs + nargs;
    pos = i = 0;
    keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
    while (PyDict_Next(kw, &pos, &key, &value)) {
        keys_are_strings &= Py_TYPE(key)->tp_flags;
        Py_INCREF(key);
        Py_INCREF(value);
        PyTuple_SET_ITEM(kwnames, i, key);
        kwvalues[i] = value;
        i++;
    }
    if (unlikely(!keys_are_strings)) {
        PyErr_SetString(PyExc_TypeError, "keywords must be strings");
        goto cleanup;
    }
    res = vc(func, newargs, nargs, kwnames);
cleanup:
    Py_DECREF(kwnames);
    for (i = 0; i < nkw; i++)
        Py_DECREF(kwvalues[i]);
    PyMem_Free(newargs);
    return res;
}
static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
{
    if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
        return vc(func, args, nargs, NULL);
    }
    return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
}
#endif

/* CythonFunctionShared */
#if CYTHON_COMPILING_IN_LIMITED_API
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    if (__Pyx_CyFunction_Check(func)) {
        return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
    } else if (PyCFunction_Check(func)) {
        return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
    }
    return 0;
}
#else
static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
    return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
}
#endif
static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    __Pyx_Py_XDECREF_SET(
        __Pyx_CyFunction_GetClassObj(f),
            ((classobj) ? __Pyx_NewRef(classobj) : NULL));
#else
    __Pyx_Py_XDECREF_SET(
        ((PyCMethodObject *) (f))->mm_class,
        (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
#endif
}
static PyObject *
__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
{
    CYTHON_UNUSED_VAR(closure);
    if (unlikely(op->func_doc == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
        if (unlikely(!op->func_doc)) return NULL;
#else
        if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
#if PY_MAJOR_VERSION >= 3
            op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#else
            op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
#endif
            if (unlikely(op->func_doc == NULL))
                return NULL;
        } else {
            Py_INCREF(Py_None);
            return Py_None;
        }
#endif
    }
    Py_INCREF(op->func_doc);
    return op->func_doc;
}
static int
__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (value == NULL) {
        value = Py_None;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_doc, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_name == NULL)) {
#if CYTHON_COMPILING_IN_LIMITED_API
        op->func_name = PyObject_GetAttrString(op->func, "__name__");
#elif PY_MAJOR_VERSION >= 3
        op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#else
        op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
#endif
        if (unlikely(op->func_name == NULL))
            return NULL;
    }
    Py_INCREF(op->func_name);
    return op->func_name;
}
static int
__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_name, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_qualname);
    return op->func_qualname;
}
static int
__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value)))
#else
    if (unlikely(value == NULL || !PyString_Check(value)))
#endif
    {
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_qualname, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(op->func_dict == NULL)) {
        op->func_dict = PyDict_New();
        if (unlikely(op->func_dict == NULL))
            return NULL;
    }
    Py_INCREF(op->func_dict);
    return op->func_dict;
}
static int
__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
{
    CYTHON_UNUSED_VAR(context);
    if (unlikely(value == NULL)) {
        PyErr_SetString(PyExc_TypeError,
               "function's dictionary may not be deleted");
        return -1;
    }
    if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
               "setting function's dictionary to a non-dict");
        return -1;
    }
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_dict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(op->func_globals);
    return op->func_globals;
}
static PyObject *
__Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
{
    CYTHON_UNUSED_VAR(op);
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(Py_None);
    return Py_None;
}
static PyObject *
__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
{
    PyObject* result = (op->func_code) ? op->func_code : Py_None;
    CYTHON_UNUSED_VAR(context);
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
    int result = 0;
    PyObject *res = op->defaults_getter((PyObject *) op);
    if (unlikely(!res))
        return -1;
    #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
    Py_INCREF(op->defaults_tuple);
    op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
    Py_INCREF(op->defaults_kwdict);
    #else
    op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
    if (unlikely(!op->defaults_tuple)) result = -1;
    else {
        op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
        if (unlikely(!op->defaults_kwdict)) result = -1;
    }
    #endif
    Py_DECREF(res);
    return result;
}
static int
__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__defaults__ must be set to a tuple object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_tuple;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_tuple;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value) {
        value = Py_None;
    } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__kwdefaults__ must be set to a dict object");
        return -1;
    }
    PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
                 "currently affect the values used in function calls", 1);
    Py_INCREF(value);
    __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->defaults_kwdict;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        if (op->defaults_getter) {
            if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
            result = op->defaults_kwdict;
        } else {
            result = Py_None;
        }
    }
    Py_INCREF(result);
    return result;
}
static int
__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    if (!value || value == Py_None) {
        value = NULL;
    } else if (unlikely(!PyDict_Check(value))) {
        PyErr_SetString(PyExc_TypeError,
                        "__annotations__ must be set to a dict object");
        return -1;
    }
    Py_XINCREF(value);
    __Pyx_Py_XDECREF_SET(op->func_annotations, value);
    return 0;
}
static PyObject *
__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
    PyObject* result = op->func_annotations;
    CYTHON_UNUSED_VAR(context);
    if (unlikely(!result)) {
        result = PyDict_New();
        if (unlikely(!result)) return NULL;
        op->func_annotations = result;
    }
    Py_INCREF(result);
    return result;
}
static PyObject *
__Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
    int is_coroutine;
    CYTHON_UNUSED_VAR(context);
    if (op->func_is_coroutine) {
        return __Pyx_NewRef(op->func_is_coroutine);
    }
    is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
#if PY_VERSION_HEX >= 0x03050000
    if (is_coroutine) {
        PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
        fromlist = PyList_New(1);
        if (unlikely(!fromlist)) return NULL;
        Py_INCREF(marker);
#if CYTHON_ASSUME_SAFE_MACROS
        PyList_SET_ITEM(fromlist, 0, marker);
#else
        if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
            Py_DECREF(marker);
            Py_DECREF(fromlist);
            return NULL;
        }
#endif
        module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
        Py_DECREF(fromlist);
        if (unlikely(!module)) goto ignore;
        op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
        Py_DECREF(module);
        if (likely(op->func_is_coroutine)) {
            return __Pyx_NewRef(op->func_is_coroutine);
        }
ignore:
        PyErr_Clear();
    }
#endif
    op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
    return __Pyx_NewRef(op->func_is_coroutine);
}
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *
__Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_GetAttrString(op->func, "__module__");
}
static int
__Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
    CYTHON_UNUSED_VAR(context);
    return PyObject_SetAttrString(op->func, "__module__", value);
}
#endif
static PyGetSetDef __pyx_CyFunction_getsets[] = {
    {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "__doc__",  (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
    {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
    {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
    {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
    {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
    {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
    {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
    {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
    {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
    {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
    {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
#if CYTHON_COMPILING_IN_LIMITED_API
    {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
#endif
    {0, 0, 0, 0, 0}
};
static PyMemberDef __pyx_CyFunction_members[] = {
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
#endif
#if CYTHON_USE_TYPE_SPECS
    {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
#if CYTHON_METH_FASTCALL
#if CYTHON_BACKPORT_VECTORCALL
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
#else
#if !CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
#endif
#endif
#endif
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
#else
    {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
#endif
#endif
    {0, 0, 0,  0, 0}
};
static PyObject *
__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
{
    CYTHON_UNUSED_VAR(args);
#if PY_MAJOR_VERSION >= 3
    Py_INCREF(m->func_qualname);
    return m->func_qualname;
#else
    return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
#endif
}
static PyMethodDef __pyx_CyFunction_methods[] = {
    {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
    {0, 0, 0, 0}
};
#if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
#else
#define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
#endif
static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
                                       PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
#if !CYTHON_COMPILING_IN_LIMITED_API
    PyCFunctionObject *cf = (PyCFunctionObject*) op;
#endif
    if (unlikely(op == NULL))
        return NULL;
#if CYTHON_COMPILING_IN_LIMITED_API
    op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
    if (unlikely(!op->func)) return NULL;
#endif
    op->flags = flags;
    __Pyx_CyFunction_weakreflist(op) = NULL;
#if !CYTHON_COMPILING_IN_LIMITED_API
    cf->m_ml = ml;
    cf->m_self = (PyObject *) op;
#endif
    Py_XINCREF(closure);
    op->func_closure = closure;
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_XINCREF(module);
    cf->m_module = module;
#endif
    op->func_dict = NULL;
    op->func_name = NULL;
    Py_INCREF(qualname);
    op->func_qualname = qualname;
    op->func_doc = NULL;
#if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
    op->func_classobj = NULL;
#else
    ((PyCMethodObject*)op)->mm_class = NULL;
#endif
    op->func_globals = globals;
    Py_INCREF(op->func_globals);
    Py_XINCREF(code);
    op->func_code = code;
    op->defaults_pyobjects = 0;
    op->defaults_size = 0;
    op->defaults = NULL;
    op->defaults_tuple = NULL;
    op->defaults_kwdict = NULL;
    op->defaults_getter = NULL;
    op->func_annotations = NULL;
    op->func_is_coroutine = NULL;
#if CYTHON_METH_FASTCALL
    switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
    case METH_NOARGS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
        break;
    case METH_O:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
        break;
    case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
        break;
    case METH_FASTCALL | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
        break;
    case METH_VARARGS | METH_KEYWORDS:
        __Pyx_CyFunction_func_vectorcall(op) = NULL;
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        Py_DECREF(op);
        return NULL;
    }
#endif
    return (PyObject *) op;
}
static int
__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
{
    Py_CLEAR(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_CLEAR(m->func);
#else
    Py_CLEAR(((PyCFunctionObject*)m)->m_module);
#endif
    Py_CLEAR(m->func_dict);
    Py_CLEAR(m->func_name);
    Py_CLEAR(m->func_qualname);
    Py_CLEAR(m->func_doc);
    Py_CLEAR(m->func_globals);
    Py_CLEAR(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
#if PY_VERSION_HEX < 0x030900B1
    Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
#else
    {
        PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
        ((PyCMethodObject *) (m))->mm_class = NULL;
        Py_XDECREF(cls);
    }
#endif
#endif
    Py_CLEAR(m->defaults_tuple);
    Py_CLEAR(m->defaults_kwdict);
    Py_CLEAR(m->func_annotations);
    Py_CLEAR(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_XDECREF(pydefaults[i]);
        PyObject_Free(m->defaults);
        m->defaults = NULL;
    }
    return 0;
}
static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    if (__Pyx_CyFunction_weakreflist(m) != NULL)
        PyObject_ClearWeakRefs((PyObject *) m);
    __Pyx_CyFunction_clear(m);
    __Pyx_PyHeapTypeObject_GC_Del(m);
}
static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
{
    PyObject_GC_UnTrack(m);
    __Pyx__CyFunction_dealloc(m);
}
static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
{
    Py_VISIT(m->func_closure);
#if CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(m->func);
#else
    Py_VISIT(((PyCFunctionObject*)m)->m_module);
#endif
    Py_VISIT(m->func_dict);
    Py_VISIT(m->func_name);
    Py_VISIT(m->func_qualname);
    Py_VISIT(m->func_doc);
    Py_VISIT(m->func_globals);
    Py_VISIT(m->func_code);
#if !CYTHON_COMPILING_IN_LIMITED_API
    Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
#endif
    Py_VISIT(m->defaults_tuple);
    Py_VISIT(m->defaults_kwdict);
    Py_VISIT(m->func_is_coroutine);
    if (m->defaults) {
        PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
        int i;
        for (i = 0; i < m->defaults_pyobjects; i++)
            Py_VISIT(pydefaults[i]);
    }
    return 0;
}
static PyObject*
__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
{
#if PY_MAJOR_VERSION >= 3
    return PyUnicode_FromFormat("<cyfunction %U at %p>",
                                op->func_qualname, (void *)op);
#else
    return PyString_FromFormat("<cyfunction %s at %p>",
                               PyString_AsString(op->func_qualname), (void *)op);
#endif
}
static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
#if CYTHON_COMPILING_IN_LIMITED_API
    PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
    PyObject *py_name = NULL;
    PyCFunction meth;
    int flags;
    meth = PyCFunction_GetFunction(f);
    if (unlikely(!meth)) return NULL;
    flags = PyCFunction_GetFlags(f);
    if (unlikely(flags < 0)) return NULL;
#else
    PyCFunctionObject* f = (PyCFunctionObject*)func;
    PyCFunction meth = f->m_ml->ml_meth;
    int flags = f->m_ml->ml_flags;
#endif
    Py_ssize_t size;
    switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
    case METH_VARARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0))
            return (*meth)(self, arg);
        break;
    case METH_VARARGS | METH_KEYWORDS:
        return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
    case METH_NOARGS:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 0))
                return (*meth)(self, NULL);
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    case METH_O:
        if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
#if CYTHON_ASSUME_SAFE_MACROS
            size = PyTuple_GET_SIZE(arg);
#else
            size = PyTuple_Size(arg);
            if (unlikely(size < 0)) return NULL;
#endif
            if (likely(size == 1)) {
                PyObject *result, *arg0;
                #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
                arg0 = PyTuple_GET_ITEM(arg, 0);
                #else
                arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
                #endif
                result = (*meth)(self, arg0);
                #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
                Py_DECREF(arg0);
                #endif
                return result;
            }
#if CYTHON_COMPILING_IN_LIMITED_API
            py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
            if (!py_name) return NULL;
            PyErr_Format(PyExc_TypeError,
                "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                py_name, size);
            Py_DECREF(py_name);
#else
            PyErr_Format(PyExc_TypeError,
                "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
                f->m_ml->ml_name, size);
#endif
            return NULL;
        }
        break;
    default:
        PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
        return NULL;
    }
#if CYTHON_COMPILING_IN_LIMITED_API
    py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
    if (!py_name) return NULL;
    PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
                 py_name);
    Py_DECREF(py_name);
#else
    PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
                 f->m_ml->ml_name);
#endif
    return NULL;
}
static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *self, *result;
#if CYTHON_COMPILING_IN_LIMITED_API
    self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
    if (unlikely(!self) && PyErr_Occurred()) return NULL;
#else
    self = ((PyCFunctionObject*)func)->m_self;
#endif
    result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
    return result;
}
static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
    PyObject *result;
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
#if CYTHON_METH_FASTCALL
     __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
    if (vc) {
#if CYTHON_ASSUME_SAFE_MACROS
        return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
#else
        (void) &__Pyx_PyVectorcall_FastCallDict;
        return PyVectorcall_Call(func, args, kw);
#endif
    }
#endif
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        Py_ssize_t argc;
        PyObject *new_args;
        PyObject *self;
#if CYTHON_ASSUME_SAFE_MACROS
        argc = PyTuple_GET_SIZE(args);
#else
        argc = PyTuple_Size(args);
        if (unlikely(!argc) < 0) return NULL;
#endif
        new_args = PyTuple_GetSlice(args, 1, argc);
        if (unlikely(!new_args))
            return NULL;
        self = PyTuple_GetItem(args, 0);
        if (unlikely(!self)) {
            Py_DECREF(new_args);
#if PY_MAJOR_VERSION > 2
            PyErr_Format(PyExc_TypeError,
                         "unbound method %.200S() needs an argument",
                         cyfunc->func_qualname);
#else
            PyErr_SetString(PyExc_TypeError,
                            "unbound method needs an argument");
#endif
            return NULL;
        }
        result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
        Py_DECREF(new_args);
    } else {
        result = __Pyx_CyFunction_Call(func, args, kw);
    }
    return result;
}
#if CYTHON_METH_FASTCALL
static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
{
    int ret = 0;
    if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
        if (unlikely(nargs < 1)) {
            PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
                         ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
            return -1;
        }
        ret = 1;
    }
    if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
        PyErr_Format(PyExc_TypeError,
                     "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
        return -1;
    }
    return ret;
}
static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 0)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, NULL);
}
static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    if (unlikely(nargs != 1)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
            def->ml_name, nargs);
        return NULL;
    }
    return def->ml_meth(self, args[0]);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
}
static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
{
    __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
    PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
    PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
#if CYTHON_BACKPORT_VECTORCALL
    Py_ssize_t nargs = (Py_ssize_t)nargsf;
#else
    Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
#endif
    PyObject *self;
    switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
    case 1:
        self = args[0];
        args += 1;
        nargs -= 1;
        break;
    case 0:
        self = ((PyCFunctionObject*)cyfunc)->m_self;
        break;
    default:
        return NULL;
    }
    return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
}
#endif
#if CYTHON_USE_TYPE_SPECS
static PyType_Slot __pyx_CyFunctionType_slots[] = {
    {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
    {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
    {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
    {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
    {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
    {Py_tp_methods, (void *)__pyx_CyFunction_methods},
    {Py_tp_members, (void *)__pyx_CyFunction_members},
    {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
    {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
    {0, 0},
};
static PyType_Spec __pyx_CyFunctionType_spec = {
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    __pyx_CyFunctionType_slots
};
#else
static PyTypeObject __pyx_CyFunctionType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
    sizeof(__pyx_CyFunctionObject),
    0,
    (destructor) __Pyx_CyFunction_dealloc,
#if !CYTHON_METH_FASTCALL
    0,
#elif CYTHON_BACKPORT_VECTORCALL
    (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
#else
    offsetof(PyCFunctionObject, vectorcall),
#endif
    0,
    0,
#if PY_MAJOR_VERSION < 3
    0,
#else
    0,
#endif
    (reprfunc) __Pyx_CyFunction_repr,
    0,
    0,
    0,
    0,
    __Pyx_CyFunction_CallAsMethod,
    0,
    0,
    0,
    0,
#ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
    Py_TPFLAGS_METHOD_DESCRIPTOR |
#endif
#if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
    _Py_TPFLAGS_HAVE_VECTORCALL |
#endif
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
    0,
    (traverseproc) __Pyx_CyFunction_traverse,
    (inquiry) __Pyx_CyFunction_clear,
    0,
#if PY_VERSION_HEX < 0x030500A0
    offsetof(__pyx_CyFunctionObject, func_weakreflist),
#else
    offsetof(PyCFunctionObject, m_weakreflist),
#endif
    0,
    0,
    __pyx_CyFunction_methods,
    __pyx_CyFunction_members,
    __pyx_CyFunction_getsets,
    0,
    0,
    __Pyx_PyMethod_New,
    0,
    offsetof(__pyx_CyFunctionObject, func_dict),
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#endif
#if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
    0,
#endif
#if __PYX_NEED_TP_PRINT_SLOT
    0,
#endif
#if PY_VERSION_HEX >= 0x030C0000
    0,
#endif
#if PY_VERSION_HEX >= 0x030d00A4
    0,
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
    0,
#endif
};
#endif
static int __pyx_CyFunction_init(PyObject *module) {
#if CYTHON_USE_TYPE_SPECS
    __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
#else
    CYTHON_UNUSED_VAR(module);
    __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
#endif
    if (unlikely(__pyx_CyFunctionType == NULL)) {
        return -1;
    }
    return 0;
}
static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults = PyObject_Malloc(size);
    if (unlikely(!m->defaults))
        return PyErr_NoMemory();
    memset(m->defaults, 0, size);
    m->defaults_pyobjects = pyobjects;
    m->defaults_size = size;
    return m->defaults;
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_tuple = tuple;
    Py_INCREF(tuple);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->defaults_kwdict = dict;
    Py_INCREF(dict);
}
static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
    __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
    m->func_annotations = dict;
    Py_INCREF(dict);
}

/* CythonFunction */
static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
                                      PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
    PyObject *op = __Pyx_CyFunction_Init(
        PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
        ml, flags, qualname, closure, module, globals, code
    );
    if (likely(op)) {
        PyObject_GC_Track(op);
    }
    return op;
}

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddCObj(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double a = floatval;
    double b, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op2))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        b = __pyx_PyFloat_AsDouble(op2);
#else
        b = PyFloat_AS_DOUBLE(op2);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op2))) {
        b = (double) PyInt_AS_LONG(op2);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op2))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op2)) {
            b = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op2)) {
            b = (double) __Pyx_PyLong_CompactValue(op2);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op2);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op2);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        b = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        b = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        b = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (b < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                b = -b;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    b = PyLong_AsDouble(op2);
                    if (unlikely(b == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
    }
        PyFPE_START_PROTECT("add", return NULL)
        result = a + b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_TrueDivideObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
            if (8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53))) {
                return PyFloat_FromDouble((double)a / (double)b);
            }
            return PyInt_Type.tp_as_number->nb_true_divide(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT && 1 * PyLong_SHIFT < 53) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT && 2 * PyLong_SHIFT < 53) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT && 3 * PyLong_SHIFT < 53) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            }
        }
                if ((8 * sizeof(long) <= 53 || likely(labs(a) <= ((PY_LONG_LONG)1 << 53)))
                        || __Pyx_PyLong_DigitCount(op1) <= 52 / PyLong_SHIFT) {
                    return PyFloat_FromDouble((double)a / (double)b);
                }
                return PyLong_Type.tp_as_number->nb_true_divide(op1, op2);
            return PyLong_FromLong(x);
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("divide", return NULL)
            result = ((double)a) / (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
}
#endif

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_AddObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
    }
        PyFPE_START_PROTECT("add", return NULL)
        result = a + b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long x;
        long a = PyInt_AS_LONG(op1);
        
            x = (long)((unsigned long)a + (unsigned long)b);
            if (likely((x^a) >= 0 || (x^b) >= 0))
                return PyInt_FromLong(x);
            return PyLong_Type.tp_as_number->nb_add(op1, op2);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op2);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
            }
        }
                x = a + b;
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla + llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("add", return NULL)
            result = ((double)a) + (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
}
#endif

/* SetItemInt */
static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
    int r;
    if (unlikely(!j)) return -1;
    r = PyObject_SetItem(o, j, v);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
                                               CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
        if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) {
            PyObject* old = PyList_GET_ITEM(o, n);
            Py_INCREF(v);
            PyList_SET_ITEM(o, n, v);
            Py_DECREF(old);
            return 1;
        }
    } else {
        PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
        PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
        if (mm && mm->mp_ass_subscript) {
            int r;
            PyObject *key = PyInt_FromSsize_t(i);
            if (unlikely(!key)) return -1;
            r = mm->mp_ass_subscript(o, key, v);
            Py_DECREF(key);
            return r;
        }
        if (likely(sm && sm->sq_ass_item)) {
            if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
                Py_ssize_t l = sm->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                        return -1;
                    PyErr_Clear();
                }
            }
            return sm->sq_ass_item(o, i, v);
        }
    }
#else
    if (is_list || !PyMapping_Check(o))
    {
        return PySequence_SetItem(o, i, v);
    }
#endif
    return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
}

/* RaiseUnboundLocalError */
static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
    PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
}

/* ArgTypeTest */
static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
{
    __Pyx_TypeName type_name;
    __Pyx_TypeName obj_type_name;
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    else if (exact) {
        #if PY_MAJOR_VERSION == 2
        if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(__Pyx_TypeCheck(obj, type))) return 1;
    }
    type_name = __Pyx_PyType_GetName(type);
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
        ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
    __Pyx_DECREF_TypeName(type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* SliceObject */
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
        Py_ssize_t cstart, Py_ssize_t cstop,
        PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
        int has_cstart, int has_cstop, int wraparound) {
    __Pyx_TypeName obj_type_name;
#if CYTHON_USE_TYPE_SLOTS
    PyMappingMethods* mp;
#if PY_MAJOR_VERSION < 3
    PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
    if (likely(ms && ms->sq_slice)) {
        if (!has_cstart) {
            if (_py_start && (*_py_start != Py_None)) {
                cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
                if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstart = 0;
        }
        if (!has_cstop) {
            if (_py_stop && (*_py_stop != Py_None)) {
                cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
                if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
            } else
                cstop = PY_SSIZE_T_MAX;
        }
        if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
            Py_ssize_t l = ms->sq_length(obj);
            if (likely(l >= 0)) {
                if (cstop < 0) {
                    cstop += l;
                    if (cstop < 0) cstop = 0;
                }
                if (cstart < 0) {
                    cstart += l;
                    if (cstart < 0) cstart = 0;
                }
            } else {
                if (!PyErr_ExceptionMatches(PyExc_OverflowError))
                    goto bad;
                PyErr_Clear();
            }
        }
        return ms->sq_slice(obj, cstart, cstop);
    }
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    mp = Py_TYPE(obj)->tp_as_mapping;
    if (likely(mp && mp->mp_subscript))
#else
    CYTHON_UNUSED_VAR(wraparound);
#endif
    {
        PyObject* result;
        PyObject *py_slice, *py_start, *py_stop;
        if (_py_slice) {
            py_slice = *_py_slice;
        } else {
            PyObject* owned_start = NULL;
            PyObject* owned_stop = NULL;
            if (_py_start) {
                py_start = *_py_start;
            } else {
                if (has_cstart) {
                    owned_start = py_start = PyInt_FromSsize_t(cstart);
                    if (unlikely(!py_start)) goto bad;
                } else
                    py_start = Py_None;
            }
            if (_py_stop) {
                py_stop = *_py_stop;
            } else {
                if (has_cstop) {
                    owned_stop = py_stop = PyInt_FromSsize_t(cstop);
                    if (unlikely(!py_stop)) {
                        Py_XDECREF(owned_start);
                        goto bad;
                    }
                } else
                    py_stop = Py_None;
            }
            py_slice = PySlice_New(py_start, py_stop, Py_None);
            Py_XDECREF(owned_start);
            Py_XDECREF(owned_stop);
            if (unlikely(!py_slice)) goto bad;
        }
#if CYTHON_USE_TYPE_SLOTS
        result = mp->mp_subscript(obj, py_slice);
#else
        result = PyObject_GetItem(obj, py_slice);
#endif
        if (!_py_slice) {
            Py_DECREF(py_slice);
        }
        return result;
    }
    obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError,
        "'" __Pyx_FMT_TYPENAME "' object is unsliceable", obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
bad:
    return NULL;
}

/* PyFloatBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyFloat_TrueDivideObjC(PyObject *op1, PyObject *op2, double floatval, int inplace, int zerodivision_check) {
    const double b = floatval;
    double a, result;
    CYTHON_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    if (likely(PyFloat_CheckExact(op1))) {
#if CYTHON_COMPILING_IN_LIMITED_API
        a = __pyx_PyFloat_AsDouble(op1);
#else
        a = PyFloat_AS_DOUBLE(op1);
#endif
        
    } else
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        a = (double) PyInt_AS_LONG(op1);
        
    } else
    #endif
    if (likely(PyLong_CheckExact(op1))) {
        #if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsZero(op1)) {
            a = 0.0;
            
        } else if (__Pyx_PyLong_IsCompact(op1)) {
            a = (double) __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                case 2:
                    if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (1 * PyLong_SHIFT < 53))) {
                        a = (double) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -2)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                case 3:
                    if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (2 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -3)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                case 4:
                    if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT && ((8 * sizeof(unsigned long) < 53) || (3 * PyLong_SHIFT < 53))) {
                        a = (double) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        if ((8 * sizeof(unsigned long) < 53) || (4 * PyLong_SHIFT < 53) || (a < (double) ((PY_LONG_LONG)1 << 53))) {
                            if (size == -4)
                                a = -a;
                            break;
                        }
                    }
                    CYTHON_FALLTHROUGH;
                default:
        #endif
                    a = PyLong_AsDouble(op1);
                    if (unlikely(a == -1.0 && PyErr_Occurred())) return NULL;
        #if CYTHON_USE_PYLONG_INTERNALS
            }
        }
        #endif
    } else {
        return (inplace ? PyNumber_InPlaceTrueDivide : PyNumber_TrueDivide)(op1, op2);
    }
        PyFPE_START_PROTECT("divide", return NULL)
        result = a / b;
        PyFPE_END_PROTECT(result)
        return PyFloat_FromDouble(result);
}
#endif

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolNeObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 0;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a != b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) != 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 1;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 1;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal != 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a != (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_NE));
}

/* PyIntCompare */
static CYTHON_INLINE int __Pyx_PyInt_BoolEqObjC(PyObject *op1, PyObject *op2, long intval, long inplace) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_UNUSED_VAR(inplace);
    if (op1 == op2) {
        return 1;
    }
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        return (a == b);
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        int unequal;
        unsigned long uintval;
        Py_ssize_t size = __Pyx_PyLong_DigitCount(op1);
        const digit* digits = __Pyx_PyLong_Digits(op1);
        if (intval == 0) {
            return (__Pyx_PyLong_IsZero(op1) == 1);
        } else if (intval < 0) {
            if (__Pyx_PyLong_IsNonNeg(op1))
                return 0;
            intval = -intval;
        } else {
            if (__Pyx_PyLong_IsNeg(op1))
                return 0;
        }
        uintval = (unsigned long) intval;
#if PyLong_SHIFT * 4 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 4)) {
            unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 3 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 3)) {
            unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 2 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 2)) {
            unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
#if PyLong_SHIFT * 1 < SIZEOF_LONG*8
        if (uintval >> (PyLong_SHIFT * 1)) {
            unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK))
                 | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK));
        } else
#endif
            unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK));
        return (unequal == 0);
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
        return ((double)a == (double)b);
    }
    return __Pyx_PyObject_IsTrueAndDecref(
        PyObject_RichCompare(op1, op2, Py_EQ));
}

/* PyObjectCallNoArg */
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
    PyObject *arg[2] = {NULL, NULL};
    return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
}

/* PyObjectCallMethod0 */
static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
    PyObject *method = NULL, *result = NULL;
    int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
    if (likely(is_method)) {
        result = __Pyx_PyObject_CallOneArg(method, obj);
        Py_DECREF(method);
        return result;
    }
    if (unlikely(!method)) goto bad;
    result = __Pyx_PyObject_CallNoArg(method);
    Py_DECREF(method);
bad:
    return result;
}

/* RaiseNoneIterError */
static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
}

/* UnpackTupleError */
static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) {
    if (t == Py_None) {
      __Pyx_RaiseNoneNotIterableError();
    } else if (PyTuple_GET_SIZE(t) < index) {
      __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(t));
    } else {
      __Pyx_RaiseTooManyValuesError(index);
    }
}

/* UnpackTuple2 */
static CYTHON_INLINE int __Pyx_unpack_tuple2_exact(
        PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) {
    PyObject *value1 = NULL, *value2 = NULL;
#if CYTHON_COMPILING_IN_PYPY
    value1 = PySequence_ITEM(tuple, 0);  if (unlikely(!value1)) goto bad;
    value2 = PySequence_ITEM(tuple, 1);  if (unlikely(!value2)) goto bad;
#else
    value1 = PyTuple_GET_ITEM(tuple, 0);  Py_INCREF(value1);
    value2 = PyTuple_GET_ITEM(tuple, 1);  Py_INCREF(value2);
#endif
    if (decref_tuple) {
        Py_DECREF(tuple);
    }
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
#if CYTHON_COMPILING_IN_PYPY
bad:
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
#endif
}
static int __Pyx_unpack_tuple2_generic(PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2,
                                       int has_known_size, int decref_tuple) {
    Py_ssize_t index;
    PyObject *value1 = NULL, *value2 = NULL, *iter = NULL;
    iternextfunc iternext;
    iter = PyObject_GetIter(tuple);
    if (unlikely(!iter)) goto bad;
    if (decref_tuple) { Py_DECREF(tuple); tuple = NULL; }
    iternext = __Pyx_PyObject_GetIterNextFunc(iter);
    value1 = iternext(iter); if (unlikely(!value1)) { index = 0; goto unpacking_failed; }
    value2 = iternext(iter); if (unlikely(!value2)) { index = 1; goto unpacking_failed; }
    if (!has_known_size && unlikely(__Pyx_IternextUnpackEndCheck(iternext(iter), 2))) goto bad;
    Py_DECREF(iter);
    *pvalue1 = value1;
    *pvalue2 = value2;
    return 0;
unpacking_failed:
    if (!has_known_size && __Pyx_IterFinish() == 0)
        __Pyx_RaiseNeedMoreValuesError(index);
bad:
    Py_XDECREF(iter);
    Py_XDECREF(value1);
    Py_XDECREF(value2);
    if (decref_tuple) { Py_XDECREF(tuple); }
    return -1;
}

/* dict_iter */
#if CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
#include <string.h>
#endif
static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name,
                                                   Py_ssize_t* p_orig_length, int* p_source_is_dict) {
    is_dict = is_dict || likely(PyDict_CheckExact(iterable));
    *p_source_is_dict = is_dict;
    if (is_dict) {
#if !CYTHON_COMPILING_IN_PYPY
        *p_orig_length = PyDict_Size(iterable);
        Py_INCREF(iterable);
        return iterable;
#elif PY_MAJOR_VERSION >= 3
        static PyObject *py_items = NULL, *py_keys = NULL, *py_values = NULL;
        PyObject **pp = NULL;
        if (method_name) {
            const char *name = PyUnicode_AsUTF8(method_name);
            if (strcmp(name, "iteritems") == 0) pp = &py_items;
            else if (strcmp(name, "iterkeys") == 0) pp = &py_keys;
            else if (strcmp(name, "itervalues") == 0) pp = &py_values;
            if (pp) {
                if (!*pp) {
                    *pp = PyUnicode_FromString(name + 4);
                    if (!*pp)
                        return NULL;
                }
                method_name = *pp;
            }
        }
#endif
    }
    *p_orig_length = 0;
    if (method_name) {
        PyObject* iter;
        iterable = __Pyx_PyObject_CallMethod0(iterable, method_name);
        if (!iterable)
            return NULL;
#if !CYTHON_COMPILING_IN_PYPY
        if (PyTuple_CheckExact(iterable) || PyList_CheckExact(iterable))
            return iterable;
#endif
        iter = PyObject_GetIter(iterable);
        Py_DECREF(iterable);
        return iter;
    }
    return PyObject_GetIter(iterable);
}
static CYTHON_INLINE int __Pyx_dict_iter_next(
        PyObject* iter_obj, CYTHON_NCP_UNUSED Py_ssize_t orig_length, CYTHON_NCP_UNUSED Py_ssize_t* ppos,
        PyObject** pkey, PyObject** pvalue, PyObject** pitem, int source_is_dict) {
    PyObject* next_item;
#if !CYTHON_COMPILING_IN_PYPY
    if (source_is_dict) {
        PyObject *key, *value;
        if (unlikely(orig_length != PyDict_Size(iter_obj))) {
            PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration");
            return -1;
        }
        if (unlikely(!PyDict_Next(iter_obj, ppos, &key, &value))) {
            return 0;
        }
        if (pitem) {
            PyObject* tuple = PyTuple_New(2);
            if (unlikely(!tuple)) {
                return -1;
            }
            Py_INCREF(key);
            Py_INCREF(value);
            PyTuple_SET_ITEM(tuple, 0, key);
            PyTuple_SET_ITEM(tuple, 1, value);
            *pitem = tuple;
        } else {
            if (pkey) {
                Py_INCREF(key);
                *pkey = key;
            }
            if (pvalue) {
                Py_INCREF(value);
                *pvalue = value;
            }
        }
        return 1;
    } else if (PyTuple_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyTuple_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyTuple_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else if (PyList_CheckExact(iter_obj)) {
        Py_ssize_t pos = *ppos;
        if (unlikely(pos >= PyList_GET_SIZE(iter_obj))) return 0;
        *ppos = pos + 1;
        next_item = PyList_GET_ITEM(iter_obj, pos);
        Py_INCREF(next_item);
    } else
#endif
    {
        next_item = PyIter_Next(iter_obj);
        if (unlikely(!next_item)) {
            return __Pyx_IterFinish();
        }
    }
    if (pitem) {
        *pitem = next_item;
    } else if (pkey && pvalue) {
        if (__Pyx_unpack_tuple2(next_item, pkey, pvalue, source_is_dict, source_is_dict, 1))
            return -1;
    } else if (pkey) {
        *pkey = next_item;
    } else {
        *pvalue = next_item;
    }
    return 1;
}

/* PyIntBinop */
#if !CYTHON_COMPILING_IN_PYPY
static PyObject* __Pyx_PyInt_MultiplyObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
    CYTHON_MAYBE_UNUSED_VAR(intval);
    CYTHON_MAYBE_UNUSED_VAR(inplace);
    CYTHON_UNUSED_VAR(zerodivision_check);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyInt_CheckExact(op1))) {
        const long b = intval;
        long a = PyInt_AS_LONG(op1);
        
#ifdef HAVE_LONG_LONG
            if (sizeof(PY_LONG_LONG) > sizeof(long)) {
                PY_LONG_LONG result = (PY_LONG_LONG)a * (PY_LONG_LONG)b;
                return (result >= LONG_MIN && result <= LONG_MAX) ?
                    PyInt_FromLong((long)result) : PyLong_FromLongLong(result);
            }
#endif
#if CYTHON_USE_TYPE_SLOTS
            return PyInt_Type.tp_as_number->nb_multiply(op1, op2);
#else
            return PyNumber_Multiply(op1, op2);
#endif
    }
    #endif
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(PyLong_CheckExact(op1))) {
        const long b = intval;
        long a, x;
#ifdef HAVE_LONG_LONG
        const PY_LONG_LONG llb = intval;
        PY_LONG_LONG lla, llx;
#endif
        if (unlikely(__Pyx_PyLong_IsZero(op1))) {
            return __Pyx_NewRef(op1);
        }
        if (likely(__Pyx_PyLong_IsCompact(op1))) {
            a = __Pyx_PyLong_CompactValue(op1);
        } else {
            const digit* digits = __Pyx_PyLong_Digits(op1);
            const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
            switch (size) {
                case -2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 2:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT+30) {
                        a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 3:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT+30) {
                        a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case -4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                case 4:
                    if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT+30) {
                        a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
                        break;
                    #ifdef HAVE_LONG_LONG
                    } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT+30) {
                        lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
                        goto long_long;
                    #endif
                    }
                    CYTHON_FALLTHROUGH;
                default: return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
            }
        }
                CYTHON_UNUSED_VAR(a);
                CYTHON_UNUSED_VAR(b);
                #ifdef HAVE_LONG_LONG
                lla = a;
                goto long_long;
                #else
                return PyLong_Type.tp_as_number->nb_multiply(op1, op2);
                #endif
            return PyLong_FromLong(x);
#ifdef HAVE_LONG_LONG
        long_long:
                llx = lla * llb;
            return PyLong_FromLongLong(llx);
#endif
        
        
    }
    #endif
    if (PyFloat_CheckExact(op1)) {
        const long b = intval;
#if CYTHON_COMPILING_IN_LIMITED_API
        double a = __pyx_PyFloat_AsDouble(op1);
#else
        double a = PyFloat_AS_DOUBLE(op1);
#endif
            double result;
            
            PyFPE_START_PROTECT("multiply", return NULL)
            result = ((double)a) * (double)b;
            PyFPE_END_PROTECT(result)
            return PyFloat_FromDouble(result);
    }
    return (inplace ? PyNumber_InPlaceMultiply : PyNumber_Multiply)(op1, op2);
}
#endif

/* StringJoin */
static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
    (void) __Pyx_PyObject_CallMethod1;
#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION < 3
    return _PyString_Join(sep, values);
#elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000
    return _PyBytes_Join(sep, values);
#else
    return __Pyx_PyObject_CallMethod1(sep, __pyx_n_s_join, values);
#endif
}

/* RaiseUnexpectedTypeError */
static int
__Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
{
    __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
    PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
                 expected, obj_type_name);
    __Pyx_DECREF_TypeName(obj_type_name);
    return 0;
}

/* UnicodeConcatInPlace */
# if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
static int
__Pyx_unicode_modifiable(PyObject *unicode)
{
    if (Py_REFCNT(unicode) != 1)
        return 0;
    if (!PyUnicode_CheckExact(unicode))
        return 0;
    if (PyUnicode_CHECK_INTERNED(unicode))
        return 0;
    return 1;
}
static CYTHON_INLINE PyObject *__Pyx_PyUnicode_ConcatInPlaceImpl(PyObject **p_left, PyObject *right
        #if CYTHON_REFNANNY
        , void* __pyx_refnanny
        #endif
    ) {
    PyObject *left = *p_left;
    Py_ssize_t left_len, right_len, new_len;
    if (unlikely(__Pyx_PyUnicode_READY(left) == -1))
        return NULL;
    if (unlikely(__Pyx_PyUnicode_READY(right) == -1))
        return NULL;
    left_len = PyUnicode_GET_LENGTH(left);
    if (left_len == 0) {
        Py_INCREF(right);
        return right;
    }
    right_len = PyUnicode_GET_LENGTH(right);
    if (right_len == 0) {
        Py_INCREF(left);
        return left;
    }
    if (unlikely(left_len > PY_SSIZE_T_MAX - right_len)) {
        PyErr_SetString(PyExc_OverflowError,
                        "strings are too large to concat");
        return NULL;
    }
    new_len = left_len + right_len;
    if (__Pyx_unicode_modifiable(left)
            && PyUnicode_CheckExact(right)
            && PyUnicode_KIND(right) <= PyUnicode_KIND(left)
            && !(PyUnicode_IS_ASCII(left) && !PyUnicode_IS_ASCII(right))) {
        int ret;
        __Pyx_GIVEREF(*p_left);
        ret = PyUnicode_Resize(p_left, new_len);
        __Pyx_GOTREF(*p_left);
        if (unlikely(ret != 0))
            return NULL;
        #if PY_VERSION_HEX >= 0x030d0000
        if (unlikely(PyUnicode_CopyCharacters(*p_left, left_len, right, 0, right_len) < 0)) return NULL;
        #else
        _PyUnicode_FastCopyCharacters(*p_left, left_len, right, 0, right_len);
        #endif
        __Pyx_INCREF(*p_left);
        __Pyx_GIVEREF(*p_left);
        return *p_left;
    } else {
        return __Pyx_PyUnicode_Concat(left, right);
    }
  }
#endif

/* RaiseException */
#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    __Pyx_PyThreadState_declare
    CYTHON_UNUSED_VAR(cause);
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        type = (PyObject*) Py_TYPE(type);
        Py_INCREF(type);
        if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: exception class must be a subclass of BaseException");
            goto raise_error;
        }
    }
    __Pyx_PyThreadState_assign
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;
    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (PyExceptionClass_Check(type)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
    if (cause) {
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        } else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        } else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
      #if PY_VERSION_HEX >= 0x030C00A6
        PyException_SetTraceback(value, tb);
      #elif CYTHON_FAST_THREAD_STATE
        PyThreadState *tstate = __Pyx_PyThreadState_Current;
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
#else
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

/* ValidateBasesTuple */
#if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
    Py_ssize_t i, n;
#if CYTHON_ASSUME_SAFE_MACROS
    n = PyTuple_GET_SIZE(bases);
#else
    n = PyTuple_Size(bases);
    if (n < 0) return -1;
#endif
    for (i = 1; i < n; i++)
    {
#if CYTHON_AVOID_BORROWED_REFS
        PyObject *b0 = PySequence_GetItem(bases, i);
        if (!b0) return -1;
#elif CYTHON_ASSUME_SAFE_MACROS
        PyObject *b0 = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *b0 = PyTuple_GetItem(bases, i);
        if (!b0) return -1;
#endif
        PyTypeObject *b;
#if PY_MAJOR_VERSION < 3
        if (PyClass_Check(b0))
        {
            PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
                         PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
#endif
        b = (PyTypeObject*) b0;
        if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
        {
            __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
            PyErr_Format(PyExc_TypeError,
                "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
            __Pyx_DECREF_TypeName(b_name);
#if CYTHON_AVOID_BORROWED_REFS
            Py_DECREF(b0);
#endif
            return -1;
        }
        if (dictoffset == 0)
        {
            Py_ssize_t b_dictoffset = 0;
#if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
            b_dictoffset = b->tp_dictoffset;
#else
            PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
            if (!py_b_dictoffset) goto dictoffset_return;
            b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
            Py_DECREF(py_b_dictoffset);
            if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
#endif
            if (b_dictoffset) {
                {
                    __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
                    PyErr_Format(PyExc_TypeError,
                        "extension type '%.200s' has no __dict__ slot, "
                        "but base type '" __Pyx_FMT_TYPENAME "' has: "
                        "either add 'cdef dict __dict__' to the extension type "
                        "or add '__slots__ = [...]' to the base type",
                        type_name, b_name);
                    __Pyx_DECREF_TypeName(b_name);
                }
#if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
              dictoffset_return:
#endif
#if CYTHON_AVOID_BORROWED_REFS
                Py_DECREF(b0);
#endif
                return -1;
            }
        }
#if CYTHON_AVOID_BORROWED_REFS
        Py_DECREF(b0);
#endif
    }
    return 0;
}
#endif

/* PyType_Ready */
static int __Pyx_PyType_Ready(PyTypeObject *t) {
#if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
    (void)__Pyx_PyObject_CallMethod0;
#if CYTHON_USE_TYPE_SPECS
    (void)__Pyx_validate_bases_tuple;
#endif
    return PyType_Ready(t);
#else
    int r;
    PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
    if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
        return -1;
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
    {
        int gc_was_enabled;
    #if PY_VERSION_HEX >= 0x030A00b1
        gc_was_enabled = PyGC_Disable();
        (void)__Pyx_PyObject_CallMethod0;
    #else
        PyObject *ret, *py_status;
        PyObject *gc = NULL;
        #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
        gc = PyImport_GetModule(__pyx_kp_u_gc);
        #endif
        if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
        if (unlikely(!gc)) return -1;
        py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
        if (unlikely(!py_status)) {
            Py_DECREF(gc);
            return -1;
        }
        gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
        Py_DECREF(py_status);
        if (gc_was_enabled > 0) {
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
            if (unlikely(!ret)) {
                Py_DECREF(gc);
                return -1;
            }
            Py_DECREF(ret);
        } else if (unlikely(gc_was_enabled == -1)) {
            Py_DECREF(gc);
            return -1;
        }
    #endif
        t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
#if PY_VERSION_HEX >= 0x030A0000
        t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
#endif
#else
        (void)__Pyx_PyObject_CallMethod0;
#endif
    r = PyType_Ready(t);
#if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
        t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
    #if PY_VERSION_HEX >= 0x030A00b1
        if (gc_was_enabled)
            PyGC_Enable();
    #else
        if (gc_was_enabled) {
            PyObject *tp, *v, *tb;
            PyErr_Fetch(&tp, &v, &tb);
            ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
            if (likely(ret || r == -1)) {
                Py_XDECREF(ret);
                PyErr_Restore(tp, v, tb);
            } else {
                Py_XDECREF(tp);
                Py_XDECREF(v);
                Py_XDECREF(tb);
                r = -1;
            }
        }
        Py_DECREF(gc);
    #endif
    }
#endif
    return r;
#endif
}

/* PyObject_GenericGetAttrNoDict */
#if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
    __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
    PyErr_Format(PyExc_AttributeError,
#if PY_MAJOR_VERSION >= 3
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
                 type_name, attr_name);
#else
                 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
                 type_name, PyString_AS_STRING(attr_name));
#endif
    __Pyx_DECREF_TypeName(type_name);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
    PyObject *descr;
    PyTypeObject *tp = Py_TYPE(obj);
    if (unlikely(!PyString_Check(attr_name))) {
        return PyObject_GenericGetAttr(obj, attr_name);
    }
    assert(!tp->tp_dictoffset);
    descr = _PyType_Lookup(tp, attr_name);
    if (unlikely(!descr)) {
        return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
    }
    Py_INCREF(descr);
    #if PY_MAJOR_VERSION < 3
    if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
    #endif
    {
        descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
        if (unlikely(f)) {
            PyObject *res = f(descr, obj, (PyObject *)tp);
            Py_DECREF(descr);
            return res;
        }
    }
    return descr;
}
#endif

/* Import */
static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
    PyObject *module = 0;
    PyObject *empty_dict = 0;
    PyObject *empty_list = 0;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_import;
    py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
    if (unlikely(!py_import))
        goto bad;
    if (!from_list) {
        empty_list = PyList_New(0);
        if (unlikely(!empty_list))
            goto bad;
        from_list = empty_list;
    }
    #endif
    empty_dict = PyDict_New();
    if (unlikely(!empty_dict))
        goto bad;
    {
        #if PY_MAJOR_VERSION >= 3
        if (level == -1) {
            if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
                module = PyImport_ImportModuleLevelObject(
                    name, __pyx_d, empty_dict, from_list, 1);
                if (unlikely(!module)) {
                    if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
                        goto bad;
                    PyErr_Clear();
                }
            }
            level = 0;
        }
        #endif
        if (!module) {
            #if PY_MAJOR_VERSION < 3
            PyObject *py_level = PyInt_FromLong(level);
            if (unlikely(!py_level))
                goto bad;
            module = PyObject_CallFunctionObjArgs(py_import,
                name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
            Py_DECREF(py_level);
            #else
            module = PyImport_ImportModuleLevelObject(
                name, __pyx_d, empty_dict, from_list, level);
            #endif
        }
    }
bad:
    Py_XDECREF(empty_dict);
    Py_XDECREF(empty_list);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_import);
    #endif
    return module;
}

/* ImportDottedModule */
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
    PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
    if (unlikely(PyErr_Occurred())) {
        PyErr_Clear();
    }
    if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
        partial_name = name;
    } else {
        slice = PySequence_GetSlice(parts_tuple, 0, count);
        if (unlikely(!slice))
            goto bad;
        sep = PyUnicode_FromStringAndSize(".", 1);
        if (unlikely(!sep))
            goto bad;
        partial_name = PyUnicode_Join(sep, slice);
    }
    PyErr_Format(
#if PY_MAJOR_VERSION < 3
        PyExc_ImportError,
        "No module named '%s'", PyString_AS_STRING(partial_name));
#else
#if PY_VERSION_HEX >= 0x030600B1
        PyExc_ModuleNotFoundError,
#else
        PyExc_ImportError,
#endif
        "No module named '%U'", partial_name);
#endif
bad:
    Py_XDECREF(sep);
    Py_XDECREF(slice);
    Py_XDECREF(partial_name);
    return NULL;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
    PyObject *imported_module;
#if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
    PyObject *modules = PyImport_GetModuleDict();
    if (unlikely(!modules))
        return NULL;
    imported_module = __Pyx_PyDict_GetItemStr(modules, name);
    Py_XINCREF(imported_module);
#else
    imported_module = PyImport_GetModule(name);
#endif
    return imported_module;
}
#endif
#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
    Py_ssize_t i, nparts;
    nparts = PyTuple_GET_SIZE(parts_tuple);
    for (i=1; i < nparts && module; i++) {
        PyObject *part, *submodule;
#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
        part = PyTuple_GET_ITEM(parts_tuple, i);
#else
        part = PySequence_ITEM(parts_tuple, i);
#endif
        submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
#if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
        Py_DECREF(part);
#endif
        Py_DECREF(module);
        module = submodule;
    }
    if (unlikely(!module)) {
        return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
    }
    return module;
}
#endif
static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if PY_MAJOR_VERSION < 3
    PyObject *module, *from_list, *star = __pyx_n_s__94;
    CYTHON_UNUSED_VAR(parts_tuple);
    from_list = PyList_New(1);
    if (unlikely(!from_list))
        return NULL;
    Py_INCREF(star);
    PyList_SET_ITEM(from_list, 0, star);
    module = __Pyx_Import(name, from_list, 0);
    Py_DECREF(from_list);
    return module;
#else
    PyObject *imported_module;
    PyObject *module = __Pyx_Import(name, NULL, 0);
    if (!parts_tuple || unlikely(!module))
        return module;
    imported_module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(imported_module)) {
        Py_DECREF(module);
        return imported_module;
    }
    PyErr_Clear();
    return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
#endif
}
static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
    PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
    if (likely(module)) {
        PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
        if (likely(spec)) {
            PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
            if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
                Py_DECREF(spec);
                spec = NULL;
            }
            Py_XDECREF(unsafe);
        }
        if (likely(!spec)) {
            PyErr_Clear();
            return module;
        }
        Py_DECREF(spec);
        Py_DECREF(module);
    } else if (PyErr_Occurred()) {
        PyErr_Clear();
    }
#endif
    return __Pyx__ImportDottedModule(name, parts_tuple);
}

/* ImportFrom */
static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
    PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
    if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
        const char* module_name_str = 0;
        PyObject* module_name = 0;
        PyObject* module_dot = 0;
        PyObject* full_name = 0;
        PyErr_Clear();
        module_name_str = PyModule_GetName(module);
        if (unlikely(!module_name_str)) { goto modbad; }
        module_name = PyUnicode_FromString(module_name_str);
        if (unlikely(!module_name)) { goto modbad; }
        module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__5);
        if (unlikely(!module_dot)) { goto modbad; }
        full_name = PyUnicode_Concat(module_dot, name);
        if (unlikely(!full_name)) { goto modbad; }
        #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM  < 0x07030400)
        {
            PyObject *modules = PyImport_GetModuleDict();
            if (unlikely(!modules))
                goto modbad;
            value = PyObject_GetItem(modules, full_name);
        }
        #else
        value = PyImport_GetModule(full_name);
        #endif
      modbad:
        Py_XDECREF(full_name);
        Py_XDECREF(module_dot);
        Py_XDECREF(module_name);
    }
    if (unlikely(!value)) {
        PyErr_Format(PyExc_ImportError,
        #if PY_MAJOR_VERSION < 3
            "cannot import name %.230s", PyString_AS_STRING(name));
        #else
            "cannot import name %S", name);
        #endif
    }
    return value;
}

/* Py3UpdateBases */
static PyObject*
__Pyx_PEP560_update_bases(PyObject *bases)
{
    Py_ssize_t i, j, size_bases;
    PyObject *base, *meth, *new_base, *result, *new_bases = NULL;
    size_bases = PyTuple_GET_SIZE(bases);
    for (i = 0; i < size_bases; i++) {
        base  = PyTuple_GET_ITEM(bases, i);
        if (PyType_Check(base)) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        meth = __Pyx_PyObject_GetAttrStrNoError(base, __pyx_n_s_mro_entries);
        if (!meth && PyErr_Occurred()) {
            goto error;
        }
        if (!meth) {
            if (new_bases) {
                if (PyList_Append(new_bases, base) < 0) {
                    goto error;
                }
            }
            continue;
        }
        new_base = __Pyx_PyObject_CallOneArg(meth, bases);
        Py_DECREF(meth);
        if (!new_base) {
            goto error;
        }
        if (!PyTuple_Check(new_base)) {
            PyErr_SetString(PyExc_TypeError,
                            "__mro_entries__ must return a tuple");
            Py_DECREF(new_base);
            goto error;
        }
        if (!new_bases) {
            if (!(new_bases = PyList_New(i))) {
                goto error;
            }
            for (j = 0; j < i; j++) {
                base = PyTuple_GET_ITEM(bases, j);
                PyList_SET_ITEM(new_bases, j, base);
                Py_INCREF(base);
            }
        }
        j = PyList_GET_SIZE(new_bases);
        if (PyList_SetSlice(new_bases, j, j, new_base) < 0) {
            goto error;
        }
        Py_DECREF(new_base);
    }
    if (!new_bases) {
        Py_INCREF(bases);
        return bases;
    }
    result = PyList_AsTuple(new_bases);
    Py_DECREF(new_bases);
    return result;
error:
    Py_XDECREF(new_bases);
    return NULL;
}

/* CalculateMetaclass */
static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
    Py_ssize_t i, nbases;
#if CYTHON_ASSUME_SAFE_MACROS
    nbases = PyTuple_GET_SIZE(bases);
#else
    nbases = PyTuple_Size(bases);
    if (nbases < 0) return NULL;
#endif
    for (i=0; i < nbases; i++) {
        PyTypeObject *tmptype;
#if CYTHON_ASSUME_SAFE_MACROS
        PyObject *tmp = PyTuple_GET_ITEM(bases, i);
#else
        PyObject *tmp = PyTuple_GetItem(bases, i);
        if (!tmp) return NULL;
#endif
        tmptype = Py_TYPE(tmp);
#if PY_MAJOR_VERSION < 3
        if (tmptype == &PyClass_Type)
            continue;
#endif
        if (!metaclass) {
            metaclass = tmptype;
            continue;
        }
        if (PyType_IsSubtype(metaclass, tmptype))
            continue;
        if (PyType_IsSubtype(tmptype, metaclass)) {
            metaclass = tmptype;
            continue;
        }
        PyErr_SetString(PyExc_TypeError,
                        "metaclass conflict: "
                        "the metaclass of a derived class "
                        "must be a (non-strict) subclass "
                        "of the metaclasses of all its bases");
        return NULL;
    }
    if (!metaclass) {
#if PY_MAJOR_VERSION < 3
        metaclass = &PyClass_Type;
#else
        metaclass = &PyType_Type;
#endif
    }
    Py_INCREF((PyObject*) metaclass);
    return (PyObject*) metaclass;
}

/* Py3ClassCreate */
static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
                                           PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
    PyObject *ns;
    if (metaclass) {
        PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
        if (prep) {
            PyObject *pargs[3] = {NULL, name, bases};
            ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
            Py_DECREF(prep);
        } else {
            if (unlikely(PyErr_Occurred()))
                return NULL;
            ns = PyDict_New();
        }
    } else {
        ns = PyDict_New();
    }
    if (unlikely(!ns))
        return NULL;
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
#if PY_VERSION_HEX >= 0x03030000
    if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
#else
    CYTHON_MAYBE_UNUSED_VAR(qualname);
#endif
    if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
    return ns;
bad:
    Py_DECREF(ns);
    return NULL;
}
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *names_to_set, *key, *value, *set_name, *tmp;
    Py_ssize_t i = 0;
#if CYTHON_USE_TYPE_SLOTS
    names_to_set = PyDict_Copy(type->tp_dict);
#else
    {
        PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict_2);
        names_to_set = NULL;
        if (likely(d)) {
            PyObject *names_to_set = PyDict_New();
            int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
            Py_DECREF(d);
            if (unlikely(ret < 0))
                Py_CLEAR(names_to_set);
        }
    }
#endif
    if (unlikely(names_to_set == NULL))
        goto bad;
    while (PyDict_Next(names_to_set, &i, &key, &value)) {
        set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
        if (unlikely(set_name != NULL)) {
            tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
            Py_DECREF(set_name);
            if (unlikely(tmp == NULL)) {
                __Pyx_TypeName value_type_name =
                    __Pyx_PyType_GetName(Py_TYPE(value));
                __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
                PyErr_Format(PyExc_RuntimeError,
#if PY_MAJOR_VERSION >= 3
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name, key, type_name);
#else
                    "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
                    value_type_name,
                    PyString_Check(key) ? PyString_AS_STRING(key) : "?",
                    type_name);
#endif
                goto bad;
            } else {
                Py_DECREF(tmp);
            }
        }
        else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
    Py_DECREF(names_to_set);
    return 0;
bad:
    Py_XDECREF(names_to_set);
    return -1;
}
static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
#if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
    PyTypeObject *type = (PyTypeObject*) type_obj;
    PyObject *mro = type->tp_mro;
    Py_ssize_t i, nbases;
    if (unlikely(!mro)) goto done;
    (void) &__Pyx_GetBuiltinName;
    Py_INCREF(mro);
    nbases = PyTuple_GET_SIZE(mro);
    assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
    for (i = 1; i < nbases-1; i++) {
        PyObject *base, *dict, *meth;
        base = PyTuple_GET_ITEM(mro, i);
        dict = ((PyTypeObject *)base)->tp_dict;
        meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
        if (unlikely(meth)) {
            descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
            PyObject *res;
            Py_INCREF(meth);
            if (likely(f)) {
                res = f(meth, NULL, type_obj);
                Py_DECREF(meth);
                if (unlikely(!res)) goto bad;
                meth = res;
            }
            res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
            Py_DECREF(meth);
            if (unlikely(!res)) goto bad;
            Py_DECREF(res);
            goto done;
        } else if (unlikely(PyErr_Occurred())) {
            goto bad;
        }
    }
done:
    Py_XDECREF(mro);
    return type_obj;
bad:
    Py_XDECREF(mro);
    Py_DECREF(type_obj);
    return NULL;
#else
    PyObject *super_type, *super, *func, *res;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
#else
    super_type = (PyObject*) &PySuper_Type;
    (void) &__Pyx_GetBuiltinName;
#endif
    super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
#if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
    Py_XDECREF(super_type);
#endif
    if (unlikely(!super)) {
        Py_CLEAR(type_obj);
        goto done;
    }
    func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
    Py_DECREF(super);
    if (likely(!func)) {
        if (unlikely(PyErr_Occurred()))
            Py_CLEAR(type_obj);
        goto done;
    }
    res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
    Py_DECREF(func);
    if (unlikely(!res))
        Py_CLEAR(type_obj);
    Py_XDECREF(res);
done:
    return type_obj;
#endif
}
#endif
static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
                                      PyObject *dict, PyObject *mkw,
                                      int calculate_metaclass, int allow_py2_metaclass) {
    PyObject *result;
    PyObject *owned_metaclass = NULL;
    PyObject *margs[4] = {NULL, name, bases, dict};
    if (allow_py2_metaclass) {
        owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
        if (owned_metaclass) {
            metaclass = owned_metaclass;
        } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
            PyErr_Clear();
        } else {
            return NULL;
        }
    }
    if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
        metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
        Py_XDECREF(owned_metaclass);
        if (unlikely(!metaclass))
            return NULL;
        owned_metaclass = metaclass;
    }
    result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
#if PY_VERSION_HEX < 0x030600A4
        (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
#else
        mkw
#endif
    );
    Py_XDECREF(owned_metaclass);
#if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
    if (likely(result) && likely(PyType_Check(result))) {
        if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
            Py_CLEAR(result);
        } else {
            result = __Pyx_InitSubclassPEP487(result, mkw);
        }
    }
#else
    (void) &__Pyx_GetBuiltinName;
#endif
    return result;
}

/* CLineInTraceback */
#ifndef CYTHON_CLINE_IN_TRACEBACK
static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
    PyObject *use_cline;
    PyObject *ptype, *pvalue, *ptraceback;
#if CYTHON_COMPILING_IN_CPYTHON
    PyObject **cython_runtime_dict;
#endif
    CYTHON_MAYBE_UNUSED_VAR(tstate);
    if (unlikely(!__pyx_cython_runtime)) {
        return c_line;
    }
    __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
#if CYTHON_COMPILING_IN_CPYTHON
    cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
    if (likely(cython_runtime_dict)) {
        __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
            use_cline, *cython_runtime_dict,
            __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
    } else
#endif
    {
      PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
      if (use_cline_obj) {
        use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
        Py_DECREF(use_cline_obj);
      } else {
        PyErr_Clear();
        use_cline = NULL;
      }
    }
    if (!use_cline) {
        c_line = 0;
        (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
    }
    else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
        c_line = 0;
    }
    __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
    return c_line;
}
#endif

/* CodeObjectCache */
#if !CYTHON_COMPILING_IN_LIMITED_API
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}
#endif

/* AddTraceback */
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
  #ifndef Py_BUILD_CORE
    #define Py_BUILD_CORE 1
  #endif
  #include "internal/pycore_frame.h"
#endif
#if CYTHON_COMPILING_IN_LIMITED_API
static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
                                                       PyObject *firstlineno, PyObject *name) {
    PyObject *replace = NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
    if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
    replace = PyObject_GetAttrString(code, "replace");
    if (likely(replace)) {
        PyObject *result;
        result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
        Py_DECREF(replace);
        return result;
    }
    PyErr_Clear();
    #if __PYX_LIMITED_VERSION_HEX < 0x030780000
    {
        PyObject *compiled = NULL, *result = NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
        if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
        compiled = Py_CompileString(
            "out = type(code)(\n"
            "  code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
            "  code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
            "  code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
            "  code.co_lnotab)\n", "<dummy>", Py_file_input);
        if (!compiled) return NULL;
        result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
        Py_DECREF(compiled);
        if (!result) PyErr_Print();
        Py_DECREF(result);
        result = PyDict_GetItemString(scratch_dict, "out");
        if (result) Py_INCREF(result);
        return result;
    }
    #else
    return NULL;
    #endif
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
    PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
    PyObject *exc_type, *exc_value, *exc_traceback;
    int success = 0;
    if (c_line) {
        (void) __pyx_cfilenm;
        (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
    }
    PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
    code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
    if (unlikely(!code_object)) goto bad;
    py_py_line = PyLong_FromLong(py_line);
    if (unlikely(!py_py_line)) goto bad;
    py_funcname = PyUnicode_FromString(funcname);
    if (unlikely(!py_funcname)) goto bad;
    dict = PyDict_New();
    if (unlikely(!dict)) goto bad;
    {
        PyObject *old_code_object = code_object;
        code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
        Py_DECREF(old_code_object);
    }
    if (unlikely(!code_object)) goto bad;
    getframe = PySys_GetObject("_getframe");
    if (unlikely(!getframe)) goto bad;
    if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
    frame = PyEval_EvalCode(code_object, dict, dict);
    if (unlikely(!frame) || frame == Py_None) goto bad;
    success = 1;
  bad:
    PyErr_Restore(exc_type, exc_value, exc_traceback);
    Py_XDECREF(code_object);
    Py_XDECREF(py_py_line);
    Py_XDECREF(py_funcname);
    Py_XDECREF(dict);
    Py_XDECREF(replace);
    if (success) {
        PyTraceBack_Here(
            (struct _frame*)frame);
    }
    Py_XDECREF(frame);
}
#else
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = NULL;
    PyObject *py_funcname = NULL;
    #if PY_MAJOR_VERSION < 3
    PyObject *py_srcfile = NULL;
    py_srcfile = PyString_FromString(filename);
    if (!py_srcfile) goto bad;
    #endif
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        if (!py_funcname) goto bad;
        funcname = PyUnicode_AsUTF8(py_funcname);
        if (!funcname) goto bad;
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        if (!py_funcname) goto bad;
        #endif
    }
    #if PY_MAJOR_VERSION < 3
    py_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        0,
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple, /*PyObject *consts,*/
        __pyx_empty_tuple, /*PyObject *names,*/
        __pyx_empty_tuple, /*PyObject *varnames,*/
        __pyx_empty_tuple, /*PyObject *freevars,*/
        __pyx_empty_tuple, /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    #else
    py_code = PyCode_NewEmpty(filename, funcname, py_line);
    #endif
    Py_XDECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_funcname);
    #if PY_MAJOR_VERSION < 3
    Py_XDECREF(py_srcfile);
    #endif
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    PyThreadState *tstate = __Pyx_PyThreadState_Current;
    PyObject *ptype, *pvalue, *ptraceback;
    if (c_line) {
        c_line = __Pyx_CLineForTraceback(tstate, c_line);
    }
    py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
    if (!py_code) {
        __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) {
            /* If the code object creation fails, then we should clear the
               fetched exception references and propagate the new exception */
            Py_XDECREF(ptype);
            Py_XDECREF(pvalue);
            Py_XDECREF(ptraceback);
            goto bad;
        }
        __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
        __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        tstate,            /*PyThreadState *tstate,*/
        py_code,           /*PyCodeObject *code,*/
        __pyx_d,    /*PyObject *globals,*/
        0                  /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}
#endif

/* CIntToPy */
static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
#endif
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
#ifdef HAVE_LONG_LONG
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
#endif
        }
    }
    {
        unsigned char *bytes = (unsigned char *)&value;
#if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
        if (is_unsigned) {
            return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
        } else {
            return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
        }
#elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
        int one = 1; int little = (int)*(unsigned char *)&one;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
#else
        int one = 1; int little = (int)*(unsigned char *)&one;
        PyObject *from_bytes, *result = NULL;
        PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
        from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
        if (!from_bytes) return NULL;
        py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
        if (!py_bytes) goto limited_bad;
        order_str = PyUnicode_FromString(little ? "little" : "big");
        if (!order_str) goto limited_bad;
        arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
        if (!arg_tuple) goto limited_bad;
        if (!is_unsigned) {
            kwds = PyDict_New();
            if (!kwds) goto limited_bad;
            if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
        }
        result = PyObject_Call(from_bytes, arg_tuple, kwds);
        limited_bad:
        Py_XDECREF(kwds);
        Py_XDECREF(arg_tuple);
        Py_XDECREF(order_str);
        Py_XDECREF(py_bytes);
        Py_XDECREF(from_bytes);
        return result;
#endif
    }
}

/* FormatTypeName */
#if CYTHON_COMPILING_IN_LIMITED_API
static __Pyx_TypeName
__Pyx_PyType_GetName(PyTypeObject* tp)
{
    PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
                                               __pyx_n_s_name_2);
    if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
        PyErr_Clear();
        Py_XDECREF(name);
        name = __Pyx_NewRef(__pyx_n_s__177);
    }
    return name;
}
#endif

/* CIntFromPyVerify */
#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

/* CIntFromPy */
static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const long neg_one = (long) -1, const_zero = (long) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(long) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        long val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (long) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(long) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(long) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        long val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (long) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (long) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (long) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (long) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((long) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((long) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (long) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

/* CIntFromPy */
static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wconversion"
#endif
    const int neg_one = (int) -1, const_zero = (int) 0;
#ifdef __Pyx_HAS_GCC_DIAGNOSTIC
#pragma GCC diagnostic pop
#endif
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if ((sizeof(int) < sizeof(long))) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    }
#endif
    if (unlikely(!PyLong_Check(x))) {
        int val;
        PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
    if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
        if (unlikely(__Pyx_PyLong_IsNeg(x))) {
            goto raise_neg_overflow;
        } else if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_DigitCount(x)) {
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
        }
#endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
        if (unlikely(Py_SIZE(x) < 0)) {
            goto raise_neg_overflow;
        }
#else
        {
            int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
            if (unlikely(result < 0))
                return (int) -1;
            if (unlikely(result == 1))
                goto raise_neg_overflow;
        }
#endif
        if ((sizeof(int) <= sizeof(unsigned long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
#endif
        }
    } else {
#if CYTHON_USE_PYLONG_INTERNALS
        if (__Pyx_PyLong_IsCompact(x)) {
            __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
        } else {
            const digit* digits = __Pyx_PyLong_Digits(x);
            assert(__Pyx_PyLong_DigitCount(x) > 1);
            switch (__Pyx_PyLong_SignedDigitCount(x)) {
                case -2:
                    if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
                        if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
        }
#endif
        if ((sizeof(int) <= sizeof(long))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
#ifdef HAVE_LONG_LONG
        } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
            __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
#endif
        }
    }
    {
        int val;
        int ret = -1;
#if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
        Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
            x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
        if (unlikely(bytes_copied == -1)) {
        } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
            goto raise_overflow;
        } else {
            ret = 0;
        }
#elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
        int one = 1; int is_little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&val;
        ret = _PyLong_AsByteArray((PyLongObject *)x,
                                    bytes, sizeof(val),
                                    is_little, !is_unsigned);
#else
        PyObject *v;
        PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
        int bits, remaining_bits, is_negative = 0;
        int chunk_size = (sizeof(long) < 8) ? 30 : 62;
        if (likely(PyLong_CheckExact(x))) {
            v = __Pyx_NewRef(x);
        } else {
            v = PyNumber_Long(x);
            if (unlikely(!v)) return (int) -1;
            assert(PyLong_CheckExact(v));
        }
        {
            int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
            if (unlikely(result < 0)) {
                Py_DECREF(v);
                return (int) -1;
            }
            is_negative = result == 1;
        }
        if (is_unsigned && unlikely(is_negative)) {
            Py_DECREF(v);
            goto raise_neg_overflow;
        } else if (is_negative) {
            stepval = PyNumber_Invert(v);
            Py_DECREF(v);
            if (unlikely(!stepval))
                return (int) -1;
        } else {
            stepval = v;
        }
        v = NULL;
        val = (int) 0;
        mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
        shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
        for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
            PyObject *tmp, *digit;
            long idigit;
            digit = PyNumber_And(stepval, mask);
            if (unlikely(!digit)) goto done;
            idigit = PyLong_AsLong(digit);
            Py_DECREF(digit);
            if (unlikely(idigit < 0)) goto done;
            val |= ((int) idigit) << bits;
            tmp = PyNumber_Rshift(stepval, shift);
            if (unlikely(!tmp)) goto done;
            Py_DECREF(stepval); stepval = tmp;
        }
        Py_DECREF(shift); shift = NULL;
        Py_DECREF(mask); mask = NULL;
        {
            long idigit = PyLong_AsLong(stepval);
            if (unlikely(idigit < 0)) goto done;
            remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
            if (unlikely(idigit >= (1L << remaining_bits)))
                goto raise_overflow;
            val |= ((int) idigit) << bits;
        }
        if (!is_unsigned) {
            if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
                goto raise_overflow;
            if (is_negative)
                val = ~val;
        }
        ret = 0;
    done:
        Py_XDECREF(shift);
        Py_XDECREF(mask);
        Py_XDECREF(stepval);
#endif
        if (unlikely(ret))
            return (int) -1;
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

/* FastTypeChecks */
#if CYTHON_COMPILING_IN_CPYTHON
static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
    while (a) {
        a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
        if (a == b)
            return 1;
    }
    return b == &PyBaseObject_Type;
}
static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (a == b) return 1;
    mro = a->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(a, b);
}
static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
    PyObject *mro;
    if (cls == a || cls == b) return 1;
    mro = cls->tp_mro;
    if (likely(mro)) {
        Py_ssize_t i, n;
        n = PyTuple_GET_SIZE(mro);
        for (i = 0; i < n; i++) {
            PyObject *base = PyTuple_GET_ITEM(mro, i);
            if (base == (PyObject *)a || base == (PyObject *)b)
                return 1;
        }
        return 0;
    }
    return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
}
#if PY_MAJOR_VERSION == 2
static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
    PyObject *exception, *value, *tb;
    int res;
    __Pyx_PyThreadState_declare
    __Pyx_PyThreadState_assign
    __Pyx_ErrFetch(&exception, &value, &tb);
    res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
    if (unlikely(res == -1)) {
        PyErr_WriteUnraisable(err);
        res = 0;
    }
    if (!res) {
        res = PyObject_IsSubclass(err, exc_type2);
        if (unlikely(res == -1)) {
            PyErr_WriteUnraisable(err);
            res = 0;
        }
    }
    __Pyx_ErrRestore(exception, value, tb);
    return res;
}
#else
static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
    if (exc_type1) {
        return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
    } else {
        return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
    }
}
#endif
static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
    Py_ssize_t i, n;
    assert(PyExceptionClass_Check(exc_type));
    n = PyTuple_GET_SIZE(tuple);
#if PY_MAJOR_VERSION >= 3
    for (i=0; i<n; i++) {
        if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
    }
#endif
    for (i=0; i<n; i++) {
        PyObject *t = PyTuple_GET_ITEM(tuple, i);
        #if PY_MAJOR_VERSION < 3
        if (likely(exc_type == t)) return 1;
        #endif
        if (likely(PyExceptionClass_Check(t))) {
            if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
        } else {
        }
    }
    return 0;
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
    if (likely(err == exc_type)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        if (likely(PyExceptionClass_Check(exc_type))) {
            return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
        } else if (likely(PyTuple_Check(exc_type))) {
            return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
        } else {
        }
    }
    return PyErr_GivenExceptionMatches(err, exc_type);
}
static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
    assert(PyExceptionClass_Check(exc_type1));
    assert(PyExceptionClass_Check(exc_type2));
    if (likely(err == exc_type1 || err == exc_type2)) return 1;
    if (likely(PyExceptionClass_Check(err))) {
        return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
    }
    return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
}
#endif

/* CStringEquals */
static CYTHON_INLINE int __Pyx_StrEq(const char *s1, const char *s2) {
    while (*s1 != '\0' && *s1 == *s2) { s1++; s2++; }
    return *s1 == *s2;
}

/* CheckBinaryVersion */
static unsigned long __Pyx_get_runtime_version(void) {
#if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
    return Py_Version & ~0xFFUL;
#else
    const char* rt_version = Py_GetVersion();
    unsigned long version = 0;
    unsigned long factor = 0x01000000UL;
    unsigned int digit = 0;
    int i = 0;
    while (factor) {
        while ('0' <= rt_version[i] && rt_version[i] <= '9') {
            digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
            ++i;
        }
        version += factor * digit;
        if (rt_version[i] != '.')
            break;
        digit = 0;
        factor >>= 8;
        ++i;
    }
    return version;
#endif
}
static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
    const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
    if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
        return 0;
    if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
        return 1;
    {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compile time Python version %d.%d "
                      "of module '%.100s' "
                      "%s "
                      "runtime version %d.%d",
                       (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
                       __Pyx_MODULE_NAME,
                       (allow_newer) ? "was newer than" : "does not match",
                       (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
       );
        return PyErr_WarnEx(NULL, message, 1);
    }
}

/* InitStrings */
#if PY_MAJOR_VERSION >= 3
static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
    if (t.is_unicode | t.is_str) {
        if (t.intern) {
            *str = PyUnicode_InternFromString(t.s);
        } else if (t.encoding) {
            *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
        } else {
            *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
        }
    } else {
        *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
    }
    if (!*str)
        return -1;
    if (PyObject_Hash(*str) == -1)
        return -1;
    return 0;
}
#endif
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION >= 3
        __Pyx_InitString(*t, t->p);
        #else
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        if (!*t->p)
            return -1;
        if (PyObject_Hash(*t->p) == -1)
            return -1;
        #endif
        ++t;
    }
    return 0;
}

#include <string.h>
static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
    size_t len = strlen(s);
    if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
        PyErr_SetString(PyExc_OverflowError, "byte string is too long");
        return -1;
    }
    return (Py_ssize_t) len;
}
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
    Py_ssize_t len = __Pyx_ssize_strlen(c_str);
    if (unlikely(len < 0)) return NULL;
    return PyByteArray_FromStringAndSize(c_str, len);
}
static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
#if !CYTHON_PEP393_ENABLED
static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    char* defenc_c;
    PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
    if (!defenc) return NULL;
    defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    {
        char* end = defenc_c + PyBytes_GET_SIZE(defenc);
        char* c;
        for (c = defenc_c; c < end; c++) {
            if ((unsigned char) (*c) >= 128) {
                PyUnicode_AsASCIIString(o);
                return NULL;
            }
        }
    }
#endif
    *length = PyBytes_GET_SIZE(defenc);
    return defenc_c;
}
#else
static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
    if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
    if (likely(PyUnicode_IS_ASCII(o))) {
        *length = PyUnicode_GET_LENGTH(o);
        return PyUnicode_AsUTF8(o);
    } else {
        PyUnicode_AsASCIIString(o);
        return NULL;
    }
#else
    return PyUnicode_AsUTF8AndSize(o, length);
#endif
}
#endif
#endif
static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
        return __Pyx_PyUnicode_AsStringAndSize(o, length);
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}
static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
    int retval;
    if (unlikely(!x)) return -1;
    retval = __Pyx_PyObject_IsTrue(x);
    Py_DECREF(x);
    return retval;
}
static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
    __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
#if PY_MAJOR_VERSION >= 3
    if (PyLong_Check(result)) {
        if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
                "__int__ returned non-int (type " __Pyx_FMT_TYPENAME ").  "
                "The ability to return an instance of a strict subclass of int is deprecated, "
                "and may be removed in a future version of Python.",
                result_type_name)) {
            __Pyx_DECREF_TypeName(result_type_name);
            Py_DECREF(result);
            return NULL;
        }
        __Pyx_DECREF_TypeName(result_type_name);
        return result;
    }
#endif
    PyErr_Format(PyExc_TypeError,
                 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
                 type_name, type_name, result_type_name);
    __Pyx_DECREF_TypeName(result_type_name);
    Py_DECREF(result);
    return NULL;
}
static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
#if CYTHON_USE_TYPE_SLOTS
  PyNumberMethods *m;
#endif
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_Check(x) || PyLong_Check(x)))
#else
  if (likely(PyLong_Check(x)))
#endif
    return __Pyx_NewRef(x);
#if CYTHON_USE_TYPE_SLOTS
  m = Py_TYPE(x)->tp_as_number;
  #if PY_MAJOR_VERSION < 3
  if (m && m->nb_int) {
    name = "int";
    res = m->nb_int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = m->nb_long(x);
  }
  #else
  if (likely(m && m->nb_int)) {
    name = "int";
    res = m->nb_int(x);
  }
  #endif
#else
  if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
    res = PyNumber_Int(x);
  }
#endif
  if (likely(res)) {
#if PY_MAJOR_VERSION < 3
    if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
#else
    if (unlikely(!PyLong_CheckExact(res))) {
#endif
        return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject *x;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(b);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    if (likely(__Pyx_PyLong_IsCompact(b))) {
        return __Pyx_PyLong_CompactValue(b);
    } else {
      const digit* digits = __Pyx_PyLong_Digits(b);
      const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}
static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
  if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
    return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
#if PY_MAJOR_VERSION < 3
  } else if (likely(PyInt_CheckExact(o))) {
    return PyInt_AS_LONG(o);
#endif
  } else {
    Py_ssize_t ival;
    PyObject *x;
    x = PyNumber_Index(o);
    if (!x) return -1;
    ival = PyInt_AsLong(x);
    Py_DECREF(x);
    return ival;
  }
}
static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
  return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
}
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
    return PyInt_FromSize_t(ival);
}


/* #### Code section: utility_code_pragmas_end ### */
#ifdef _MSC_VER
#pragma warning( pop )
#endif



/* #### Code section: end ### */
#endif /* Py_PYTHON_H */
