Skip to content

Commit b93cf26

Browse files
Revise bug reporting instructions: add instructions and field for debug log, put less emphasis on dump files, request minimal reproducer, and reorder template
1 parent e47fbe3 commit b93cf26

File tree

2 files changed

+21
-7
lines changed

2 files changed

+21
-7
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

+17-6
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ body:
2121
label: How to reproduce
2222
description: |
2323
How to reproduce the problem.
24+
This should be a minimal reproducible example, i.e. the shortest possible code or the smallest number of steps that still causes the error.
2425
placeholder: e.g. I can reproduce this issue by scraping the textfiles user with the twitter-user scraper.
2526
- type: textarea
2627
validations:
@@ -58,12 +59,28 @@ body:
5859
attributes:
5960
label: Scraper
6061
placeholder: e.g. twitter-user, reddit-search, TwitterSearchScraper, ...
62+
- type: dropdown
63+
validations:
64+
required: true
65+
attributes:
66+
label: How are you using snscrape?
67+
options: ['CLI (`snscrape ...` as a command, e.g. in a terminal)', 'Module (`import snscrape.modules.something` in Python code)']
6168
- type: textarea
6269
validations:
6370
required: false
6471
attributes:
6572
label: Backtrace
6673
description: What is the error snscrape gives you, if any?
74+
- type: textarea
75+
validations:
76+
required: false
77+
attributes:
78+
label: Log output
79+
description: |
80+
Insert here the debug log of snscrape.
81+
If you use the CLI, add the global options `-vv` to the command, e.g. `snscrape -vv twitter-search ...`.
82+
If you use the module, set the debug level in your Python code before any use of snscrape: `import logging; logging.basicConfig(level = logging.DEBUG)`.
83+
If you already use `logging` in your own code, you may need to adjust the level there instead.
6784
- type: textarea
6885
validations:
6986
required: false
@@ -74,12 +91,6 @@ body:
7491
Please note that it may contain identifying info such as IP address, if the website returns that.
7592
You can also optionally request to exchange the file in private.
7693
Finally, if snscrape didn't crash, leave this field blank.
77-
- type: dropdown
78-
validations:
79-
required: true
80-
attributes:
81-
label: How are you using snscrape?
82-
options: ['CLI (`snscrape ...` as a command, e.g. in a terminal)', 'Module (`import snscrape.modules.something` in Python code)']
8394
- type: textarea
8495
attributes:
8596
label: Additional context

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ To get the latest 100 tweets with the hashtag #archiveteam:
5959
It is also possible to use snscrape as a library in Python, but this is currently undocumented.
6060

6161
## Issue reporting
62-
If you discover an issue with snscrape, please report it at <https://github.com/JustAnotherArchivist/snscrape/issues>. If possible please run snscrape with `-vv` and `--dump-locals` and include the log output as well as the dump files referenced in the log in the issue. Note that the files may contain sensitive information in some cases and could potentially be used to identify you (e.g. if the service includes your IP address in its response). If you prefer to arrange a file transfer privately, just mention that in the issue.
62+
If you discover an issue with snscrape, please report it at <https://github.com/JustAnotherArchivist/snscrape/issues>. If you use the CLI, please run snscrape with `-vv` and include the log output in the issue. If you use snscrape as a module, please enable debug-level logging using `import logging; logging.basicConfig(level = logging.DEBUG)` (before using snscrape at all) and include the log output in the issue.
63+
64+
### Dump files
65+
In some cases, debugging may require more information than is available in the log. The CLI has a `--dump-locals` option that enables dumping all local variables within snscrape based on important log messages (rather than, by default, only on crashes). Note that the dump files may contain sensitive information in some cases and could potentially be used to identify you (e.g. if the service includes your IP address in its response). If you prefer to arrange a file transfer privately, just mention that in the issue.
6366

6467
## License
6568
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

0 commit comments

Comments
 (0)