ClarkuCSCI / pydiode

Transfer data through a unidirectional network (i.e., a data diode)
MIT License
2 stars 0 forks source link

Refactor gui.py #10

Closed peterstory closed 4 months ago

peterstory commented 4 months ago

Refactored into:

For #9

peterstory commented 4 months ago

@Patrick-Ziegler Please test the version of the code on this branch using the actual data diode hardware. After you confirm it works, we can merge these changes. This refactoring should make it easier to update the GUI going forward.

Patrick-Ziegler commented 4 months ago

I was able to get the new version on the desktops with debian. When testing the file trasnfer with the hardware I recieved the following error on the reciever side:

Diode error - Reciever Side

This error occured when the reciever side was waiting to recieve files and as I selected 'send' on the sender side.

I unfortunately had to leave following this error and was unable to do further testing, When I get the chance I will try it again with the stable main branch version to ensure that the error is a result of the code changes and not my use of the tool.

peterstory commented 4 months ago

It looks like some of the error message was truncated. Can you copy-paste to retrieve the full error message? Were you trying to save the received file into a directory you didn't have write access for?

Patrick-Ziegler commented 4 months ago

Unfortunately the error popup on the diode transfer software cannot be selected or copy-pasted, I just attempted it again with a file I know I would have access to and got the same error.

Im a little confused with how you want me to get more information from the error message? If you're referring to the part at the end of the message it ends after the line that says 'exception' that gets slightly cut off. I dont know if there is a terminal somewhere that lets me see more detailed errors when using the GUI element, but the popup doesnt give any more information.

Patrick-Ziegler commented 4 months ago

Forgot to add this before, but here is the expanded view of the error message:

Screenshot from 2024-03-14 16-09-40

peterstory commented 4 months ago

So we have two issues: on Linux, pydiode starts the file selector in the directory in which it's installed (/opt/diode-transfer/), which isn't ideal for usability. Second, the error message isn't very user-friendly. I've added these problems other issues.

However, I don't think these issues are particular to the refactoring.

Patrick-Ziegler commented 4 months ago

Upon ensuring ARP table was configured properly (which seems to be a separate issue), there seems to be no issues using the tool