python新建word文档
import re
import os, sys
import win32com
from win32com.client import Dispatch,constants
Dir = r'C:\Users\CXM\Desktop\01.docx'
word = Dispatch('word.application')
word.displayalerts = 0
word.visible = True
doc = word.Documents.Open(Dir)
doc.Close()
word.Quit()
错误提示
Traceback (most recent call last):
File "C:\Users\CXM\Desktop\test3.py", line 8, in
word.displayalerts = 0
File "D:\Program Files\Python32\lib\site-packages\win32com\client\__init__.py", line 473, in __setattr__
raise AttributeError("'%s' object has no attribute '%s'" % (repr(self), attr))
AttributeError: '' object has no attribute 'displayalerts'
之前一直可以的,不知为何突出出现了这个问题
更新时间:2023-09-26 09:09
最满意答案
默认的路径是你安装时候指定的 如果用的LNMP之类的安装包 你可以在SHELL下 whereisnginx 找到相应的路径之后 在NGINX下的CONF文件夹里看配置文件,日志文件如果记录了话 在配置文件里有路径的~
其他回答
进入 c:\winnt\system32\logfiles 下,就是你的weblog了,里面的子目录对应你的web..
相关问答
更多-
怎么关闭nginx日志记录[2022-01-27]
access_log /dev/null error_log /dev/null kill -HUP `cat logs/nginx.pid` -
nginx配置好后 发现不能启动[2022-06-11]
这个报错日志不是表示nginx无法启动,这个只是正常的请求资源失败的报错。有这个日志表示你的nginx其实已经启动了。 -
我的nginx日志怎么还是在usr下面[2024-02-14]
解决了,原来我以前删除nginx.conf中的默认站配置的时候把日志的一起删除了,谢谢军哥提醒 -
怎么关闭nginx日志记录[2023-06-21]
access_log /dev/null error_log /dev/null kill -HUP `cat logs/nginx.pid` -
如何启动nginx web日志[2022-06-19]
默认的路径是你安装时候指定的 如果用的LNMP之类的安装包 你可以在SHELL下 whereisnginx 找到相应的路径之后 在NGINX下的CONF文件夹里看配置文件,日志文件如果记录了话 在配置文件里有路径的~ -
2016/09/08 15:44:38 [emerg] 24975#24975: unknown directive "lewisfrost" in /etc/nginx/sites-enabled/spotfrost_jobs:9 你的nginx.conf中有一个错误 lewisfrost /home/lewisfrost/apps/spotfrost_jobs/current/public; 应该 root /home/lewisfrost/apps/spotfrost_jobs/current/p ...
-
尝试这个: sudo passenger start -e production Try this: sudo passenger start -e production
-
好吧,如果这是你的启动脚本,而nginx曾经使用它,那么Nginx已经被某些东西或某人删除了。 Well, if this is your start up script and nginx used to work with it then, Nginx has been removed by something or someone.
-
Nginx在启动时崩溃(Nginx is crashing at boot)[2022-04-03]
这是快速修复,如果你想让你的Nginx现在工作,但这不是永久的解决方案,如果你重新启动服务器然后再次运行相同的命令再次获得nginx。 这将杀死PORT 98进程 fuser -k 98/tcp service nginx start Here is the Quick fix, if you want to get your Nginx to work for now, but this isn't permanent solution, if you reboot server then again ... -
为什么nginx无法启动?(why does nginx fail to start?)[2021-12-24]
/etc/nginx/nginx.conf不是存储服务器设置的地方。 此文件应包含有关将在其下运行的用户和其他全局设置的信息。 通常它会包含这样的东西: user www-data; worker_processes 4; pid /run/nginx.pid; events { worker_connections 768; } http { sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeou ...