2023-07-15 19:27:22.311 python[1509:19794] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/cm/h6r34k6d7x5b9n9yg8m072_w0000gn/T/org.opensciencetools.psychopy.savedState 1.6979 WARNING psychopy.parallel has been imported on a Mac (which doesn't have a parallel port?) Traceback (most recent call last): File "/Users/Wu/Desktop/GUI_design/demo1.py", line 9, in <module> from utils.Resting import Resting File "/Users/Wu/Desktop/GUI_design/utils/Resting.py", line 7, in <module> from utils.basics.Score import Score File "/Users/Wu/Desktop/GUI_design/utils/basics/Score.py", line 7, in <module> from utils.basics.ratingscale import RatingScale File "/Users/Wu/Desktop/GUI_design/utils/basics/ratingscale.py", line 31, in <module> from past.builtins import basestring ModuleNotFoundError: No module named 'past' ################# Experiment ended with exit code 1 [pid:1509] #################
时间: 2024-01-03 22:05:53 浏览: 35
根据你提供的信息,看起来你的代码中少一个名为'past'的模块。这可能是因为你的Python环境中没有安装此模块。你可以尝试在终端中使用以下命令安装它:
```
pip install future
```
如果你使用的是 Python 3,请使用以下命令:
```
pip3 install future
```
安装完成后,再次运行代码,看看问题是否解决了。如果问题仍然存在,请确保你的代码中正确导入了所需的模块,并且模块的路径是正确的。
相关问题
############ Running: /Users/Wu/Desktop/GUI_design/utils/Resting.py ############ 2023-07-15 19:34:58.930 python[2077:28743] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/cm/h6r34k6d7x5b9n9yg8m072_w0000gn/T/org.opensciencetools.psychopy.savedState Traceback (most recent call last): File "/Users/Wu/Desktop/GUI_design/utils/Resting.py", line 4, in <module> from utils.Join import Join ModuleNotFoundError: No module named 'utils' ################# Experiment ended with exit code 1 [pid:2077] ################# ]
根据错误信息,你的代码在 `Resting.py` 文件中无法找到名为 'utils' 的模块。这可能是由于以下原因之一导致的:
1. 模块路径错误:请确保在 `Resting.py` 文件中正确导入了 'utils' 模块,并且路径是正确的。你可以检查导入语句,确认路径是否正确。
2. 缺少模块:如果确实缺少 'utils' 模块,你需要确认该模块是否已正确安装。请确保 'utils' 模块已通过 `pip` 或其他适当的方式进行安装。
3. 文件或文件夹命名问题:请确保文件和文件夹的命名是正确的,确保大小写一致,并且文件和文件夹的名称没有任何特殊字符或空格。
请检查以上几点,并尝试解决问题。如果问题仍然存在,请提供更多的代码和错误信息,以便我能够更好地帮助你。
2023-07-14T05:18:42.813472Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33) starting as process 30413 2023-07-14T05:18:42.827066Z 0 [Warning] [MY-010075] [Server] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: e64114ff-2205-11ee-870e-080027f67bef. 2023-07-14T05:18:42.831208Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory. 2023-07-14T05:18:42.831274Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-07-14T05:18:43.035632Z 1 [ERROR] [MY-013090] [InnoDB] Unsupported redo log format (v0). The redo log was created before MySQL 5.7.9 2023-07-14T05:18:43.035675Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2023-07-14T05:18:43.468804Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine. 2023-07-14T05:18:43.469038Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2023-07-14T05:18:43.469053Z 0 [ERROR] [MY-010119] [Server] Aborting 2023-07-14T05:18:43.469908Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.33) MySQL Community Server - GPL. 2023-07-14T05:25:59.141609Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.33) starting as process 6178 2023-07-14T05:25:59.156401Z 1 [System] [MY-011012] [Server] Starting upgrade of data directory. 2023-07-14T05:25:59.156446Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started. 2023-07-14T05:25:59.356548Z 1 [ERROR] [MY-013090] [InnoDB] Unsupported redo log format (v0). The redo log was created before MySQL 5.7.9 2023-07-14T05:25:59.356610Z 1 [ERROR] [MY-012930] [InnoDB] Plugin initialization aborted with error Generic error. 2023-07-14T05:25:59.793224Z 1 [ERROR] [MY-011013] [Server] Failed to initialize DD Storage Engine. 2023-07-14T05:25:59.793509Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed. 2023-07-14T05:25:59.793525Z 0 [ERROR] [MY-010119] [Server] Aborting @
根据您提供的日志信息,MySQL启动失败并显示了一系列错误消息。根据错误消息,这可能是由于InnoDB日志格式不受支持导致的。这可能是由于您尝试将之前版本的数据目录与当前安装的MySQL版本一起使用。
为了解决这个问题,您可以尝试以下步骤:
1. 备份数据目录:在继续之前,请确保先备份MySQL的数据目录,以防止数据丢失。
2. 清除数据目录:停止MySQL服务后,删除数据目录中的所有文件和子目录。默认情况下,数据目录通常位于/var/lib/mysql。
3. 重新初始化数据目录:使用以下命令重新初始化数据目录:
sudo mysqld --initialize-insecure
这将重新创建并初始化一个空的数据目录。
4. 启动MySQL服务器:使用以下命令启动MySQL服务器:
sudo systemctl start mysqld
检查MySQL服务器的状态以确保它已成功启动:
sudo systemctl status mysqld
如果上述步骤无法解决问题,您可能需要考虑完全卸载MySQL并重新安装。在重新安装之前,请确保删除所有与MySQL相关的文件和目录,并备份重要的数据。
请注意,执行这些操作可能会导致数据丢失,请确保在执行任何操作之前进行适当的备份。如果您对MySQL安装和配置不确定,建议寻求专业人士的帮助或参考MySQL官方文档。
相关推荐
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)