Jump to content

Recommended Posts

Posted

Hello 

 

So I began importing routes into my VA through the import CSV function. One batch of route is giving me problems though, every time I attempt to import them i receive a 500 error message from the VA website. When i refresh and check the flight table, about a little less of half of them make it through, i then tried splitting them up but still receive the 500 error and it is only for this specific batch of airport pairs as i am able to import other routes fine. I looked at the laravel logs, and the only errors i can see are from a seperate unrelated issue that was solved which had to do with duplicate airport submissions. 

 

I also have ended up with multiples of all flights every time this error occurs. 

 

Here are my specs 

PHPVMS Ver 7.0.0 beta 5

Database MyQL

Hosting provided by vmshost

 

my log 
[2024-02-27 17:26:22] production.INFO: Exporting "flight" to /home/vusairco/phpvms/storage/app/import/export_export_flight.csv.csv  
[2024-02-27 17:26:25] production.INFO: Exporting "flight" to /home/vusairco/phpvms/storage/app/import/export_export_flight.csv.csv  
[2024-02-27 17:27:17] production.INFO: Uploaded airport import file to /home/vusairco/phpvms/storage/app/import/import_flight.csv  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 1  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 2  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 3  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 4  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 5  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 6  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 7  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 8  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 9  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 10  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 11  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 12  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 13  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 14  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 15  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 16  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 17  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 18  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 19  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 20  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 21  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 22  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 23  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 24  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 25  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 26  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 27  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 28  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 29  
[2024-02-27 17:27:17] production.INFO: Subfleets added/processed: 1  
[2024-02-27 17:27:17] production.INFO: Imported row 30  
[2024-02-27 17:27:17] production.ERROR: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'KPVD' for key 'PRIMARY' (Connection: mysql, SQL: insert into `airports` (`id`, `icao`, `iata`, `name`, `country`, `timezone`, `lat`, `lon`, `location`) values (KPVD, KPVD, PVD, Theodore Francis Green State Airport, US, America/New_York, 41.7326, -71.4204, Providence)) {"userId":1,"exception":"[object] (Illuminate\\Database\\QueryException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'KPVD' for key 'PRIMARY' (Connection: mysql, SQL: insert into `airports` (`id`, `icao`, `iata`, `name`, `country`, `timezone`, `lat`, `lon`, `location`) values (KPVD, KPVD, PVD, Theodore Francis Green State Airport, US, America/New_York, 41.7326, -71.4204, Providence)) at /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Connection.php:793)
[stacktrace]
#0 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(753): Illuminate\\Database\\Connection->runQueryCallback('insert into `ai...', Array, Object(Closure))
#1 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(579): Illuminate\\Database\\Connection->run('insert into `ai...', Array, Object(Closure))
#2 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Connection.php(531): Illuminate\\Database\\Connection->statement('insert into `ai...', Array)
#3 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Query/Builder.php(3305): Illuminate\\Database\\Connection->insert('insert into `ai...', Array)
#4 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Builder.php(1922): Illuminate\\Database\\Query\\Builder->insert(Array)
#5 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1311): Illuminate\\Database\\Eloquent\\Builder->__call('insert', Array)
#6 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(1139): Illuminate\\Database\\Eloquent\\Model->performInsert(Object(Illuminate\\Database\\Eloquent\\Builder))
#7 /home/vusairco/phpvms/app/Services/AirportService.php(141): Illuminate\\Database\\Eloquent\\Model->save()
#8 /home/vusairco/phpvms/app/Services/ImportExport/FlightImporter.php(205): App\\Services\\AirportService->lookupAirportIfNotFound('PVD')
#9 /home/vusairco/phpvms/app/Services/ImportExport/FlightImporter.php(130): App\\Services\\ImportExport\\FlightImporter->processAirport('PVD')
#10 /home/vusairco/phpvms/app/Services/ImportService.php(134): App\\Services\\ImportExport\\FlightImporter->import(Array, 31)
#11 /home/vusairco/phpvms/app/Services/ImportService.php(238): App\\Services\\ImportService->runImport('/home/vusairco/...', Object(App\\Services\\ImportExport\\FlightImporter))
#12 /home/vusairco/phpvms/app/Http/Controllers/Admin/Traits/Importable.php(52): App\\Services\\ImportService->importFlights('/home/vusairco/...', false)
#13 /home/vusairco/phpvms/app/Http/Controllers/Admin/FlightController.php(329): App\\Http\\Controllers\\Admin\\FlightController->importFile(Object(Illuminate\\Http\\Request), 6)
#14 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Controller.php(54): App\\Http\\Controllers\\Admin\\FlightController->import(Object(Illuminate\\Http\\Request))
#15 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php(43): Illuminate\\Routing\\Controller->callAction('import', Array)
#16 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Route.php(260): Illuminate\\Routing\\ControllerDispatcher->dispatch(Object(Illuminate\\Routing\\Route), Object(App\\Http\\Controllers\\Admin\\FlightController), 'import')
#17 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Route.php(205): Illuminate\\Routing\\Route->runController()
#18 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(797): Illuminate\\Routing\\Route->run()
#19 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Routing\\Router->Illuminate\\Routing\\{closure}(Object(Illuminate\\Http\\Request))
#20 /home/vusairco/phpvms/vendor/santigarcor/laratrust/src/Middleware/Ability.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#21 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laratrust\\Middleware\\Ability->handle(Object(Illuminate\\Http\\Request), Object(Closure), Array, Array)
#22 /home/vusairco/phpvms/vendor/santigarcor/laratrust/src/Middleware/Ability.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#23 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Laratrust\\Middleware\\Ability->handle(Object(Illuminate\\Http\\Request), Object(Closure), Array, Array)
#24 /home/vusairco/phpvms/app/Http/Middleware/SetActiveLanguage.php(22): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#25 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\SetActiveLanguage->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#26 /home/vusairco/phpvms/app/Http/Middleware/SetActiveTheme.php(40): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#27 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\SetActiveTheme->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#28 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php(50): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#29 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Routing\\Middleware\\SubstituteBindings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#30 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Auth/Middleware/Authenticate.php(57): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#31 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Auth\\Middleware\\Authenticate->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#32 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php(49): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#33 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\View\\Middleware\\ShareErrorsFromSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#34 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(121): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#35 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php(64): Illuminate\\Session\\Middleware\\StartSession->handleStatefulRequest(Object(Illuminate\\Http\\Request), Object(Illuminate\\Session\\Store), Object(Closure))
#36 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Session\\Middleware\\StartSession->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#37 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php(37): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#38 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\AddQueuedCookiesToResponse->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#39 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php(67): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#40 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Cookie\\Middleware\\EncryptCookies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#41 /home/vusairco/phpvms/app/Http/Middleware/InstalledCheck.php(30): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#42 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\InstalledCheck->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#43 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#44 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(798): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#45 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(775): Illuminate\\Routing\\Router->runRouteWithinStack(Object(Illuminate\\Routing\\Route), Object(Illuminate\\Http\\Request))
#46 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(739): Illuminate\\Routing\\Router->runRoute(Object(Illuminate\\Http\\Request), Object(Illuminate\\Routing\\Route))
#47 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Routing/Router.php(728): Illuminate\\Routing\\Router->dispatchToRoute(Object(Illuminate\\Http\\Request))
#48 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(200): Illuminate\\Routing\\Router->dispatch(Object(Illuminate\\Http\\Request))
#49 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(141): Illuminate\\Foundation\\Http\\Kernel->Illuminate\\Foundation\\Http\\{closure}(Object(Illuminate\\Http\\Request))
#50 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#51 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/ConvertEmptyStringsToNull.php(31): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#52 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\ConvertEmptyStringsToNull->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#53 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TransformsRequest.php(21): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#54 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/TrimStrings.php(40): Illuminate\\Foundation\\Http\\Middleware\\TransformsRequest->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#55 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\TrimStrings->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#56 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/PreventRequestsDuringMaintenance.php(86): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#57 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): Illuminate\\Foundation\\Http\\Middleware\\PreventRequestsDuringMaintenance->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#58 /home/vusairco/phpvms/app/Http/Middleware/TrustProxies.php(43): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#59 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(180): App\\Http\\Middleware\\TrustProxies->handle(Object(Illuminate\\Http\\Request), Object(Closure))
#60 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php(116): Illuminate\\Pipeline\\Pipeline->Illuminate\\Pipeline\\{closure}(Object(Illuminate\\Http\\Request))
#61 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(175): Illuminate\\Pipeline\\Pipeline->then(Object(Closure))
#62 /home/vusairco/phpvms/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php(144): Illuminate\\Foundation\\Http\\Kernel->sendRequestThroughRouter(Object(Illuminate\\Http\\Request))
#63 /home/vusairco/public_html/index.php(63): Illuminate\\Foundation\\Http\\Kernel->handle(Object(Illuminate\\Http\\Request))
#64 {main}

Posted

1062 Duplicate entry 'KPVD' for key 'PRIMARY'

 

Are you using KPVD both as destination and alternate in a flight you are trying to import. Or are you somehow using IATA codes somewhere in your schedule ? (Which can also cause problems)

 

Looks like somehow it tries to insert it twice in a row (which is strange), normally we expect it to update or skip if an airport is known and in your database.

Posted
23 hours ago, DisposableHero said:

1062 Duplicate entry 'KPVD' for key 'PRIMARY'

 

Are you using KPVD both as destination and alternate in a flight you are trying to import. Or are you somehow using IATA codes somewhere in your schedule ? (Which can also cause problems)

 

Looks like somehow it tries to insert it twice in a row (which is strange), normally we expect it to update or skip if an airport is known and in your database.

 

So i went into my database and KPVD was marked correctly, but i went into my flights .csv and found that KPVD was labeled as just PVD. After changing both the inbound and outbound flight to reflect KPVD the import went through successfully. 

  • Like 1
Posted

Great news, we added that IATA code usage for testing but it is not finalized yet, so for now (until further notice) keep using ICAO codes ;)

 

Later on it will be possible to use IATA codes as like real airlines.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...