鱼C论坛

 找回密码
 立即注册
12
返回列表 发新帖
楼主: LYLlllhhh

新人求帮忙,鱼币少以后富裕了一定补上:想处理一类文本

[复制链接]
 楼主| 发表于 2021-2-22 11:56:27 | 显示全部楼层

Traceback (most recent call last):
  File "C:/Users/lyl/AppData/Local/Programs/Python/Python37/test (2).py", line 1, in <module>
    import docx
会出现这个错误,是什么问题呢
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-22 12:15:05 From FishC Mobile | 显示全部楼层
看着很像乱数假文...
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-22 12:34:24 | 显示全部楼层
LYLlllhhh 发表于 2021-2-22 11:56
Traceback (most recent call last):
  File "C:/Users/lyl/AppData/Local/Programs/Python/Python37/te ...

缺模块吧 在cmd 右键粘贴
  1. pip install python-docx
复制代码

缺openpyxl 就cmd 右键粘贴
  1. pip install openpyxl
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-22 12:38:27 | 显示全部楼层
LYLlllhhh 发表于 2021-2-22 11:56
Traceback (most recent call last):
  File "C:/Users/lyl/AppData/Local/Programs/Python/Python37/te ...

记得你  运行代码的文件跟你的  Word文档文件  放在一起运行
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-2-23 09:22:56 | 显示全部楼层
qq1151985918 发表于 2021-2-22 12:38
记得你  运行代码的文件跟你的  Word文档文件  放在一起运行

有个提示是Cannot find reference 'Document' in 'docx.py'
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 09:54:24 | 显示全部楼层
LYLlllhhh 发表于 2021-2-23 09:22
有个提示是Cannot find reference 'Document' in 'docx.py'

如果有报错就不能发全吗?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 09:56:06 | 显示全部楼层
告诉你的两个模块 有没有安装? 安装了是什么结果 ? 遇到问题光跟我说有个提示  我知道是啥提示?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-2-23 09:56:44 | 显示全部楼层
qq1151985918 发表于 2021-2-23 09:56
告诉你的两个模块 有没有安装? 安装了是什么结果 ? 遇到问题光跟我说有个提示  我知道是啥提示?

都安装了呀,都成了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 10:04:49 | 显示全部楼层
LYLlllhhh 发表于 2021-2-23 09:56
都安装了呀,都成了

报错呢?
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-2-23 10:05:28 | 显示全部楼层
qq1151985918 发表于 2021-2-23 09:54
如果有报错就不能发全吗?

C:\Users\lyl\PycharmProjects\pythonProject1\venv\Scripts\python.exe D:/本人/2021寒假XX/麻烦了/002.py
Traceback (most recent call last):

File "D:/本人/2021寒假XX/麻烦了/002.py", line 1, in <module>
    import docx
  File "C:\Users\lyl\PycharmProjects\pythonProject1\venv\lib\site-packages\docx.py", line 30, in <module>
    from exceptions import PendingDeprecationWarning
ModuleNotFoundError: No module named 'exceptions'

Process finished with exit code 1
麻烦了
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 10:09:46 | 显示全部楼层
你在cmd   输入
  1. pip list
复制代码
把结果发来
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 10:18:35 | 显示全部楼层
LYLlllhhh 发表于 2021-2-23 10:05
C:%users\lyl\PycharmProjects\pythonProject1\venv\Scripts\python.exe D:/本人/2021寒假XX/麻烦了/002. ...

