Skip to main content

Questions tagged [import]

The tag has no usage guidance.

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

Why can't I use get_int in python

when I run mario.py it gives me this error NameError: name 'get_int' is not defined. I don't know why. import cs50 def main(): while True: print("Height:") h = get_int() if h < 0 or ...
SamGal's user avatar
  • 72
0 votes
0 answers
35 views

Cannot import helpers in sentiments, pset6 [duplicate]

Question is identified as possible duplicate of IndexError in initial state of pset6 Sentiments, however, that question refers to an issue that's seen after running flask on unmodified distribution ...
devwanderer's user avatar
0 votes
0 answers
61 views

pset8 import: Driver error preventing me from even starting pset

I have been trying to import the US.txt file into mySQL using the code on import. I am able to log into PHPMyAdmin just fine, but when I run ./import US.txt, I get the following error: $ ./import US....
Kgotso Koete's user avatar
0 votes
1 answer
99 views

pset8, import. Only even row numbers from US.txt are being written to db

I managed to import file from US.txt to places table and all seems ok, except that only rows from even numbers in file are being imported. Instead of 40975 rows I have 20487. I tried with while loop(...
Grzegorz Milanowski's user avatar
0 votes
1 answer
196 views

pset8 error in opening US.txt

In pset8 import file on running the command ./import /pset8/US.txt the file is not opening.I have tried many methods but the interpreter says the file does not exists, although I can clearly see it (...
Pranjal Sharma's user avatar
1 vote
1 answer
115 views

Pset8, Mashup, import, i have been seen this error

I really don't know what's wrong, will it be the permission? Any help is appreciated! ~/workspace/pset8/bin/ $ ./import US.txt PHP Warning: require(/..includes/config.php): failed to open stream: ...
Abdulsadeeq's user avatar
0 votes
1 answer
132 views

Pset 8 Mashup Import Issue (fgetcsv returns empty array)

I am working on Pset8 (AKA mashup) and have run into an issue with my import script. It turns out that I have an issue with the SQL query that I am doing to insert each line from my US.txt file. It ...
AdiKhajuria's user avatar
0 votes
1 answer
51 views

Pset8 imports zero Lat Lng

I implemented my import function and it seemed to work, I went on implementing the rest of the pset(which I already have finished with some minor bugs) BUT I found that some of the rows in my table ...
Garve Worm's user avatar
0 votes
2 answers
104 views

Pset8 - Import using PHP array

Here's a fragment of my code containing the elements pertinent to my question. I am trying to use a PHP data array to send data to the Import routine. I establish the array $keywords and apply ...
rl777's user avatar
  • 39
1 vote
2 answers
170 views

Pset8 import undefined offset notice

I am getting these errors in the loop in running import from the command line and cant figure out why I am getting this and how to get rid of it PHP Notice: Undefined offset: 1 in /home/ubuntu/...
Furrukh Jamal's user avatar
0 votes
1 answer
108 views

PSET8: fopen() not working for import

For pset8, fopen() keeps returning FALSE. The relevant part of my code is below: #!/usr/bin/env php <?php $file = ($argv[1]); if(file_exists($file) == 0) { exit("File does not exist.\n"); } ...
WGF56's user avatar
  • 3
1 vote
0 answers
428 views

CS50 IDE give "no such file or directory" even when filepath is correct

When I trying to run my import file from pset8 from the command-line, I got the message "bash: ./import: No such file or directory". I double and triple checked that I was in the correct directory, ...
Cchio's user avatar
  • 15
0 votes
1 answer
144 views

'import' works: just 'latitude' and 'longitude' values are all 0.000?

'import' gets 'US.text' into 'places'. All values are correct, but 'longitude' and 'latitude'are all 0.0000; In 'places' I defined those as Decimals(7.4) specifying as 0.0000; What could have went ...
gado007's user avatar
  • 59
0 votes
1 answer
159 views

How to fix "PHP parse error" when running import?

I get the following error. tried for 3 days to understand it, but no success: PHP Parse error: syntax error, unexpected '{' in /home/jharvard/vhosts/pset8/import on line 13. It's the very first ...
swissfritz's user avatar
1 vote
1 answer
54 views

ERROR RESOLVED:PHP Fatal error: Column 'country_code' cannot be null in /home/jharvard/vhosts/pset8/includes/functions.php on line 57

I have been working on this issue for the past few days. PHP Fatal error: Column 'country_code' cannot be null in /home/jharvard/vhosts/pset8/includes/functions.php on line 57 initially i had ...
HARISH GANDHI.R's user avatar
0 votes
1 answer
174 views

PSET8 import undefined offsets and fatal error

I've been trying to implement import and I've modified the file US.txt by replacing "\t" with " , " on each line just for a better practicality with my code. However, I receive the following error: ...
Gabriel's user avatar
  • 97
0 votes
1 answer
258 views

PSET8 import fatal error

I've been trying to implement import and I've modified the file US.txt by replacing \t with " , " on each line just for a better practicality with my code. However, I receive the following error: ...
Gabriel's user avatar
  • 97
1 vote
3 answers
169 views

Excel into MySQL

A website has a link to download an excel file. I need some of those columns in my MySQL database. Is there a relatively painless way to: 1. use phpmyadmin's import tab 2. use a method similar to ...
Ben Love's user avatar
  • 173
0 votes
1 answer
177 views

pset8 import SQL error

I've got an error when querying to table, after handling the absence/presence of accuracy, it wrote 21817 lines, but then got an error. COUNTRY_CODE must no be null. Inspecting the database, i figured ...
user10187's user avatar
0 votes
1 answer
130 views

pset8 import imploding and exploding a line

i'm trying to import the txt file. Using fgetcsv a hole line is stored in a variable, then i imploded it, \t as pattern, bu that leads me an array with empty spaces (probably aditional tabs), so i don'...
user10187's user avatar
0 votes
1 answer
133 views

a problem with displaying the places table

i got (import) to work and i saw the first 30 rows of data displayed on the table then, something happened and i get the error Fatal error: Maximum execution time of 30 seconds exceeded in ...
kawegan's user avatar
  • 76
2 votes
2 answers
189 views

PHP Fatal error: Column 'country_code' cannot be nullPHP Fatal error: Column 'country_code' cannot be null

I have seen that some fellows have been having this same problem, but I could not find the solution. My query seems ok until but it still return me this strange error foreach ($file as $row) { $...
Lucas Mendes's user avatar
0 votes
1 answer
407 views

pset8 query function

I've gotten import.php working - enough to print out the values in US.txt correctly in arrays onto the screen. I'm using the below code to try and insert into database: if(is_readable($...
Kris Valentine's user avatar
0 votes
0 answers
554 views

When I run import I get errors

I am trying to run import, but I get an error: jharvard@appliance (~/vhosts/pset8/bin): ./import /path/to/US.txt Error: file /path/to/US.txt doesn't exist I was wondering if someone could help me ...
Shristi Sharma's user avatar
1 vote
1 answer
1k views

Import for Mashup

My code works to import the data into mysql, but the command line is giving me an error: PHP Fatal error: Column 'country_code' cannot be null in /home/jharvard/vhosts/pset8/includes/functions.php ...
Tarek Sultani's user avatar