Git Product home page Git Product logo

Comments (7)

marcoacheron avatar marcoacheron commented on June 12, 2024 2

I ran into the same issue and had to edit some files. Specifically, there is an extra / added to the URLs. Also, if you are trying to access the English version of the recipes, you have to replace "de" with "en". Below are my fixes, but I'm sure there is a global way to prevent this from happening in the future.

Edit ../site-packages/kptncook/api.py.
Line 71: remove the / in front of recipes | also change the "de" to "en" if you require the English version
Line 84: remove the / in front of login
Line 95: remove the / in front of favorites
Line 104: remove the / in front of recipes

This should allow some of the commands to work. It isn't pretty, but I hope this helps.

from kptncook.

ephes avatar ephes commented on June 12, 2024 1

I ran into the same issue and had to edit some files. Specifically, there is an extra / added to the URLs. Also, if you are trying to access the English version of the recipes, you have to replace "de" with "en". Below are my fixes, but I'm sure there is a global way to prevent this from happening in the future.

Ok, I'm not sure how to handle this de vs en thing, maybe a configuration option?

Edit ../site-packages/kptncook/api.py. Line 71: remove the / in front of recipes | also change the "de" to "en" if you require the English version Line 84: remove the / in front of login Line 95: remove the / in front of favorites Line 104: remove the / in front of recipes

This should allow some of the commands to work. It isn't pretty, but I hope this helps.

Yes, I can confirm this fixes the broken URLs. It also works for the login url from the original poster. Do you want to try to fix it and create a PR? I can provide some help and guide you through the process if you like to 😃.

The root cause is in the to_url-Method of KptnCookClient. I would start by writing a test for this method, which breaks when there's a "//" in the returned URL. And then use urljoin from urllib.parse to combine the base url with the path instead of the f-string. This should fix it.

from kptncook.

slothful-vassal avatar slothful-vassal commented on June 12, 2024 1

Many thanks for your help.

from kptncook.

slothful-vassal avatar slothful-vassal commented on June 12, 2024 1

Sorry, 'till end of month I have no time for this :(

from kptncook.

ephes avatar ephes commented on June 12, 2024

Hi,

first, great work :)

Thanks :)

But I'm not able to get the access token. "404 not found" :(

Yup, I can reproduce your issue. The URLs are just broken :(.

from kptncook.

ephes avatar ephes commented on June 12, 2024

Many thanks for your help.

Do you want to give it a try? Otherwise I'll do it over the weekend..

from kptncook.

ephes avatar ephes commented on June 12, 2024

Ok, fixed in 0.0.12 😅.

from kptncook.

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.