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

Mac running as external tool throw an error when opening the generated file #274

Closed
glepine-ivadolabs opened this issue Oct 7, 2019 · 0 comments
Labels
bug 🐛 Something isn't working

Comments

@glepine-ivadolabs
Copy link

Describe the bug
When running from pycharm the report is generated but an error is thrown
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pandas_profiling", line 10, in
sys.exit(main())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas_profiling/controller/console.py", line 78, in main
p.to_file(output_file=args.output_file, silent=args.silent)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pandas_profiling/init.py", line 139, in to_file
webbrowser.open_new_tab(output_file)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/webbrowser.py", line 68, in open_new_tab
return open(url, 2)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/webbrowser.py", line 60, in open
if browser.open(url, new, autoraise):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/webbrowser.py", line 592, in open
script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser
TypeError: replace() takes 2 positional arguments but 3 were given

it seems to be caused by this line, changing it by webbrowser.open_new_tab(output_file.as_uri()) fix the issue
https://github.com/pandas-profiling/pandas-profiling/blob/master/pandas_profiling/__init__.py#L139
To Reproduce

1 follow the documentation on how to setup external tool in pycharm
2 run on any csv

@glepine-ivadolabs glepine-ivadolabs added the bug 🐛 Something isn't working label Oct 7, 2019
@sbrugman sbrugman added this to the v2.4.0 milestone Oct 7, 2019
@sbrugman sbrugman closed this as completed Jan 2, 2020
chanedwin pushed a commit to chanedwin/pandas-profiling that referenced this issue Oct 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants