asreview / asreview-insights

Tools such as plots and metrics to analyze (simulated) reviews for ASReview LAB
https://www.asreview.ai
Apache License 2.0
28 stars 13 forks source link

Missing module asreview.analysis import Analysis #46

Closed zhaokoh closed 1 year ago

zhaokoh commented 1 year ago

Hi,

I am using the default version pulled from pip: asreview-visualization-0.4.1

This might be a silly mistake in my environment. I am getting missing module error on asreview.analysis when I tried to run asreview plot, here is the stacktrace:

(octopus) TBook:.asreview Zhao$ asreview plot asreview_init_data_all_shuffled_20230214_test_simulation.asreview 
Traceback (most recent call last):
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/asreview/__main__.py", line 78, in main
    entry.load()().execute(sys.argv[2:])
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2458, in load
    return self.resolve()
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/pkg_resources/__init__.py", line 2464, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/asreviewcontrib/visualization/__init__.py", line 15, in <module>
    from asreviewcontrib.visualization.plot import Plot  # noqa
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/asreviewcontrib/visualization/plot.py", line 18, in <module>
    from asreview.analysis import Analysis
ModuleNotFoundError: No module named 'asreview.analysis'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/bin/asreview", line 8, in <module>
    sys.exit(main())
  File "/Users/zhao/Development/tools/miniconda3/envs/octopus/lib/python3.10/site-packages/asreview/__main__.py", line 80, in main
    raise ValueError(
ValueError: Plugin with entry point plot could not be loaded.

I tried to upgrade all my asreview packages to the latest but still encounter similar errors. I can't find the asreview.analysis in my python local repository either.

Here are the versions of my asreview and related packages:

Automated Systematic Review (ASReview).

positional arguments:
  subcommand     The subcommand to launch. Available commands:

                 lab [asreview-1.1]
                     The ASReview LAB webapp.

                 simulate [asreview-1.1]
                     Simulate the performance of ASReview.

                 metrics [asreview-insights-1.1.2]
                     Metrics entry point.

                 data [asreview-datatools-1.1.1]
                     Home of all data tools for ASReview.

                 algorithms [asreview-1.1]
                     Available active learning algorithms for ASReview.

                 state-inspect [asreview-1.1]
                     Inspect ASReview LAB review progress.

                 makita [asreview-makita-0.6.2]
                     Makita functionality for ASReview datasets.

Can you please let me know if I am missing certain package or need to update my local packages to certain versions to make this work?

Thanks.

zhaokoh commented 1 year ago

Ah, I found the problem. It seems like the plot function was migrated from previous "asreview-visualization" to "insights". So I uninstalled the old 0.4.1 asreview-visualization and it seems working now. I think my mistake was following an 'old' tutorial :)

J535D165 commented 1 year ago

Thanks for documenting and closing the issue. Where did you find the tutorial? Is it something the ASReview team developed?

zhaokoh commented 1 year ago

I can't remember the exact details, but I think I googled "asreview plot" to find the syntax/usage and went to this page https://pypi.org/project/asreview-visualization/ directly because previously I was using this package and had that installed on my machine. On 17 Feb 2023, at 9:54 pm, Jonathan de Bruin @.***> wrote: Thanks for documenting and closing the issue. Where did you find the tutorial? Is it something the ASReview team developed?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you modified the open/close state.Message ID: @.***>