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

[bug] from_excel allows invalid geodata to be loaded #2466

Open
6 tasks done
KS-HTK opened this issue Nov 27, 2024 · 0 comments
Open
6 tasks done

[bug] from_excel allows invalid geodata to be loaded #2466

KS-HTK opened this issue Nov 27, 2024 · 0 comments

Comments

@KS-HTK
Copy link
Collaborator

KS-HTK commented Nov 27, 2024

Bug report checklis

  • Searched the issues page for similar reports

  • Read the relevant sections of the documentation

  • Browse the tutorials and tests for usefull code snippets and examples of use

  • Reproduced the issue after updating with pip install --upgrade pandapower (or git pull)

  • Tried basic troubleshooting (if a bug/error) like restarting the interpreter and checking the pythonpath

Reproducible Example

import pandapower as pp
net = pp.create_empty_network("test")
coords = [(1,2),(4,5)]
pp.create_bus(net,0.4, index = 1, geodata=(1,2))
pp.create_bus(net,0.4, index = 2, geodata=(1,7))
pp.create_bus(net,0.4, index = 3, geodata=(1,7))
pp.create_bus(net,0.4, index = 4, geodata=(1,7))
pp.to_excel(net, "test.xlsx")


modify any geodata in the xlsx to `"{\"coordinates\":[[1,2], [2,3]], \"type\":\"LineString\"}"`


net = pp.from_excel("test.xlsx")
print(net.bus)

Issue Description and Traceback

When loading from excel file invalid geodata is not flaged for at least bus. Most likely for all types of elements that allow geodata.

Expected Behavior

A Warning or log message similar to using deprecated coords keyword on create_bus

Installed Versions

  • python version: 3.12
  • pandapower develop branch
  • Operating System name/version: Win 11

Label

  • Relevant labels are selected
@KS-HTK KS-HTK assigned KS-HTK and unassigned KS-HTK Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant