Questions tagged [pset7]

For problem set 7 (CS50 Finance)

Filter by
Sorted by
Tagged with
6
votes
3answers
2k views

Pset7 - Forbidden 403. I can't even get started

I have done a ton of research online regarding this problem and have found several similar threads, but none of those solutions are working for me. I saw somebody posted the same question yesterday ...
1
vote
1answer
475 views

phpMyAdmin: “mysql extension missing” error

pset7: I receive the following error when trying to open phpMyAdmin: "the mysqli extension is missing. Please check your PHP configuration. See our documentation for more information." I previously ...
3
votes
1answer
2k views

can't get the site to run

i'm almost done with the pset7 and this happend , something has gone wrong and cant figure it out . first i couldn't get the apache50 to start then i found this on web "echo > ~/lib/apache2/log/error....
10
votes
1answer
2k views

pset7 phpMyAdmin errors on loading pset7.sql

I am working on pset7 and have loaded pset7.sql into phpMyAdmin, but whenever I try and click on 'users' in the left hand column I get an error message which includes "#1146 - Table 'phpmyadmin....
3
votes
3answers
708 views

When I try to use phpMyAdmin, I get a forbidden error

I am trying to start pset7 but whenever I try to use phpMyAdmin I get this error: Forbidden You don't have permission to access /phpMyAdmin on this server In my experience, I should get a popup ...
2
votes
2answers
544 views

Using jinja to render template based on previous url - pset7 finance

For the finance website homepage, I want to render index.html differently based on the previous url. For example, if I logged in I want to render a panel saying 'logged in', but if I registered I want ...
1
vote
1answer
4k views

Pset7, Index: How to use loops in Python and Jinja?

I felt like I could understand the for loops great in c, but seem to be hitting a wall here. Some generic conceptual questions before i get into it: 1) ANSWERED. what sequence does the program run, ...
2
votes
3answers
818 views

Problem with query quotes from Yahoo finance

Does anyone recently have problem with this url "http://download.finance.yahoo.com/d/quotes.csv?f=snl1&s={}" in helpers.py of pset7? Before yesterday, the lookup() in helpers.py worked fine but ...
1
vote
1answer
494 views

pset7 index.html, adding buy/sell button which linked to stock respectively

As the last requirement of the pset, I want to try empower users to buy more shares or sell shares of stocks they already own via index itself, without having to type stocks' symbols manually. I have ...
1
vote
2answers
2k views

pset7 movies Q12

I'm stuck in PSET7 SQL part 1 question 12: I want to list all movies with 2 people inside. The JOIN of the 3 table is set, the problem is in my WHERE statement: WHERE people.name = 'Johnny Depp' ...
0
votes
1answer
725 views

pset7 finance ':( sell handles valid sale'

if someone would please help me, I've been struggling with this for hours. I am receiving this failure of a check within check50 for pset7 finance: :( sell handles valid sale expected to find "56....
0
votes
1answer
1k views

Pset7 buy - RuntimeError sqlite3.OperationalError near transaction

I have been working on pset7, and I have been getting this error when trying to buy via the html form: RuntimeError: (sqlite3.OperationalError) near "transaction": syntax error [SQL: "INSERT INTO ...
0
votes
1answer
119 views

CSS Having No Affect in PSET7

I'm trying to left align text in a table in pset7 and none of the CSS code I write in styles.css is having any affect whatsoever. I even went as far as giving an "id" to an individual "td" element and ...
0
votes
1answer
399 views

When I run my apache50 server at ~/workspace/pset7/public why does login.php files open?

I have a question regarding the working of pset7. I have completed it but now I am scratching my head for this question. When I run my apache50 server like : apache50 start ~/workspace/pset7/public ...
0
votes
1answer
282 views

How can I use foreign keys in phpLiteAdmin for Pset7

I've designed a database structure where I want to use foreign keys to link several tables, but I'm not sure how to do it with phpLiteAdmin. I searched other posts and got an error "ERROR: near "db": ...
0
votes
1answer
111 views

CS50 Library error

I had an error trying to restart apache2 but when I resolved this problem, with some help on this forum, I'm now getting the following error message: The error message reads: Fatal error: CS50 ...
0
votes
3answers
262 views

sudo gedit /etc/hosts ERROR

As per the instruction for PSET7 I need to do execute the following in the terminal window. sudo gedit /etc/hosts In order to make changes in "read-only" file Executing the above give me this error ...
0
votes
1answer
33 views

PSET7: Extracting strings from queries with PHP

Not a bug, but wondering if someone can explain why this works... I'm attempting to display someone's name and cash position. In index, I query the tables for the relevant values. This returns an ...
5
votes
1answer
766 views

Unable to see MySQL Username and Password even follow the steps listed in pset7. Can't even find ⓘ icon toward CS50 IDE’s topright. Need help

![CS50-ide Can't find ⓘ icon toward CS50 IDE’s topright corner]1
1
vote
5answers
666 views

Cannot get started on pset7

I'm having problems with getting started with pset7. firstly, after following the instructions carefully and downloading the files for pset7. I tried accessing the CS50 Finance page within my IDE but ...
1
vote
1answer
149 views

PSET7: web server permissions problem

Just started pset7 and can't get the web server to load. I've read about this all over the place but can't get anything to work as of yet. Now I've resorted to wiping the whole workspace clean (after ...
1
vote
1answer
14k views

Struggle passing values from Python to HTML via Flask

I'm working on the buy() method. I've created an input form allowing the user to enter the share (what we call "stocks" in the UK) symbol and the number of shares the user wants to buy. I then want ...
1
vote
1answer
229 views

pset7 buy - ON DUPLICATE KEY syntax question

I'm on pset7 buy, and I just need some explanation on how the ON DUPLICATE KEY syntax is supposed to look (at least I assume that's the issue). Btw, id and symbol are both unique keys in my portfolio ...
0
votes
1answer
625 views

How do I send an email with php?

I want to do the email a link to reset the password for the extra feature although i'm not sure where to start. Looked around and This page has instructions for sending email through a localhost. ...
5
votes
1answer
3k views

cs50 finance / pset-7 confused on index() table

I am trying to work on pset7, but am having a problem printing it out to the screen in the table format. I have all the values I need (the values I have are correct), but just can't figure out how to ...
1
vote
2answers
4k views

pset7 index TypeError: 'NoneType' object is not subscriptable

I'm working on pset7 index, and I've hit a snag. When I try to log in and render index, I get this error: TypeError: 'NoneType' object is not subscriptable It says the main error is on line 50: name =...
1
vote
2answers
325 views

CS50 Pset7: rows inside the for loop are not showing up in index.html

I have been trying to implementing my code for Index and index.html. My code for Index seems to work very well, but my index.html isn't. My implementation of index() and index.html are pasted below. ...
1
vote
1answer
82 views

Explain the syntax for function render in PSET 7

I don't completely understand this line of render. function render($view, $values = []) I know it passes two arguments, the second is an empty array that you can fill I think? I used this in 'Quote'...
1
vote
3answers
200 views

PSET7: How to get a user's password from users table?

I'm up to the extra feature and I want to implement a reset password feature. To keep it safe, I'm asking the user for their username and then I want to send them an email with their password. However ...
1
vote
1answer
627 views

pset7 finance check50 doesn't detect a valid sale despite portfolio updating correctly

I'm puzzled why check50 shows me this error despite my portfolio and SQLite database correctly reflecting the sold shares :( sell handles valid sale expected to find "56.00" in page, but it ...
1
vote
2answers
579 views

Password for phpLiteAdmin

I am requested to enter a password for phpLiteAdmin. I was following steps from the lecture, intro to phpliteadmin. After I inserted a new row ("name", "dorm") into the table registrants, I got this ...
1
vote
1answer
446 views

Issue with Check50 PSET7 buy.html :( buy handles valid purchase

:( buy handles valid purchase application raised an exception (see log for details) Log sending POST request to /login sending POST request to /buy exception raised in application: TypeError: '...
1
vote
1answer
443 views

Challenge inserting into database from buy()

I'm have a challenge inserting into the database when I buy shares. I've made life a little complicated (or sophisticated!) because I decided to insert a separate step in the buying process: I start ...
1
vote
3answers
374 views

Problem loading phpMyAdmin

After working on pset7 for about a month now. I have reached a position where I thought that I was making some progress. However, it wasn't to be. When I logged on to my IDE and tried to load ...
1
vote
1answer
51 views

Can mail() function b used with the pset7 code?

i was playing with the code of pset7 and have edited it in such a way that during registration the user is asked to provide his email id and I am saving the email id and the original password that he ...
1
vote
1answer
404 views

Pset 7 - Finance: Clicking Register creates: AttributeError: 'ValueError'

I've been trying to get my register page to work for a couple days now. I think I'm close , but now I'm receiving the following error message in my terminal when I try to click register from the login ...
1
vote
1answer
653 views

finance 500 internal server error on registration

I've hit a snag when trying to implement register in pset7. Every time I enter a new username, password, and password confirmation, I'm getting a 500 server error. I don't know how to read the log to ...
0
votes
1answer
515 views

CS50 Final Project: Unique URL for each user of my flask app

For the final project, I am trying to implement a flask application where people may write diaries and read others' diaries. I would like to create a unique URL for each user that shows the diaries ...
0
votes
1answer
41 views

Have to spam click refresh button for form to actually submit

I'm working on pset7, register and I'm at a loss for how to fix this issue. I'm fairly certain my application.py logic is correct because once the form finally submits everything works as expected. I ...
0
votes
1answer
139 views

pset7 check50 fails to load external python module pandas

I'm getting the following error from check50: :| application starts up check50 ran into an error while running checks! Log No module named 'pandas' ... File "application.py", line 3, in <...
0
votes
1answer
361 views

How can I debug an internal server error in pset 7 to get past login and register?

Whenever I try to login or register after running "flask run" on pset7, I receive an internal server error. When I run check50, it says that registering a user does not succeed and registration does ...
0
votes
1answer
144 views

pset7 index TypeError: 'NoneType' object is not subscriptable error

Me again with this error. I do not know what happened, this has been working for a couple of weeks and I have not changed the code (though I did copy and paste it) but all of a sudden this afternoon I ...
0
votes
1answer
103 views

CS50 Pset7: rows inside the for loop aren't showing up in index.html

I have been trying to implementing my code for Index and index.html. My code for Index seems to work very well, but my index.html isn't. The jinja template is pasted below. For some reasons, the table ...
0
votes
1answer
708 views

PSET7 - finance check50 error

I'm getting the following error from check50 for Pset7 Finance: Why does check50 fail to login as a registered user?! It works perfectly fine for me to log in. That login function is contained in ...
0
votes
1answer
677 views

PSET7 Finance - check50 error

I passed all test except one. ":( registration rejects duplicate username" (picture below) However I get the correct error message (400) in terminal when try to use username that is already taken. ...
0
votes
1answer
148 views

pset7 finance register sql

I've been working on the register part of the finance problem and I think I have most of it but I really don't understand how to do the SQL parts of it. I need to learn how to store the username and ...
0
votes
1answer
58 views

CS50 Pset7: Pset7 questions in preparation for final project

I have two questions arising from this problem set which I think can eventually help me with implementing my final project: Atop every page of the stock trading website, whether it be the LOGIN, ...
0
votes
1answer
90 views

pset7, `/etc/hosts` saves the changes for only the current session

I am trying to modify my /etc/hosts file according to pset7. It saves the changes but for only the current session. If I shut down the appliance and the VirtualBox and then start them again, the /etc/...
0
votes
1answer
144 views

How to factor out similarities in history and portfolio tables?

I did the history problem by making a separate table with all of the values that I wanted to show to the user, all of which were the same as that of my portfolio page but instead would not be deleted ...
0
votes
2answers
240 views

pset7 reset password php mail function doesn't send email

EDIT number 2: I have tried phpmailer instead of mail() function. Please, take a look at the code below. I have created a few email accounts to test the code, none worked: yahoo, gmail, yandex. I am ...