Questions tagged [web.py]

web.py is a minimalist web framework for Python.

Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

web.py seeother() not functioning as expected

I'm new to web.py. Trying to setup redirection as explained in the documentation. However, when I send a curl request for localhost:8080/health/ the application returns None instead of the HAPPY ...
Jerrin's user avatar
  • 11
0 votes
0 answers
32 views

passing a multiproccessed dict to web.py

i have a django page, and an eternal python script. the external python script is multiproccessed, 1 proccess has a while loop which sends websocket messages to my django page, the other proccess is a ...
tgmjack's user avatar
0 votes
3 answers
49 views

Data scraping with python beautifulsoup

Hey I created a script to datascrape a specific website, the code is ok but i get a error when i try to excecute the code. Tried cmd to excecute the file so i can get results but still a error. ...
Help's user avatar
  • 1
0 votes
1 answer
159 views

web.py and lighttpd error: Connection refused, child exited: 1

I'm running web.py with lighttpd with very similar config to what's suggested on the website. When I run it with /etc/init.d/lighttpd start I get these errors in the logs: 2022-11-07 21:30:59: (...
busterroni's user avatar
0 votes
3 answers
156 views

Trying to return a static file in web.py but getting "not found" error message

I have a web.py server hosted on pythonanywhere.com doing some handy things with python. Now I'd like to just serve a straightforward html file from the same server i.e. just return the contents of a ...
carbontracking's user avatar
0 votes
1 answer
14 views

When using web.py how can I checkis a parameter exists in the URL?

I'm using web.py https://webpy.org/ for providng access to simple python script like http://hosturl.com.scriptname?param1=something&param2=somethingelse I see how I can retrieve the values of ...
carbontracking's user avatar
0 votes
2 answers
522 views

How do I target an error as result of timeout in python

I am writing a function to restart my code whenever there is a connection problem. whenever I disconnect my WiFi, the following is generated. File "C:\Users\m2jto\AppData\Local\Programs\Python\...
Engr. Sule Muhammed Abba's user avatar
0 votes
3 answers
2k views

GET() missing 1 required positional argument : how do i format a GET request to include parameters?

I have a webapp with the following code, which is supposed to serve up any .html file I have stored in the htmls/ directory, provided the two parameters urlhash and predictiontag are correct. import ...
wheeeee's user avatar
  • 1,066
0 votes
1 answer
226 views

How to return static HTML pages within a directory using web.py?

I have a web app built with web.py that generates some HTML files and serves them up to the front end. Just by going through the web.py tutorial, it seems I need to explicitly create a class for each ...
wheeeee's user avatar
  • 1,066
-1 votes
1 answer
319 views

Get URL with access token

I know this is a question with a really simple answer, but I've been looking for the answer for two hours and I can't find it. I am trying to convert a web.py google and facebook auth login module to ...
AlpaBeta's user avatar
1 vote
1 answer
64 views

Base layout does not load when accepting dynamic url

I am using web.py for a web project. I have the following url structure urls = ( '/', 'Home', '/register','Register', '/postregistration', 'PostRegistration', '/login', 'Login', '/...
Deep's user avatar
  • 31
0 votes
1 answer
73 views

Purpose of t before $ in HTML Python template

What is the purpose of inserting t before $ symbol when making HTML templates in python web.py framework: $def with (todos) <ul> $for todo in todos: <li id="t$todo.id">$todo....
Oghli's user avatar
  • 2,200
1 vote
1 answer
90 views

Python-Arduino Web

So I am going off of the book called 'Python Programming for Arduino', and I am currently having trouble working the web ex 2 in the book. I know that github has the code at this link: https://github....
Edgar's user avatar
  • 11
0 votes
1 answer
51 views

Problems with boostrap (begginer)

I am trying to create web page using web.py and I've added bootstrap and ripples. But when I run it, I get the following errors: - - [17/Aug/2020 08:56:01] "HTTP/1.1 GET /" - 200 OK - - [...
big Bro's user avatar
1 vote
1 answer
165 views

Running 2 web.py servers from the same script Python

New to Python. I am trying to run 2 web.py servers with different ports on the from the same script. Basically i want to start the 2 scripts at the same time and be able to access both ports ...
Kris Parsan's user avatar
0 votes
1 answer
117 views

Not able to access stylesheet and javascript files from Web Py controller

I'm very new to Python coding. I started building a simple site using Web.py. While I'm able to create all the simple routes like Home, Profile, etc properly, I'm facing an issue in setting up routes ...
Abhishek Paul's user avatar
1 vote
1 answer
43 views

How to do DB or table lock with webpy

I am unable to find what I need to do in the following situation: transactions or locking or a combination? And how is this done using webpy? I have the following situation: A user logs in via a ...
FrankIJ's user avatar
  • 1,987
0 votes
1 answer
78 views

How to make my navbar float and also separate the list with Bootstrap 4

I am trying to make my navbar float to the right and also separate the list in the navbar. I am finding it difficult after several attempts. Attached is my sample code I have been working on. i want ...
Nna's user avatar
  • 1
0 votes
0 answers
98 views

Handling localhost error Method not allowed and Not found in python

I try to execute the most easy code and yet i keep getting errors on my local host like "Method not allowed" or "Not found" It is making the whole learning process frustrating import web urls = ( ...
Nna's user avatar
  • 1
0 votes
1 answer
185 views

Web.py with "execution of 'Constant' statements is denied" error

test.py: import web render = web.template.render('templates/') urls = ( '/', 'index' ) class index: def GET(self): name='Bob' return render.test(name) if __name__ == "...
oopsrush's user avatar
1 vote
0 answers
101 views

How do I correctly handle buttons in different templates in web.py?

I'm trying to create a simple web interface for a raspberry pi project I'm working on. What I want is an index page that allows me to input three values and upon clicking a button pass them to a ...
Felix Armbruster's user avatar
1 vote
1 answer
411 views

Accessing web.py web server

I'm trying to run the tutorial code for web.py, and everything works fine except when I try to access the web server using a browser it says it can't connect to the server. Here is the code: import ...
dumbitdownjr's user avatar
0 votes
1 answer
845 views

How to fix "execution of 'Constant' statements is denied" error?

I'm following the tutorial in web.py documentation for templates import web render = web.template.render('templates') print (render.hello('world')) However when running the python file ...
Prog Student's user avatar
-1 votes
2 answers
3k views

"RuntimeError: generator raised StopIteration" every time i run the app. (Nothing Works)

So every time I try to run the app I get "RuntimeError: generator raised StopIteration error". I am using Python 3.7 (btw I don't know how to type fancy in this so its nice to see) I have tried ...
zhyrn's user avatar
  • 1
0 votes
1 answer
3k views

405 Method Not Allowed Error in post request while creating user

I'm making a user registration form in which I have made a post request to get the user input data in a print out form but 405 Method Not allowed error causing the problem. I'm a newbie so that's why ...
Qazi Ihtesham's user avatar
0 votes
1 answer
739 views

How to fix 500 Internal Server Error / web.py

I got this Error, I am trying to create a simple web project using web.py unfortunately when I try to register a user I got the error and I have tried already to change the attributes but no way to ...
fachc's user avatar
  • 27
1 vote
1 answer
549 views

Enabling and disabling debugging on web.py

I am trying to enable debugging on a web.py production server but unable to do so. Also, I am unable to do the reverse when running it locally. http://webpy.org/tutorial3.en It is mentioned on how ...
Tashfeen Ekram's user avatar
-2 votes
2 answers
118 views

Yet another web.py name collision [closed]

I'm trying to make a simple Hello World web page in Python 3.7.4 and web.py 0.40-dev1 (which is supposed to be compatible) and I'm running into AttributeError: module 'web' has no attribute '...
ADSMarko's user avatar
  • 363
0 votes
0 answers
142 views

why web.py cant find local css?

I'm trying to include css files into my code but it says files not found I'm going through this python course and I did everything just the same. At first, it was a path issue that I think I handled ...
meysam's user avatar
  • 1
1 vote
0 answers
78 views

How to combine web.py and dbus mainloops in one Python 3 application?

I have a web.py based web application, which works fine. The setup boils down to: app = web.application(urls_tuple, globals()) app.run() Now my application also has to be D-Bus aware, i.e. it has to ...
Martin's user avatar
  • 31
1 vote
0 answers
232 views

css not loading in webpy

it doesn't matter what browser I use,HTML file does get loaded but I can't load css file, I'm using PyCharm. You can see the structure of my files here, if you think I'm using a wrong path to my CSS ...
BackUpParis's user avatar
0 votes
2 answers
7k views

Uncaught TypeError: Cannot read property 'init' of undefined in Javascript while submitting form

I'm trying to make a social networking mini web app using python web.py module. I made a registration form in html, but when I fill the details and submit them, the browser console shows the following ...
Deepam Gupta's user avatar
  • 2,384
0 votes
1 answer
945 views

XMLHttpRequest Returns 404 Even Though File Exists

This is what the file structure for my project looks like. Voice, Text and Template are folders. I run python app.py, and when I go to localhost http://0.0.0.0:8080/ I can see the index.html page ...
Evan's user avatar
  • 95
2 votes
1 answer
550 views

Pytests on web.py application not covering methods code

First of all, sorry if the linguo is not 100% correct or something does not make 100% of sense, I am quite new into web aplication development and posting on stack overflow in general. I have a web....
ACleCas's user avatar
  • 71
0 votes
1 answer
527 views

How to read .txt file without .readlines() / replace UTF-8 newline character with \n?

I have some AI-generated nonsense in a .txt file that looks like this: MENENIUS: I have been they prayers of the reason, And away to friends than the state pointer; The words that shall can virtue to ...
Evan's user avatar
  • 95
0 votes
1 answer
962 views

how to run background function after response return from web.py

I would like to know, Is it possible to run a function after response from web.py service, which function takes long time to run? Lets say some example as below. file Name: code.py import web ...
Uday's user avatar
  • 15
0 votes
1 answer
481 views

write unit test for web.py application by using pytest

I would like to write unit test for web.py application by using pytest. How to invoke the web.py services in pytest. Code: import web urls = ( '/', 'index' ) app = web.application(urls, ...
Uday's user avatar
  • 15
1 vote
0 answers
57 views

How to fix ```<function Render.__getattr__.<locals>.template at 0x7f1dafac8400>``` error in python3 web.py

I'm using web.py for python3. And gets an error. Error: function Render.getattr..template at 0x7fcf15a43840 main.py import web from web.template import render urls = ( '/', 'Home' ) render =...
Prahalad Parihar's user avatar
0 votes
2 answers
2k views

How fix 500 Internal Server Error in python using webpy?

When I added some line of codes in my scripty.js file and also in my main.py I've got some problem with my POST function: scripty.js: var form = $('#register-form').serialize(); $.ajax({ ...
amir Mohammadian's user avatar
0 votes
1 answer
123 views

how to access dictionary items of list from webpy html file

# index.html $def with (data) $for i in data: <tbody> <tr> <td>$i</td> </tr> <tbody> Here data contains a list such ...
Prosenjit's user avatar
  • 231
0 votes
1 answer
148 views

How to save json all update data with python

simple.py import json, urllib.request url = "https://datahead.herokuapp.com/api/employeers/" response = urllib.request.urlopen(url) data = json.loads(response.read()) var_json = ? for i in data: ...
Prosenjit's user avatar
  • 231
1 vote
2 answers
42 views

trying to run webpy example: app isn't defined

I am trying to implement a captcha based on someone elses code using webpy. The code I am starting with is here: https://kzar.co.uk/blog/2009/07/14/web.py-captcha/ The example code there isn't ...
John Tate's user avatar
  • 778
0 votes
1 answer
803 views

Tell lighttpd used protocol (HTTPS) when Nginx reverse proxy is in front

I have a Nginx reverse proxy redirecting to a lighttpd server in the same machine. This reverse proxy works on HTTPS so I want to tell to lighttpd that HTTPS is being used as protocol instead of HTTP. ...
Cristian Gonzalez's user avatar
0 votes
0 answers
759 views

jquery.min.js:4 POST http://localhost:8080/postregistration 500 (Internal Server Error)

I tried configuring post data on web py,i configure in controller.py and scripty.js and got error this
SULAIMAN's user avatar
2 votes
2 answers
360 views

Cannot serve local static CSS file using python package web.py only HTML displays

I am currently taking a python course and when the page loads it will not display with any of the CSS. I have my Controller.py in the root directory D:\Coding\Python_Projects\Py\CodeWizard My CSS ...
Bernie Green's user avatar
1 vote
1 answer
1k views

How to process uploaded csv file by using web.py in python

I am trying to make a API for my model. I am trying to upload csv file and then read data in csv and then use model for prediction in API. I am able to upload the file and save in path but unable ...
Vish's user avatar
  • 33
0 votes
0 answers
57 views

Web.py : After Post, The session variables are initialized

I've already turned off debug mode by setting web.config.debug = False class login: def GET(self): return render.login() def POST(self): data = json.loads(web.data()) ...
absccc's user avatar
  • 1
0 votes
0 answers
37 views

Switch dictionary from external file by variable

I'm playing with webpy and have a little problem. I cannot switch between languages. Maybe my idea is wrong. I have defined the language dictionary in an external Python file. class hello: def ...
vatay's user avatar
  • 387
1 vote
1 answer
352 views

Error with Ubuntu/web.py Exception in thread when using cherryPy

I have a webApp i've been working on and I noticed that every once in a while I will see an error of "Exception in thread CP Server Thread-*" where * = random thread number.This error will occur ...
Brian Barnes's user avatar

1
2 3 4 5
18