37,744
社区成员




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