csgoh / processpiper

An open source python library to generate business process diagram using code or plain text.
https://github.com/csgoh/processpiper
MIT License
148 stars 10 forks source link

No module named 'processpiper.text2diagram'; 'processpiper' is not a package #49

Closed marconimedeiros2 closed 1 week ago

marconimedeiros2 commented 2 weeks ago

Trying to execute the example code:

Exception has occurred: ModuleNotFoundError No module named 'processpiper.text2diagram'; 'processpiper' is not a package AttributeError: partially initialized module 'processpiper' has no attribute 'path' (most likely due to a circular import)

During handling of the above exception, another exception occurred:

File "C:\Users\marco\Downloads\processpiper.py", line 1, in from processpiper.text2diagram import render File "C:\Users\marco\Downloads\processpiper.py", line 1, in from processpiper.text2diagram import render ModuleNotFoundError: No module named 'processpiper.text2diagram'; 'processpiper' is not a package

`from processpiper.text2diagram import render

input_syntax = """ title: Sample Test Process colourtheme: BLUEMOUNTAIN lane: End User (start) as start [Enter Keyword] as enter_keyword (end) as end pool: System Search lane: Database System [Login] as login [Search Records] as search_records <Result Found?> as result_found [Display Result] as display_result [Logout] as logout lane: Log System [Log Error] as log_error

start->login: User \nAuthenticate login->enter_keyword: Authenticated enter_keyword->search_records: Search Criteria search_records->result_found: Result result_found->display_result: Yes display_result->logout->end result_found->log_error: No log_error->display_result

footer: Generated by ProcessPiper """

render(input_syntax, "my_process_map.png")`

csgoh commented 2 weeks ago

Would you be able to share your steps for installing ProcessPipe? From your errors, it appears that processpiper.py is in the Downloads folder. Did you just download the processpiper.py file? Please see https://github.com/csgoh/processpiper/wiki/installation for installation instructions.

marconimedeiros2 commented 2 weeks ago

It's so simple problem, I was running the script in a file with name "processpiper.py" haha