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

I can't import topicwizard #17

Closed
Karrol opened this issue Aug 13, 2023 · 3 comments
Closed

I can't import topicwizard #17

Karrol opened this issue Aug 13, 2023 · 3 comments

Comments

@Karrol
Copy link

Karrol commented Aug 13, 2023

I don't know how to handle this problem. ask for help. Thank you. here is the error information:
File d:\software\anaconda\anaconda\envs\topicmodel\lib\site-packages\topicwizard_init_.py:1
----> 1 from topicwizard.app import get_dash_app, load, load_app, visualize
2 from topicwizard.compatibility.bertopic import bertopic_pipeline
3 from topicwizard.compatibility.gensim import gensim_pipeline

File d:\software\anaconda\anaconda\envs\topicmodel\lib\site-packages\topicwizard\app.py:220
214 app = load_app(filename, exclude_pages=exclude_pages)
215 return run_app(app, port=port)
218 def split_pipeline(
219 vectorizer: Any, topic_model: Any, pipeline: Optional[Pipeline]
--> 220 ) -> tuple[Any, Any]:
221 """Check which arguments are provided,
222 raises error if the arguments are not satisfactory, and if needed
223 splits Pipeline into vectorizer and topic model."""
224 if (vectorizer is None) or (topic_model is None):

TypeError: 'type' object is not subscriptable

@x-tabdeveloping
Copy link
Owner

Oh yeah I think it must be you having an older version of Python, can you try with a newer one? (3.9 and up should be fine.) If it's not an option I can try to fix the package for older versions, but I would orefer if we could stick to 3.9 and up

@Karrol
Copy link
Author

Karrol commented Aug 14, 2023

Thank you very much. I created a new virtual environment with python 3.9 and it works well . I found a DeprecationWarning that
textsize is deprecated and will be removed in Pillow 10 (2023-07-01), it suggests to use textbbox or textlength instead. hope it will help. Thank you for your good job~

@x-tabdeveloping
Copy link
Owner

Thanks for the kind words :D I think it's probably a downstream dependency, I'm guessing wordcloud, but I will make sure to check it out.

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