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

EOF when reading input? #21

Open
Yodo9000 opened this issue Jan 20, 2025 · 2 comments
Open

EOF when reading input? #21

Yodo9000 opened this issue Jan 20, 2025 · 2 comments

Comments

@Yodo9000
Copy link

When I run
belt_balancer_net_free_power_of_2 10 8 | blueprint encode
I get the following output:

0eNq1ltFumzAUhl+l4rqrwD62oa8yVVPSogopAQRmWhTx7vNYtE2b9zuUn6sYx/jD9vnO8TU7nqa6H5rWZ88P16x57doxtD5fs7F5bw+npddf+jo0ssbX5+zxIWsP5+V57E+N9/WQzaGzad/qb6G3mF8eb0PDkN/Th86v9TA2XRv6VVmIk8pZV+TW2PBf3frGN/UNvjxdvrTT+RimD5OGEX03hhHL69fsByl/MqH78rM1//Fdfji0Y98N/tOxPi3kt2aoX28vqzD0X4KKEQomQccIikmQGEEzCSZGECbBxgjmYwSJElyMYJlrKGMExyRUMULJJBR5DFFREQmrCwIioTUDkfD6L8QU0uTwPnThNw4Jz7/ybdtPPotTBXuykip3Ug12B29nfEqLZdmwfd3k/78Sh8ObERglDm9FQFQ4vAkIlePwVtsTsipw3WKsQuHCpXaRVGksKWNhgo1U641UBhup9jFSWVzT1FM+x+6e921TQnfGSSR01wREQne9SxTrRAbQ2zOATmSAOxZ2T4jpRBYgHJFOKK/X+6gTiut9fNQG+8jYLIutZCActlIIiBJbKftYWWErCQuTHOsi62NZCqyHfPzaimJZFFZI9lFINK6ksqWkiWA/GQFgsJ8MhMV+GgLCYT8ZiBLLyEBUuESaLbFkEqab7SXeJMwnbJFJWM5AJIxmIARLx0AYLJ0lICyWjoFwWDq7S901JfbQ3n9VRZQKC0nYPptjIRmIAgtpt6cVq7CQdp/KbjUuvnZLNraJDMA4mUQGcAREIgMwEIkMwEAkdHfr78C2wlYQvtrl2AoGosAGMBAKe7AS8TLP3wFYddio
Traceback (most recent call last):
  File "/Users/users/yodo/Documents/programming/games/factorio/factorio-sat/factorio_sat/.venv/bin/blueprint", line8, in <module>
    sys.exit(main())
  File "/Users/users/yodo/Documents/programming/games/factorio/factorio-sat/factorio_sat/blueprint.py", line 288, in main
    tiles = np.array(json.loads(input()))
EOFError: EOF when reading a line

The first line is the expected blueprint, which can be imported into Factorio successfully, but I also get an error message. I also get the same error message with other settings. Maybe I'm using it incorrectly though; it's not so clear to me what kind of data the different commands expect and return.

Python version is 3.9.19

@ignaloidas
Copy link
Contributor

ignaloidas commented Jan 20, 2025

The error is expected, there is no handling of end of input, the program expects an endless stream of input. There's potential to add handling for ending of the stream if needed, but it's not critical to have it in the cases at least I encountered.

@Yodo9000 Yodo9000 changed the title EOF when reading input EOF when reading input? Jan 20, 2025
@Yodo9000
Copy link
Author

Ah, thanks for the quick reply.

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

2 participants