Hot answers tagged

4 votes
Accepted

PSET7: web server permissions problem

403 Forbidden / permissions / chmod: the Definitive Guide TL;DR: PHP files and config.json need to be set to chmod 640 despite what it says in the Problem Specification. Hope this helps!
hotwebmatter's user avatar
  • 3,050
2 votes
Accepted

Problem Set 8 / Web Track - Finance (RuntimeError: UNIQUE constraint failed)

A problem is here: if rows == 1:. Remember, execute returns a list of dictionaries, therefore that conditional is never true.
DinoCoderSaurus's user avatar
1 vote
Accepted

Blocked on C$50 Finance suggested personal touch feature - adapting index page to enable transactions in situ

The proximate cause of the error is id is not submitted with the form. There may be an easier way that would eliminate the code that is presumably duplicated between index and buy/sell. The button ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Week 8 - Finance - Buy - Getting Error Message Missing Shares

The name for shares is "symbol". It is in this line: <input autocomplete="off" autofocus class="form-control" name="symbol" placeholder="Shares" ...
Vsjain's user avatar
  • 1,006
1 vote
Accepted

finance cosntraint syntax error

The SQLite does not support adding constraints to existing tables. The use of an unique index shall deliver the same effect. CREATE UNIQUE INDEX example ON illustrations (reference) The documentation ...
Ashen Gunaratne's user avatar
1 vote
Accepted

Finance sql doubt

Sure. Use the UPDATE sql command, It'll take the form of "UPDATE table SET some value WHERE some_condition". Google sql update For example: UPDATE users SET firstname = "Fred", ...
Cliff B's user avatar
  • 68.3k
1 vote
Accepted

Web track finance error

The "sequence" in the error message is shares, which is a string. From MDN doc on sending form data: Whichever HTTP method you choose, the server receives a string that will be parsed in ...
DinoCoderSaurus's user avatar
1 vote
Accepted

Finance Register Checking for Duplicate Username Not Working

Iirc the users table in the db was provided for us, so while Cliff's solution would work it's not the issue. I'm not sure if the SQL in the below function is calling anything, so nothing will be ...
Wh0am3ye's user avatar
1 vote
Accepted

PSET Tracks Flask and JS

The name of the attribute is 'disabled' (past tense), not 'disable'. And, of course, "submit" is enabled by default, so the toggle will not work if nothing is entered in the "task" input before the "...
DinoCoderSaurus's user avatar
1 vote

Why can I not open my website in HTML?

"open index.html" is not the appropriate command to open the browser, if we are in the appropriate directory, this command will open a file like this name in the IDE editor, if the file does not exist ...
MARS's user avatar
  • 5,169
1 vote

Connection to the server problems

I've finally got the message. You were right. The 2015 and the 2016 versions of the instructions are different. I thought I was reading the 2016 version which in fact was the 2015 version. In the 2016 ...
Mark Edwards's user avatar
1 vote

Connection to the server problems

server gives the "Stopping server" message when it cannot find the "/path/to/root". So, there is no "public" folder in your current working directory when you execute ~cs50/pset6/server public. Either ...
DinoCoderSaurus's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible