Comments (6)
I'm not sure, smuggler hasn't really been tested on windows as far as I known.
When you upload a fixture it is saved in a temporary directory and then it's loaded. For some reason on your system this file seems to be locked. Does this happen every time you try to load?
It's hard to reproduce/debug this issue without access to a Windows system, so a PR to demonstrate and fix this issue would be much appreciated.
(Currently travis only runs on linux so that'll have to change as well).
from django-smuggler.
Hey, @ManiMozaffar and @kenliit! I'm sorry you are having this issue on Windows. As @jaap3 noted, it is hard for us debug this issue because we don't run a Windows environment so could you share the whole traceback output?
It is not clear for me if the error happens on smuggler.utils.load_fixtures
or on os.unlink()
from https://github.com/semente/django-smuggler/blob/master/smuggler/views.py#L149.
from django-smuggler.
It is possible that it is missing a stream.close()
at https://github.com/semente/django-smuggler/blob/master/smuggler/utils.py#L69.
from django-smuggler.
Temporary files are created here:
django-smuggler/smuggler/views.py
Line 113 in 524b99f
They are written here:
django-smuggler/smuggler/utils.py
Line 19 in 524b99f
Removed here:
django-smuggler/smuggler/views.py
Line 152 in 524b99f
I think the issues is related to the creation of the temporary files. mkstemp
returns a tuple of two values a file pointer and a path (https://docs.python.org/3/library/tempfile.html#tempfile.mkstemp), smuggler ignores the first one and always uses a path.
However, the file pointer is similar to an open file.
I found this Stack Overflow answer which probably contains the correct solution:
It would be greatly appreciated if someone with access to a Windows computer can test this fix and make a pull request.
from django-smuggler.
I created a pull request, but cannot test if this is actually the correct solution.
from django-smuggler.
good catch @jaap3!
from django-smuggler.
Related Issues (20)
- Django 1.7 tox tests failing HOT 3
- Support for dumping with natural keys HOT 4
- TemplateDoesNotExist: smuggler/load_data_form.html HOT 2
- coveralls command is failing HOT 3
- Figure out why coverage is not 100% on Django 1.9 HOT 4
- 'url' is not a valid tag or filter in tag library 'future' HOT 2
- Loading data form keyerror HOT 5
- /admin/dump/ gives KeyError: 'no_color' on Django 1.10 HOT 3
- Django 1.9+ jquery.min.js staticfile HOT 3
- Release version 0.9 HOT 1
- Models with foreign key to auth.user instances can't be loaded correctly HOT 2
- Load view not working HOT 7
- JSON cannot be deleted on Windows because of PermissionError HOT 1
- Version 1.0.0 not available on PyPi HOT 3
- Incompatible with virtual models HOT 4
- Dump filenames without spaces HOT 1
- allow dev to set url for login page when not logged in. HOT 1
- Permission denied in windows, solution explained HOT 4
- Create a json file
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-smuggler.