JustAnotherArchivist / JustAnotherArchivist/snscrape

`AttributeError` crash on `find_module`

Open
#782 8 comments 0 reactions 0 assignees View on GitHub
bug modules
Dominant language
Python
Stars
5.4k
Forks
783
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug
```
Traceback (most recent call last):
File "SaS_on_Twitter.py", line 14, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 352, in exec_module
File "snscrape\modules\__init__.py", line 17, in
File "snscrape\modules\__init__.py", line 13, in _import_modules
AttributeError: 'FrozenImporter' object has no attribute 'find_module'
[3260] Failed to execute script 'SaS_on_Twitter' due to unhandled exception!
```

### How to reproduce

Compiled with:
pyinstaller --onefile --hidden-import snscrape.modules SaS_on_Twitter.py

### Expected behaviour

it should just run like in idle, but as stand-alone exe

### Screenshots and recordings

_No response_

### Operating system

Windows 10

### Python version: output of `python3 --version`

3.8 or 3.11.24

### snscrape version: output of `snscrape --version`

0.6.1.20230314

### Scraper

Twitter-User

### How are you using snscrape?

Module (`import snscrape.modules.something` in Python code)

### Backtrace

_No response_

### Log output

_No response_

### Dump of locals

_No response_

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.