Jump to content


Photo

[HH#317701] routing issue


  • Please log in to reply
5 replies to this topic

#1 HelioHost

HelioHost

    Announcements

  • Moderators
  • 4,797 posts
  • Gender:Not Telling

Posted 01 March 2019 - 01:55 PM

Username: esceeles, Server: Ricky, Main domain: crosswordsolver.heliohost.org

Hello, I have the home page of my flask app running, however when I try to
access any other pages under different routes, for example:
app.route('/output/'), either just through typing it into the url or by
clicking an href button on a different page, I get a 404 not found. Are
there some weird routing conventions on heliohost that I need to consider
when writing these routes?

Thanks,
Ellie
This is an unmonitored account for announcements only.
Wiki | Facebook | Twitter
Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#2 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,575 posts
  • Gender:Male

Posted 01 March 2019 - 02:17 PM

What is the url to the script that isn't working?

#3 HelioHost

HelioHost

    Announcements

  • Moderators
  • 4,797 posts
  • Gender:Not Telling

Posted 01 March 2019 - 02:35 PM

In myapp.py I have a function: output(): that is wrapped in the route:
app.route('/output'). Being that it appears I have to access my main page
(wrapped in: app.route('/')) through crosswordsolver.heliohost.org/flask,
I'm assuming I should be able to access this function through "
crosswordsolver.heliohost.org/flask/output/" , but when I try to access
this page it says the URL isn't found on the server.
Thanks,

On Fri, Mar 1, 2019 at 6:17 AM Heliohost Support
wrote:

> What is the url to the script that isn't working?
>
> You may view the status of your ticket by visiting:
>
> https://www.helionet...p?showtopic5258
>
> Thank you,
> Heliohost support
> https://www.heliohost.org/
> https://www.helionet.org/
>
>
This is an unmonitored account for announcements only.
Wiki | Facebook | Twitter
Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#4 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,575 posts
  • Gender:Male

Posted 01 March 2019 - 03:04 PM

@app.route('/ouput/', methods = ['POST', 'GET'])

Looks like you're missing a t.

#5 HelioHost

HelioHost

    Announcements

  • Moderators
  • 4,797 posts
  • Gender:Not Telling

Posted 01 March 2019 - 03:31 PM

Thank you for all your help. I'm having one last problem. In main.py, at
the top, when I put a line: "import textdictionary", without doing even
anything else with it, I get ERR_EMPTY response upon trying to open up my
home page. textdictionary.py is in the public_html/flask file, where
main.py is located. Is there any reason why importing this would cause the
program to crash?
Best,

On Fri, Mar 1, 2019 at 7:04 AM Heliohost Support
wrote:

> @app.route('/ouput/', methods = ['POST', 'GET'])Looks like you're missing
> a t.
>
> You may view the status of your ticket by visiting:
>
> https://www.helionet...p?showtopic5258
>
> Thank you,
> Heliohost support
> https://www.heliohost.org/
> https://www.helionet.org/
>
>
This is an unmonitored account for announcements only.
Wiki | Facebook | Twitter
Posted ImagePosted ImagePosted Image
Posted ImagePosted ImagePosted Image

#6 Krydos

Krydos

    Rank X Member

  • Root Admin
  • 17,575 posts
  • Gender:Male

Posted 01 March 2019 - 05:15 PM

Textdictionary.py is massive. 16 MB text files take a long time to load. It's likely your script is timing out. I'm not sure what you're trying to do, but it might be better to store your textdictionary in a database and query it that way.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users