https://github.com/codesetuptest/django-django-11583
SWE-bench instance: django__django-11583
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (2.9%) to scientific vocabulary
Repository
SWE-bench instance: django__django-11583
Basic Info
- Host: GitHub
- Owner: CodeSetupTest
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 0 Bytes
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
SWE-bench Instance: django__django-11583
Repository: django/django Base Commit: 60dc957a825232fdda9138e2f8878b2ca407a7c9
Problem Statement
Auto-reloading with StatReloader very intermittently throws "ValueError: embedded null byte". Description
Raising this mainly so that it's tracked, as I have no idea how to reproduce it, nor why it's happening. It ultimately looks like a problem with Pathlib, which wasn't used prior to 2.2. Stacktrace: Traceback (most recent call last): File "manage.py" ... executefromcommandline(sys.argv) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/init.py", line 381, in executefromcommandline utility.execute() File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/init.py", line 375, in execute self.fetchcommand(subcommand).runfromargv(self.argv) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/base.py", line 323, in runfromargv self.execute(args, *cmdoptions) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 60, in execute super().execute(args, *options) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/base.py", line 364, in execute output = self.handle(args, *options) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 95, in handle self.run(*options) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/core/management/commands/runserver.py", line 102, in run autoreload.runwithreloader(self.inner_run, *options) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 577, in runwithreloader startdjango(reloader, mainfunc, args, *kwargs) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 562, in startdjango reloader.run(djangomainthread) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 280, in run self.runloop() File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 286, in runloop next(ticker) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 326, in tick for filepath, mtime in self.snapshotfiles(): File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 342, in snapshotfiles for file in self.watchedfiles(): File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 241, in watchedfiles yield from iterallpythonmodulefiles() File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 103, in iterallpythonmodulefiles return itermodulesandfiles(modules, frozenset(errorfiles)) File "/Userz/kez/path/to/venv/lib/python3.6/site-packages/django/utils/autoreload.py", line 132, in itermodulesandfiles results.add(path.resolve().absolute()) File "/Users/kez/.pyenv/versions/3.6.2/lib/python3.6/pathlib.py", line 1120, in resolve s = self.flavour.resolve(self, strict=strict) File "/Users/kez/.pyenv/versions/3.6.2/lib/python3.6/pathlib.py", line 346, in resolve return resolve(base, str(path)) or sep File "/Users/kez/.pyenv/versions/3.6.2/lib/python3.6/pathlib.py", line 330, in _resolve target = accessor.readlink(newpath) File "/Users/kez/.pyenv/versions/3.6.2/lib/python3.6/pathlib.py", line 441, in readlink return os.readlink(path) ValueError: embedded null byte I did print(path) before os.readlink(path) in pathlib and ended up with: /Users/kez /Users/kez/.pyenv /Users/kez/.pyenv/versions /Users/kez/.pyenv/versions/3.6.2 /Users/kez/.pyenv/versions/3.6.2/lib /Users/kez/.pyenv/versions/3.6.2/lib/python3.6 /Users/kez/.pyenv/versions/3.6.2/lib/python3.6/asyncio /Users/kez/.pyenv/versions/3.6.2/lib/python3.6/asyncio/selectorevents.py /Users It always seems to be /Users which is last It may have already printed /Users as part of another .resolve() multiple times (that is, the order is not deterministic, and it may have traversed beyond /Users successfully many times during startup. I don't know where to begin looking for the rogue null byte, nor why it only exists sometimes. Best guess I have is that there's a mountpoint in /Users to a samba share which may not have been connected to yet? I dunno. I have no idea if it's fixable without removing the use of pathlib (which tbh I think should happen anyway, because it's slow) and reverting to using os.path.join and friends. I have no idea if it's fixed in a later Python version, but with no easy way to reproduce ... dunno how I'd check. I have no idea if it's something specific to my system (pyenv, OSX 10.11, etc)
Repository Contents
This repository contains the actual source code from the original repository at commit 60dc957a825232fdda9138e2f8878b2ca407a7c9. The code is ready for development and testing.
Docker Environment
A Dockerfile is provided to set up the proper environment for this instance:
bash
docker build -t swebench-instance .
docker run -it swebench-instance /bin/bash
Owner
- Name: CodeSetupTest
- Login: CodeSetupTest
- Kind: organization
- Repositories: 1
- Profile: https://github.com/CodeSetupTest
GitHub Events
Total
- Create event: 2
Last Year
- Create event: 2
Dependencies
- sweb.env.py.x86_64.2baaea72acc974f6c02079 latest build
- eslint ^4.18.2 development
- grunt ^1.0.1 development
- grunt-cli ^1.2.0 development
- grunt-contrib-qunit ^1.2.0 development
- asgiref *
- pytz *
- sqlparse *
- mysqlclient >=1.3.13 test
- cx_oracle >=6.0 test
- psycopg2 >=2.5.4 test
- Pillow * test
- PyYAML * test
- argon2-cffi >=16.1.0 test
- asgiref * test
- bcrypt * test
- docutils * test
- geoip2 * test
- jinja2 >=2.9.2 test
- numpy * test
- pylibmc * test
- python-memcached >=1.59 test
- pytz * test
- pywatchman * test
- selenium * test
- sqlparse * test
- tblib * test