Giter Club home page Giter Club logo

daycount-nbt's Introduction

daycount-nbt's People

Contributors

alex3236 avatar cmbill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

rzbfreebird

daycount-nbt's Issues

mcdr2.0插件在cp950解码下失效

windows10
mcdr2.0
使用旧版无问题
新版报错

[MCDR] [17:11:02] [TaskExecutor/INFO] [daycount_nbt]: 读取配置文件失败,使用默认值: Expecting value: line 5 column 17 (char 114)
[MCDR] [17:11:02] [TaskExecutor/ERROR]: Error invoking listener EventListener[[email protected],priority=1000,callback=<function on_load at 0x0000024364502280>]
Traceback (most recent call last):
  File "C:\Python39\lib\site-packages\mcdreforged\plugin\plugin_manager.py", line 474, in trigger_listener
    listener.execute(listener.plugin.server_interface, *args)
  File "C:\Python39\lib\site-packages\mcdreforged\plugin\plugin_event.py", line 79, in execute
    return self.callback(*args, **kwargs)
  File "plugins\DayCountNBT-v2.0.2.mcdr\daycount_nbt\__init__.py", line 32, in on_load
    config = server.load_config_simple(target_class=Configure)
  File "C:\Python39\lib\site-packages\mcdreforged\plugin\server_interface.py", line 746, in load_config_simple
    self.save_config_simple(result_config, file_name=file_name, in_data_folder=in_data_folder)
  File "C:\Python39\lib\site-packages\mcdreforged\plugin\server_interface.py", line 766, in save_config_simple
    json.dump(data, file, indent=4, ensure_ascii=False)
  File "C:\Python39\lib\json\__init__.py", line 180, in dump
    fp.write(chunk)
UnicodeEncodeError: 'cp950' codec can't encode character '\u8fd9' in position 1: illegal multibyte sequence

无法正常释放config文件

报错如下

[MCDR] [2021-09-03 11:35:43] [TaskExecutor/ERROR]: Error invoking listener EventListener[[email protected],priority=1000,callback=<function on_load at 0x000001D4808B0940>]
Traceback (most recent call last):
  File "D:\Minecraft\生电服\1.16.5\mcdreforged\plugin\plugin_manager.py", line 474, in trigger_listener
    listener.execute(listener.plugin.server_interface, *args)
  File "D:\Minecraft\生电服\1.16.5\mcdreforged\plugin\plugin_event.py", line 79, in execute
    return self.callback(*args, **kwargs)
  File "plugins\DayCountNBT-v2.0.1.mcdr\daycount_nbt\__init__.py", line 32, in on_load
    config = server.load_config_simple('daycountNBT.json', target_class=Configure, in_data_folder=False)
  File "D:\Minecraft\生电服\1.16.5\mcdreforged\plugin\server_interface.py", line 746, in load_config_simple
    self.save_config_simple(result_config, file_name=file_name, in_data_folder=in_data_folder)
  File "D:\Minecraft\生电服\1.16.5\mcdreforged\plugin\server_interface.py", line 763, in save_config_simple
    os.makedirs(target_folder)
  File "C:\Users\Azure\AppData\Local\Programs\Python\Python39\lib\os.py", line 225, in makedirs
    mkdir(name, mode)
FileNotFoundError: [WinError 3] 系统找不到指定的路径。: ''

此时config文件夹内仍未创建config文件

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.