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

FileNotFoundError: [WinError 2] The system cannot find the file specified #39

Open
psg719 opened this issue Aug 3, 2023 · 1 comment

Comments

@psg719
Copy link

psg719 commented Aug 3, 2023

I'm connecting to a database using odbc using a guest database account and I keep getting file not found error. Any help would be appreciated.

Thanks

from sqlalchemy_schemadisplay import create_schema_graph

connection_string = ('Driver={SQL Server};'
            'Server=MYSERVER;'
            'Database=MYDATABASE;'
            'Trusted_Connection=no;'
            'UID=username;'
            'PWD=password;')


DATABASE_URL = URL.create("mssql+pyodbc", query={"odbc_connect": connection_string})

graph = create_schema_graph(metadata=MetaData(DATABASE_URL),
    show_datatypes=False,
    show_indexes=False,
    rankdir='LR', 
    concentrate=False
)
graph.write_png('dbschema.png')

---------------------------------------------------------------------------
FileNotFoundError                         Traceback (most recent call last)
[c:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\pydot.py](file:///C:/Users/AppData/Local/Programs/Python/Python37/lib/site-packages/pydot.py) in create(self, prog, format, encoding)
   1925                 arguments=arguments,
-> 1926                 working_dir=tmp_dir,
   1927             )

[c:\Users\AppData\Local\Programs\Python\Python37\lib\site-packages\pydot.py](file:///C:/Users/AppData/Local/Programs/Python/Python37/lib/site-packages/pydot.py) in call_graphviz(program, arguments, working_dir, **kwargs)
    138         stdout=subprocess.PIPE,
--> 139         **kwargs
    140     )

[c:\Users\AppData\Local\Programs\Python\Python37\lib\subprocess.py](file:///C:/Users/AppData/Local/Programs/Python/Python37/lib/subprocess.py) in __init__(self, args, bufsize, executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, env, universal_newlines, startupinfo, creationflags, restore_signals, start_new_session, pass_fds, encoding, errors, text)
    799                                 errread, errwrite,
--> 800                                 restore_signals, start_new_session)
    801         except:

[c:\Users\AppData\Local\Programs\Python\Python37\lib\subprocess.py](file:///C:/Users/AppData/Local/Programs/Python/Python37/lib/subprocess.py) in _execute_child(self, args, executable, preexec_fn, close_fds, pass_fds, cwd, env, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite, unused_restore_signals, unused_start_new_session)
   1206                                          os.fspath(cwd) if cwd is not None else None,
-> 1207                                          startupinfo)
   1208             finally:

FileNotFoundError: [WinError 2] The system cannot find the file specified```
@Zlopez
Copy link
Collaborator

Zlopez commented Feb 19, 2024

There is a 2.0 version available now. Does it still have this issue?

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