FILE结构[zt]

博客给出了一个自定义的FILE结构体定义,该结构体包含指针、字符数量、标志、文件句柄等成员,用于表示文件相关信息,体现了在编程中对文件操作的数据结构设计。

typedef struct _iobuf{
                          char   *_ptr;
                          /* pointer to next character position  */
                          int   _cnt;
                          /* number of characters left in buffer */
                          char   *_base;
                          /* pointer to start of buffer          */
                          int   _flag;
                          /* various info about this channel     */
                          int   _file;
                          /* file "handle"                       */
                          unsigned _bufsiz;
                          /* size of buffer being used           */
                          #ifdef   BIGBUF
                             int   _seg;
                             /* segment of buffer if _IOBIGBUF   */
                          #endif
                       } FILE;


D:\pyVenv\mypyenv310\Scripts\python.exe E:\Code\EquipmentRegistryDataPlatform\app\tasks\async_zt_standingbook.py Traceback (most recent call last): File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\backends\mysql\client.py", line 50, in translate_exceptions_ return await func(self, *args) File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\backends\mysql\client.py", line 209, in execute_query await cursor.execute(query, values) File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\cursors.py", line 239, in execute await self._query(query) File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\cursors.py", line 457, in _query await conn.query(q) File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\connection.py", line 469, in query await self._read_query_result(unbuffered=unbuffered) File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\connection.py", line 683, in _read_query_result await result.read() File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\connection.py", line 1164, in read first_packet = await self.connection._read_packet() File "D:\pyVenv\mypyenv310\lib\site-packages\aiomysql\connection.py", line 652, in _read_packet packet.raise_for_error() File "D:\pyVenv\mypyenv310\lib\site-packages\pymysql\protocol.py", line 219, in raise_for_error err.raise_mysql_exception(self._data) File "D:\pyVenv\mypyenv310\lib\site-packages\pymysql\err.py", line 150, in raise_mysql_exception raise errorclass(errno, errval) pymysql.err.OperationalError: (1054, "Unknown column 'updated_by' in 'field list'") During handling of the above exception, another exception occurred: Traceback (most recent call last): File "E:\Code\EquipmentRegistryDataPlatform\app\tasks\async_zt_standingbook.py", line 56, in <module> run_async(insert_zt_standingbook()) File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\__init__.py", line 643, in run_async loop.run_until_complete(coro) File "D:\application\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete return future.result() File "E:\Code\EquipmentRegistryDataPlatform\app\tasks\async_zt_standingbook.py", line 52, in insert_zt_standingbook await ZtStandingBook.update_or_create(zt_id=zt_id, defaults=data) File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\models.py", line 1180, in update_or_create instance = await cls.select_for_update().using_db(connection).get_or_none(**kwargs) File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\queryset.py", line 1235, in _execute instance_list = await self._db.executor_class( File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\backends\base\executor.py", line 108, in execute_select _, raw_results = await self.db.execute_query(sql, values) File "D:\pyVenv\mypyenv310\lib\site-packages\tortoise\backends\mysql\client.py", line 58, in translate_exceptions_ raise OperationalError(exc) tortoise.exceptions.OperationalError: (1054, "Unknown column 'updated_by' in 'field list'")
08-21
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值