Giter Site home page Giter Site logo

Fix for file uploads about parsepy HOT 4 CLOSED

francisjervis avatar francisjervis commented on May 28, 2024
Fix for file uploads

from parsepy.

Comments (4)

newdev7 avatar newdev7 commented on May 28, 2024 4

Hi,

I'm using Python 3.6.0 for my project. I'm using this library (version='0.2.20170114') for storing the details in parse. When I tried to upload the file in Parse using File, it returns error saying
<urlopen error unknown url type: b'https>.

The issue is with the url in the request. In the connection.py file, line 128, you are converting the url string to bytes using url.encode('utf-8'). This creates the issue. If I remove the encode and send the url as it is, then there is no issue. So I changed the code from request = Request(url.encode('utf-8'), data, headers) to request = Request(url, data, headers). Now it is working.

from parsepy.

milesrichardson avatar milesrichardson commented on May 28, 2024

@francisjervis Can you confirm that this fix works on your setup? If so, would you mind submitting a PR? I don't have a self hosted parse-server with file support setup right now, so reproducing/testing would take longer than a few seconds.

If you need help with the workflow of editing the repository in your development environment and submitting the PR, what I recommend is: forking the repository, cloning it to the current directory, then sys.path.append(currentDirectory + 'ParsePy') before importing. Then you can edit the files in the ParsePy until you get it to work, then commit changes, git push origin master to your fork, and finally submit a PR on github.

from parsepy.

milesrichardson avatar milesrichardson commented on May 28, 2024

@francisjervis Fixed (safely, using a check to see if class is a File). :)

pull from master to use

from parsepy.

JianxunRao avatar JianxunRao commented on May 28, 2024

@newdev7 Same issue.Your solution works for me. Thx!

from parsepy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.