-
Notifications
You must be signed in to change notification settings - Fork 40
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
Problem with Pathlib based paths #49
Comments
Hi @alirezashamsaei, sorry for the delay in getting to this issue but thanks for raising it. Great to hear that you find the app useful too 🙂. I've not seen any issues so far resulting from the switch to Can you confirm what OS version and Python version you're running with? I think this could be a Windows-specifc issue and I presume from the message that you're running on Windows? The solution here is likely to be to update the default app settings in However, this will cause issues for people running with older versions of Python that don't support Django 3 so I'll need ensure that this is resolved while retaining support for previous Python/Django versions. It's likely that this is going to take me a couple of weeks to get round to but I'll provide an update here as soon as possible. |
I got the same trouble. I have Ubuntu 20 and Django 3.2.1. Please make a patch and fix the issue. =) UPD: btw, I've solved it like that^ |
Hi @nashgc, I hadn't managed to reproduce this issue and needed to investigate further - I'm keen to get this fixed - are you able to offer any further information or a simple example that can reproduce the error? I was wondering if this could perhaps be something to do with the way that I'm currently using Would it be possible for you to provide some simple demo code that reproduces the problem? I'll take another look EDIT: Just seen your update - thanks for the info 🙂 - I'll see if I can add something that detects path objects that will cause an issue and converts them - how were you specifying |
If I don't wrap PosixPath with str() method it gets me next traceback:
If you need real simple example, I can establish new repo with this issue. Let me know if you need to. |
Thanks for the details - this is helpful, I'll see if I can reproduce the problem and sort out a fix based on this info - don't worry about creating a new repo for this issue for now, I'll see how I get on and will update here if I need any further information. Great to hear that you're finding the library useful 👍 |
I see the issue here now and can reproduce the problem. I'll get a fix in place for this and create a new maintenance release which will hopefully be on PyPi sometime tomorrow. If wrapping |
@alirezashamsaei, @nashgc, many thanks for reporting this issue. A fix has now been implemented and merged into master. The fix should address the differences across different Python versions in terms of whether or not Tests are passing locally but I'd like to ensure the CI is passing before releasing an updated version. There's currently an issue that I need to resolve in relation to the CI and also some dependency version updates to address so once these issues are resolved, I'll create a new release and deploy this. |
Release v0.3.1 is now available on PyPi with the fix for this issue so I'm going to close this issue but do let me know if you experience any issues with the fix. |
TypeError: Invalid path type: tuple i am facing this problem can anyone help me please ? |
The above comment has been moved to a new issue (#83) since this issue is closed. |
This works for me |
Hello and thanks a lot for this awesome app. it makes lives so much easier!
I recently started a new django project (Django 3.1) and as you know, django has moved from os.path to Pathlib. unfortunately, this breaks this app's functionality.
It throws an error in :
django_drf_filepond/views.py, line 107
where it contains the following:
if ((not (storage.location).startswith(local_settings.BASE_DIR)) and (local_settings.BASE_DIR != os.path.dirname(django_drf_filepond.__file__))):
The error reads
TypeError: startswith first arg must be str or a tuple of str, not WindowsPath
, and everything works when I wrapstorage.location
in anstr
function (obviously, becausestartswhth
expects strings.)anyways, please forgive any mistakes I made, I am a newbie both in django and around github.
The text was updated successfully, but these errors were encountered: