Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topology not opening when saving it #1190

Open
Nasaaaaaa12 opened this issue Jul 29, 2023 · 2 comments
Open

Topology not opening when saving it #1190

Nasaaaaaa12 opened this issue Jul 29, 2023 · 2 comments

Comments

@Nasaaaaaa12
Copy link

Nasaaaaaa12 commented Jul 29, 2023

while trying to open my saved topology it open as empty with the following error:

topo=none
Exception in Tkinter callback
Traceback (most recent call last):
File '"usr/lib/python3.10/tkinter/init.py", line 1923, in call return self.func(*args)
File "/home/mininet/examples/miniedit.py", line 1486, in loadTopology hosts = loadedTopology['hosts']
keyErrror: 'hosts'

@BlueShahriar
Copy link

Hello @Nasaaaaaa12,
Can you provide your saved topology? (the .mn file you saved topology into)
Regards.

@sevenwhiteclouds
Copy link

sevenwhiteclouds commented Sep 28, 2023

I've fixed this issue in pull request #1208. This issue occurs when running miniedit with Python 3. In Python 2, there is a need for .encode('utf-8'), but in Python 3, the string is already in the correct format. Running the same code converts the string to a bytes literal, resulting in the addition of a "b" before the string, like this: b'hostname'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants