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

TypeError in output_profile_line #344

Closed
matt-erhart opened this issue Feb 4, 2022 · 2 comments
Closed

TypeError in output_profile_line #344

matt-erhart opened this issue Feb 4, 2022 · 2 comments

Comments

@matt-erhart
Copy link

Describe the bug

Scalene: An exception of type TypeError occurred. Arguments:
("output_profile_line() missing 1 required keyword-only argument: 'fname_print'",)
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/scalene/scalene_profiler.py", line 1614, in run_profiler
    exit_status = profiler.profile_code(
  File "/opt/conda/lib/python3.9/site-packages/scalene/scalene_profiler.py", line 1439, in profile_code
    if not Scalene.output_profile():
  File "/opt/conda/lib/python3.9/site-packages/scalene/scalene_profiler.py", line 686, in output_profile
    did_output: bool = output.output_profiles(
  File "/opt/conda/lib/python3.9/site-packages/scalene/scalene_output.py", line 564, in output_profiles
    did_print = self.output_profile_line(
  File "/opt/conda/lib/python3.9/site-packages/scalene/scalene_output.py", line 109, in output_profile_line
    obj = json.output_profile_line(
TypeError: output_profile_line() missing 1 required keyword-only argument: 'fname_print'

To Reproduce
scalene myfile.py

Desktop (please complete the following information):

  • OS: [e.g. iOS] Docker on Windows
  • Version latest

Additional context
Docker file:

FROM continuumio/miniconda3
RUN apt-get -y update
RUN apt-get install -y python3-all-dev
RUN conda install -q -y pandas pyarrow python-snappy fastparquet snappy
@emeryberger
Copy link
Member

Thanks for the report; can you verify that this works for you? (install from the repo - python3 -m pip install git+https://github.com/plasma-umass/scalene)

@cauliyang
Copy link

cauliyang commented Feb 4, 2022

Get the same error:

image

Platform: Linux x86_64
Environment: Conda
Python: 3.8
Version: scalene-1.5.2
Running CMD: scalene myfile.py

Updated:

Firstly, pip uninstall scalene
then use python3 -m pip install git+https://github.com/plasma-umass/scalene to install again. The error I meet is fixed.

Thanks for your effort ❤️

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

3 participants