mininet与ryu通信过程中的问题集合

目录

1、Tkinter回调异常问题

2、pip指令出现SyntaxError: invalid syntax

3、ModuleNotFoundError: No module named 'thread'

4、ModuleNotFoundError: No module named 'config'

5、AttributeError: type object 'Config' has no attribute 'queue_lenght'

6、NameError: name 'buffer' is not defined

7、Mininet创建拓扑之后主机之间ping不通


1、Tkinter回调异常问题

miniedit文件保存时,遇到Tkinter回调异常问题,具体报错信息如下:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/usr/lib/python3.6/tkinter/__init__.py", line 1705, in __call__ return self.func(*args)
  File "./miniedit.py", line 1707, in exportScript f. write("#!/usr/bin/env python\n")
TypeError: a bytes-like object is required, not 'str'

此种现象是安装的miniedit和Python3文件有问题,非个人编写错误。

2、pip指令出现SyntaxError: invalid syntax

原因及解决方案参考:https://blog.csdn.net/lzRush/article/details/114213053

3、ModuleNotFoundError: No module named 'thread'

from thread import start_new_thread
改为:
from _thread import start_new_thread

4、ModuleNotFoundError: No module named 'config'

参考解决方案:https://www.jianshu.com/p/5ed26aa35b9bhttps://blog.csdn.net/u011728480/article/details/106783149,回到主目录下运行如下代码:

pip install config

5、AttributeError: type object 'Config' has no attribute 'queue_lenght'

原因是:“config”文件名与Python的库重名,Python库内没有方法“queue_lenght”,将自主编写的“config”文件名改为“configuration”

具体解决方案参考:https://blog.csdn.net/weixin_35737303/article/details/80203586?utm_medium=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs&dist_request_id=1328740.51120.16170929373733551&depth_1-utm_source=distribute.pc_relevant_t0.none-task-blog-2%7Edefault%7EBlogCommendFromMachineLearnPai2%7Edefault-1.baidujs

6、NameError: name 'buffer' is not defined

原因是:buffer在Python 2中使用,在Python 3 中已经被memoryview取代,在文件中加入:

import sys
if sys.version_info > (3,):
   buffer = memoryview

7、Mininet创建拓扑之后主机之间ping不通

解决方案:https://github.com/mininet/mininet/wiki/FAQ#ethernet-loopshttps://www.zhihu.com/question/266202467

  • 1
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值