7 votes

Runtime Error: API_KEY not set

This can be easily solved by noting which terminal the export command was executed in the same terminal window that flask is running in (will be prompted to run in after the export command). Otherwise,...
user avatar
5 votes
Accepted

runtime error in filter: reflect

For j being 0, your index would be width. But valid index is from 0 to width-1. Subtract one and it should be right. After fixing this, I see another issue: You first swap the left half with the ...
user avatar
  • 20.7k
2 votes
Accepted

Segmentation Fault Pset5

OK, the problem lies in a small error in the code. Let's follow the logic of the program. First, let's assume that line 38 is while (!feof(dict)){ The code will find a letter's node (or add one) ...
user avatar
  • 63.4k
2 votes
Accepted

PSET 4 Reflect help

So my swap function was switching the values of my variables but the variables themselves did not get switched so I had to write out the code to swap the variables (from what i'm told the swap ...
user avatar
2 votes

pset4 filter - blur - runtime error, colors off

Um, your code seems pretty hardcoded. It is good to improve the ability to think by trying to implement a new algorithm. I'm really sorry, I couldn't read it because its a lot. :( Anyways here's my ...
user avatar
1 vote
Accepted

Pset4 filter problem: blur problem Runtime Error

I recommend you use a for loop to check if there is not a pixel rounding the actual pixel. This should make mistakes disappear. It should be really 2 for loops, 1 for width and 1 for height. "i&...
user avatar
1 vote
Accepted

Runtime error in pset4

Question: When this code calculates blur values for each pixel, are those values stored in a temporary array, or stored back in the original image array as it goes along? Every pixel's blurred values ...
user avatar
  • 63.4k
1 vote

PSET 4 Errors: where did I go wrong?

For grayscale you should take a look to operator precedence in C (google). The result 'a + b / c' is not the same than '(a + b) / c' For reflect a question: How many swaps do you need to do to flip ...
user avatar
  • 1,561
1 vote
Accepted

unused variable error when trying to create separate table for each user's transactions in finance problem

Can't speak to the user error because I'm not well versed in flask, other than to say that an unused variable is pretty much self-explanatory. But, hopefully, this explanation will make the whole ...
user avatar
  • 63.4k
1 vote

Runtime Error: API_KEY not set

If anyone is still having a problem to set API_KEY as an environmental variable, remember to do it following this syntax (in VSCODE terminal or powershell for WINDOWS): $env:API_KEY="YOUR-API-KEY-...
user avatar
1 vote
Accepted

I'm getting a runtime error on an array and I'm not sure why:

reg is declared as an array with 15 elements. It has indexes 0 through 14. There is no reg[15]. Without seeing the rest of the code, one might assume it fails after r++ executes for the 15th time.
user avatar
1 vote
Accepted

Problem Set 7 - Buy - RuntimeError

The error from this sql INSERT INTO users ('transaction') VALUES(:cash) (quotes or not) is because there is no column named transaction in the users table. Now is the perfect time to add a table for ...
user avatar

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