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

No module named 's3cache' #29835

Closed
3 tasks done
hieuthanhpro opened this issue Aug 2, 2024 · 8 comments
Closed
3 tasks done

No module named 's3cache' #29835

hieuthanhpro opened this issue Aug 2, 2024 · 8 comments
Labels
install:dependencies Installation - Dependencies

Comments

@hieuthanhpro
Copy link

Bug description

when I use: from s3cache.s3cache import S3Cache
logs is: ModuleNotFoundError: No module named 's3cache'
thank you!

How to reproduce the bug

  1. code: from s3cache.s3cache import S3Cache
  2. logs bug: ModuleNotFoundError: No module named 's3cache'

Screenshots/recordings

image
image

Superset version

3.1.3

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
@dosubot dosubot bot added the install:dependencies Installation - Dependencies label Aug 2, 2024
Copy link

dosubot bot commented Aug 2, 2024

The error ModuleNotFoundError: No module named 's3cache' indicates that the s3cache module is not installed in your environment. The s3cache module is an external dependency and needs to be installed separately.

To resolve this issue, you can install the s3cache module using pip:

pip install s3cache

After installing the module, the import statement from s3cache.s3cache import S3Cache should work without any issues [1].

To continue talking to Dosu, mention @dosu.

@hieuthanhpro
Copy link
Author

but it have bugs:
image
Found but failed to import local superset_config
Traceback (most recent call last):
File "/home/hieuthanh/test3/pdp-superset/superset/config.py", line 1712, in
import superset_config
File "/home/hieuthanh/test3/pdp-superset/superset_config.py", line 127, in
from s3cache.s3cache import S3Cache
ModuleNotFoundError: No module named 's3cache.s3cache'
Traceback (most recent call last):
File "/home/hieuthanh/anaconda3/envs/superset/bin/superset", line 33, in
sys.exit(load_entry_point('datamine', 'console_scripts', 'superset')())
File "/home/hieuthanh/anaconda3/envs/superset/bin/superset", line 25, in importlib_load_entry_point
return next(matches).load()
File "/home/hieuthanh/anaconda3/envs/superset/lib/python3.9/importlib/metadata.py", line 86, in load
module = import_module(match.group('module'))
File "/home/hieuthanh/anaconda3/envs/superset/lib/python3.9/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "/home/hieuthanh/test3/pdp-superset/superset/cli/main.py", line 28, in
from superset.cli.lib import normalize_token
File "/home/hieuthanh/test3/pdp-superset/superset/cli/lib.py", line 20, in
from superset import config
File "/home/hieuthanh/test3/pdp-superset/superset/config.py", line 1712, in
import superset_config
File "/home/hieuthanh/test3/pdp-superset/superset_config.py", line 127, in
from s3cache.s3cache import S3Cache
ModuleNotFoundError: No module named 's3cache.s3cache'

@rajivpatki
Copy link

Try

pip install --no-cache-dir s3werkzeugcache

@rusackas
Copy link
Member

rusackas commented Aug 2, 2024

This is a completely wild and uneducated guess, but does from s3cache import S3Cache happen to work? That's what it looks like in these docs. I don't really know anything about this but s3cache.s3cache sure looks odd.

@hieuthanhpro
Copy link
Author

This is a completely wild and uneducated guess, but does from s3cache import S3Cache happen to work? That's what it looks like in these docs. I don't really know anything about this but s3cache.s3cache sure looks odd.

in superset docs I read that
from s3cache.s3cache import S3Cache
https://superset.apache.org/docs/configuration/cache/#caching-thumbnails

@rusackas
Copy link
Member

rusackas commented Aug 5, 2024

Right... I'm wondering if the docs are in need of a correction.

@rajivpatki
Copy link

Right... I'm wondering if the docs are in need of a correction.

As far as I remember

from s3cache.s3cache import S3Cache

worked fine for me if you install s3werkzeugcache instead of s3cache

@hieuthanhpro
Copy link
Author

Right... I'm wondering if the docs are in need of a correction.

As far as I remember

from s3cache.s3cache import S3Cache

worked fine for me if you install s3werkzeugcache instead of s3cache

thanks bro, it worked well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:dependencies Installation - Dependencies
Projects
None yet
Development

No branches or pull requests

3 participants