TypeError: an integer is required (got type NoneType)这种错误怎么解决啊?求大佬指点

呢木易 2023-06-04 17:29:56

Traceback (most recent call last):
  File "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 305, in do_exit
    import java.lang.System
  File "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import
    module = self._system_import(name, *args, **kwargs)
ModuleNotFoundError: No module named 'java'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\_pydev_bundle\pydev_umd.py", line 197, in runfile
    pydev_imports.execfile(filename, global_vars, local_vars)  # execute the script
  File "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:/python_practice/bert-master/bert-master/bert-master/create_pretraining_data.py", line 471, in <module>
    tf.app.run()
  File "D:\Anaconda3\envs\bert_tensorflow\lib\site-packages\tensorflow_core\python\platform\app.py", line 40, in run
    _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
  File "D:\Anaconda3\envs\bert_tensorflow\lib\site-packages\absl\app.py", line 308, in run
    _run_main(main, args)
  File "D:\Anaconda3\envs\bert_tensorflow\lib\site-packages\absl\app.py", line 254, in _run_main
    sys.exit(main(argv))
  File "D:\PyCharm 2020.1.3\plugins\python\helpers\pydev\pydevconsole.py", line 310, in do_exit
    os._exit(args[0])
TypeError: an integer is required (got type NoneType)
 

...全文
529 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
呢木易 2023-06-05
  • 打赏
  • 举报
回复 1

已经解决,可能是因为和其他项目在同一目录下,然后其他项目的库和TensorFlow不匹配什么的,把这个项目单独拿出来再给他新建一个虚拟环境就好了。

37,744

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • WuKongSecurity@BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