tags: python
2019-12-23 13:28:24,415 - INFO: Ongoing D:\Anaconda_program\hangtian_spider\hangkong/data/EI/01.txt file<RECORD 216>Record reading
--- Logging error ---
Traceback (most recent call last):
File "D:\Anaconda3\lib\logging\handlers.py", line 72, in emit
self.doRollover()
File "D:\Anaconda3\lib\logging\handlers.py", line 173, in doRollover
self.rotate(self.baseFilename, dfn)
File "D:\Anaconda3\lib\logging\handlers.py", line 113, in rotate
os.rename(source, dest)
PermissionError: [WinError 32] This file is being used by another program and cannot be accessed by the process.: 'D:\\Anaconda_program\\hangtian_spider\\hangkong\\log\\ei_txt_file.log' -> 'D:\\Anaconda_program\\hangtian_spider\\hangkong\\log\\ei_txt_file.log.1'
Call stack:
File "D:\Anaconda3\lib\threading.py", line 884, in _bootstrap
self._bootstrap_inner()
File "D:\Anaconda3\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "D:\Anaconda3\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "D:\Anaconda_program\hangtian_spider\hangkong\web\app\data\EI_Data.py", line 228, in get_ei_txt_file
read_txt(root_dir+file)
File "D:\Anaconda_program\hangtian_spider\hangkong\web\app\data\EI_Data.py", line 260, in read_txt
ei_data.add_ei_data(re_dict)
File "D:\Anaconda_program\hangtian_spider\hangkong\web\app\data\EI_Data.py", line 126, in add_ei_data
logger.info("The key fields screened in this record are: record_dict.keys(): {}".format(', '.join(record_dict.keys())))
Message: 'The key fields screened in this record are: record_dict.keys(): ei_an, ei_ti, ei_au, ei_af, ei_ca, ei_st, ei_ast, ei_vl, ei_is, ei_isd, ei_py, ei_pg, ei_la, ei_sn, ei_sn, ei_ , ei_ab, ei_nr, ei_mh, ei_ctt, ei_uctt, ei_cfc, ei_di, ei_db, ei_cit'
Arguments: ()
2019-12-23 13:28:24,467 - INFO: The key fields screened in this record are: record_dict.keys(): ei_an, ei_ti, ei_au, ei_af, ei_ca, ei_st, ei_ast, ei_vl, ei_is, ei_isd, ei_py, ei_pg, ei_la, ei_sn, ei_cn, ei_dt, ei_pu, ei_ab, ei_nr, ei_mh, ei_ctt, ei_uctt, ei_cfc, ei_di, ei_db, ei_cit
--- Logging error ---
from logging import getLogger, INFO
from concurrent_log_handler import ConcurrentRotatingFileHandler
import os
log = getLogger()
# Use an absolute path to prevent file rotation trouble.
logfile = os.path.abspath("mylogfile.log")
# Rotate log after reaching 512K, keep 5 old copies.
rotateHandler = ConcurrentRotatingFileHandler(logfile, "a", 512*1024, 5)
log.addHandler(rotateHandler)
log.setLevel(INFO)
log.info("Here is a very exciting log message, just for you")
https://github.com/Preston-Landers/concurrent-log-handler
https://blog.csdn.net/chongtong/article/details/80831782
When installing the python package with xgboost, the following error may occur: Because the terminal under Window is or the GBK encoding is displayed, the PIP source code is also modified. Open C: \ P...
When making image processing, I used three modules OS, PIL, CV2. I encountered a bug who plagued one morning, I investigated several resource monitor ~~~, bug as follows: Description of Requirement: 1...
Problem Description Kafka deployed in the Windows environment is hung after running for a period of time. View loglogs/server.log Discover the following errors: reason When the consumer's offset log i...
Article catalog Problem 2. Code example 3. Reason 4. Solve Problem Python Flask Logging Log Reports An error "Another program is using this file, the process cannot be accessed" 2. Code exam...
Paste the error message first Cause Analysis: Failed to clean up the consumer_offset record in the D:\tmp\kafka-logs directory consumer_offset is the topic that Kafka automatically saves the offset, a...
When I recently dealt with strange problems, I made a low -level error, wasted a lot of time, and even watched the C code at the bottom of the JDK. The following test code is run by the Windows enviro...
kuaiya\kzippb-This file is being used by another program and the process cannot access it. Problem Description: Usually when deleting a folder or deleting a single file, we often encounter the followi...
Problem: The ASP.NET Core project deployed on IIS will cause a process occupation error when updating Initial solution: 1. Close the application pool 2. Close the website 3. Update the p...
Article catalog First, error information Second, the solution First, error information FLUTTER Mixed Development Project: In the Android project, embed the flutter page, accidentally run the Flutter p...
Report an error: Another program has locked a part of the file and the process cannot access it Cannot open the disk "E:\Ubuntu\Ubuntu 64-bit .vmdk" or one of the snapshot disks it depends o...