自己搞不定加我QQ 1151985918
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2021-2-23 10:19:01 | 显示全部楼层
qq1151985918 发表于 2021-2-23 10:09
你在cmd   输入  把结果发来
  1. alabaster                          0.7.12
  2. anaconda-client                    1.7.2
  3. anaconda-navigator                 1.10.0
  4. anaconda-project                   0.8.3
  5. argh                               0.26.2
  6. argon2-cffi                        20.1.0
  7. asn1crypto                         1.4.0
  8. astroid                            2.4.2
  9. astropy                            4.0.2
  10. async-generator                    1.10
  11. atomicwrites                       1.4.0
  12. attrs                              20.3.0
  13. autopep8                           1.5.4
  14. Babel                              2.8.1
  15. backcall                           0.2.0
  16. backports.functools-lru-cache      1.6.1
  17. backports.shutil-get-terminal-size 1.0.0
  18. backports.tempfile                 1.0
  19. backports.weakref                  1.0.post1
  20. bcrypt                             3.2.0
  21. beautifulsoup4                     4.9.3
  22. bitarray                           1.6.1
  23. bkcharts                           0.2
  24. bleach                             3.2.1
  25. bokeh                              2.2.3
  26. boto                               2.49.0
  27. Bottleneck                         1.3.2
  28. brotlipy                           0.7.0
  29. certifi                            2020.6.20
  30. cffi                               1.14.3
  31. chardet                            3.0.4
  32. click                              7.1.2
  33. cloudpickle                        1.6.0
  34. clyent                             1.2.2
  35. colorama                           0.4.4
  36. comtypes                           1.1.7
  37. conda                              4.9.2
  38. conda-build                        3.20.5
  39. conda-package-handling             1.7.2
  40. conda-verify                       3.4.2
  41. contextlib2                        0.6.0.post1
  42. cryptography                       3.1.1
  43. cycler                             0.10.0
  44. Cython                             0.29.21
  45. cytoolz                            0.11.0
  46. dask                               2.30.0
  47. decorator                          4.4.2
  48. defusedxml                         0.6.0
  49. diff-match-patch                   20200713
  50. distributed                        2.30.1
  51. docutils                           0.16
  52. docx                               0.2.4
  53. entrypoints                        0.3
  54. et-xmlfile                         1.0.1
  55. fastcache                          1.1.0
  56. filelock                           3.0.12
  57. flake8                             3.8.4
  58. Flask                              1.1.2
  59. fsspec                             0.8.3
  60. future                             0.18.2
  61. gevent                             20.9.0
  62. glob2                              0.7
  63. greenlet                           0.4.17
  64. h5py                               2.10.0
  65. HeapDict                           1.0.1
  66. html5lib                           1.1
  67. idna                               2.10
  68. imageio                            2.9.0
  69. imagesize                          1.2.0
  70. importlib-metadata                 2.0.0
  71. iniconfig                          1.1.1
  72. intervaltree                       3.1.0
  73. ipykernel                          5.3.4
  74. ipython                            7.19.0
  75. ipython-genutils                   0.2.0
  76. ipywidgets                         7.5.1
  77. isort                              5.6.4
  78. itsdangerous                       1.1.0
  79. jdcal                              1.4.1
  80. jedi                               0.17.1
  81. Jinja2                             2.11.2
  82. joblib                             0.17.0
  83. json5                              0.9.5
  84. jsonschema                         3.2.0
  85. jupyter                            1.0.0
  86. jupyter-client                     6.1.7
  87. jupyter-console                    6.2.0
  88. jupyter-core                       4.6.3
  89. jupyterlab                         2.2.6
  90. jupyterlab-pygments                0.1.2
  91. jupyterlab-server                  1.2.0
  92. keyring                            21.4.0
  93. kiwisolver                         1.3.0
  94. lazy-object-proxy                  1.4.3
  95. libarchive-c                       2.9
  96. llvmlite                           0.34.0
  97. locket                             0.2.0
  98. lxml                               4.6.1
  99. MarkupSafe                         1.1.1
  100. matplotlib                         3.3.2
  101. mccabe                             0.6.1
  102. menuinst                           1.4.16
  103. mistune                            0.8.4
  104. mkl-fft                            1.2.0
  105. mkl-random                         1.1.1
  106. mkl-service                        2.3.0
  107. mock                               4.0.2
  108. more-itertools                     8.6.0
  109. mpmath                             1.1.0
  110. msgpack                            1.0.0
  111. multipledispatch                   0.6.0
  112. navigator-updater                  0.2.1
  113. nbclient                           0.5.1
  114. nbconvert                          6.0.7
  115. nbformat                           5.0.8
  116. nest-asyncio                       1.4.2
  117. networkx                           2.5
  118. nltk                               3.5
  119. nose                               1.3.7
  120. notebook                           6.1.4
  121. numba                              0.51.2
  122. numexpr                            2.7.1
  123. numpy                              1.19.2
  124. numpydoc                           1.1.0
  125. olefile                            0.46
  126. openpyxl                           3.0.5
  127. packaging                          20.4
  128. pandas                             1.1.3
  129. pandocfilters                      1.4.3
  130. paramiko                           2.7.2
  131. parso                              0.7.0
  132. partd                              1.1.0
  133. path                               15.0.0
  134. pathlib2                           2.3.5
  135. pathtools                          0.1.2
  136. patsy                              0.5.1
  137. pep8                               1.7.1
  138. pexpect                            4.8.0
  139. pickleshare                        0.7.5
  140. Pillow                             8.0.1
  141. pip                                20.2.4
  142. pkginfo                            1.6.1
  143. pluggy                             0.13.1
  144. ply                                3.11
  145. prometheus-client                  0.8.0
  146. prompt-toolkit                     3.0.8
  147. psutil                             5.7.2
  148. py                                 1.9.0
  149. pycodestyle                        2.6.0
  150. pycosat                            0.6.3
  151. pycparser                          2.20
  152. pycurl                             7.43.0.6
  153. pydocstyle                         5.1.1
  154. pyflakes                           2.2.0
  155. Pygments                           2.7.2
  156. pylint                             2.6.0
  157. PyNaCl                             1.4.0
  158. pyodbc                             4.0.0-unsupported
  159. pyOpenSSL                          19.1.0
  160. pyparsing                          2.4.7
  161. pyreadline                         2.1
  162. pyrsistent                         0.17.3
  163. PySocks                            1.7.1
  164. pytest                             0.0.0
  165. python-dateutil                    2.8.1
  166. python-docx                        0.8.10
  167. python-jsonrpc-server              0.4.0
  168. python-language-server             0.35.1
  169. pytz                               2020.1
  170. PyWavelets                         1.1.1
  171. pywin32                            227
  172. pywin32-ctypes                     0.2.0
  173. pywinpty                           0.5.7
  174. PyYAML                             5.3.1
  175. pyzmq                              19.0.2
  176. QDarkStyle                         2.8.1
  177. QtAwesome                          1.0.1
  178. qtconsole                          4.7.7
  179. QtPy                               1.9.0
  180. regex                              2020.10.15
  181. requests                           2.24.0
  182. rope                               0.18.0
  183. Rtree                              0.9.4
  184. ruamel-yaml                        0.15.87
  185. scikit-image                       0.17.2
  186. scikit-learn                       0.23.2
  187. scipy                              1.5.2
  188. seaborn                            0.11.0
  189. Send2Trash                         1.5.0
  190. setuptools                         50.3.1.post20201107
  191. simplegeneric                      0.8.1
  192. singledispatch                     3.4.0.3
  193. sip                                4.19.13
  194. six                                1.15.0
  195. snowballstemmer                    2.0.0
  196. sortedcollections                  1.2.1
  197. sortedcontainers                   2.2.2
  198. soupsieve                          2.0.1
  199. Sphinx                             3.2.1
  200. sphinxcontrib-applehelp            1.0.2
  201. sphinxcontrib-devhelp              1.0.2
  202. sphinxcontrib-htmlhelp             1.0.3
  203. sphinxcontrib-jsmath               1.0.1
  204. sphinxcontrib-qthelp               1.0.3
  205. sphinxcontrib-serializinghtml      1.1.4
  206. sphinxcontrib-websupport           1.2.4
  207. spyder                             4.1.5
  208. spyder-kernels                     1.9.4
  209. SQLAlchemy                         1.3.20
  210. statsmodels                        0.12.0
  211. sympy                              1.6.2
  212. tables                             3.6.1
  213. tblib                              1.7.0
  214. terminado                          0.9.1
  215. testpath                           0.4.4
  216. threadpoolctl                      2.1.0
  217. tifffile                           2020.10.1
  218. toml                               0.10.1
  219. toolz                              0.11.1
  220. tornado                            6.0.4
  221. tqdm                               4.50.2
  222. traitlets                          5.0.5
  223. typing-extensions                  3.7.4.3
  224. ujson                              4.0.1
  225. unicodecsv                         0.14.1
  226. urllib3                            1.25.11
  227. watchdog                           0.10.3
  228. wcwidth                            0.2.5
  229. webencodings                       0.5.1
  230. Werkzeug                           1.0.1
  231. wheel                              0.35.1
  232. widgetsnbextension                 3.5.1
  233. win-inet-pton                      1.1.0
  234. win-unicode-console                0.5
  235. wincertstore                       0.2
  236. wrapt                              1.11.2
  237. xlrd                               1.2.0
  238. XlsxWriter                         1.3.7
  239. xlwings                            0.20.8
  240. xlwt                               1.3.0
  241. xmltodict                          0.12.0
  242. yapf                               0.30.0
  243. zict                               2.0.0
  244. zipp                               3.4.0
  245. zope.event                         4.5.0
  246. zope.interface                     5.1.2
复制代码
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 21:20:01 | 显示全部楼层
No module named 'exceptions'
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-23 22:24:21 | 显示全部楼层
qq1151985918 发表于 2021-2-23 10:09
你在cmd   输入  把结果发来

老哥,你上哪儿学的这么多模块

都没见过
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-24 02:22:58 From FishC Mobile | 显示全部楼层
Daniel_Zhang 发表于 2021-2-23 22:24
老哥,你上哪儿学的这么多模块

都没见过

老哥那不是我的模块啊,是楼主的。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2021-2-24 11:52:16 | 显示全部楼层
qq1151985918 发表于 2021-2-24 02:22
老哥那不是我的模块啊,是楼主的。

好吧
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-20 02:40

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表