Go Back  FlyerTalk Forums > Travel&Dining > Travel Tools
Reload this Page >

Flightplan: How to search a year of award inventory [no longer maintained]

Community
Wiki Posts
Search
Old Jan 16, 2019, 4:04 pm
FlyerTalk Forums Expert How-Tos and Guides
Last edit by: IBobi
Print Wikipost

Flightplan: How to search a year of award inventory [no longer maintained]

Thread Tools
 
Search this Thread
 
Old Oct 16, 2018, 5:26 pm
  #166  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by aradisc
I ran that exact command (after the README was updated) and I was still getting stuck at that place. Will try again on a different computer (also running 1809 though).
Yeah, getting better-sqlite3 to install properly on Windows seems to be the source of many issues. I suspect node-gyp is still using VS2013, I would try running: "npm config set msvs_version 2015". There's also a Github issue detailing problems specific to Windows: https://github.com/JoshuaWise/better-sqlite3/issues/73

Originally Posted by aradisc
I did manage to get flightplan installed on an Ubuntu VM. (Tip for anyone using Hyper-V quick create- don't select auto-login because you will have nightmares trying to get Enhanced Session to work correctly.) I was running into a little trouble installing node.js using the brew method (the linked article from Treehouse 4 years old) so I referenced method 3 here instead: https://www.ostechnix.com/install-node-js-linux/ . To get yarn installed correctly I had to remove the existing cmdtest package first. After installing yarn and flightplan, I had to go and add to before it would run.
Didn't realize the treehouse instructions for Ubuntu instruct using homebrew, that seems kinda weird (I think I just used apt). Will maybe update the README with the guide you mention instead.

Originally Posted by aradisc
Parsing always seems to return zero results, even if valid availability was found, unless I use --force.
It's probably returning zero results because the requests were already parsed (that's the new default behavior when running search command, is to parse automatically for you, so it's no longer needed as a separate step). --force just causes it to re-parse what it already parsed during the search command. The way to know if it's working or not is to check the awards table in the database, or using the web frontend.

Originally Posted by aradisc
Now I cant get the server to start (it started before when parsing had no results):
Bug in the logger code, which I've pushed a fix for (0.2.7). It's only triggered when logging an exception, so I expect once you upgrade, you'll get a new error when running the server, but at least it'll be a more informative one
jd20 is offline  
Old Oct 20, 2018, 2:36 pm
  #167  
 
Join Date: Feb 2013
Location: DTW
Programs: DL Diamond/AA Platinum, Hyatt/Hilton Diamond
Posts: 245
It seems NH waitlisted flights are shown as available in flightplan
jerryhze is offline  
Old Oct 20, 2018, 2:56 pm
  #168  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by jerryhze
It seems NH waitlisted flights are shown as available in flightplan
Thanks, will take a look.
jd20 is offline  
Old Oct 24, 2018, 10:25 am
  #169  
 
Join Date: Apr 2018
Posts: 17
I'm getting an error, with BA (although I haven't tried others):

[BA] error Unexpected error occurred while searching!
TypeError: date.utcOffset is not a function
at module.exports.chooseDateTab (/home/myusername/.config/yarn/global/node_modules/flightplan-tool/src/ba/engine.js:154:21)
at module.exports.modify (/home/myusername/.config/yarn/global/node_modules/flightplan-tool/src/ba/engine.js:137:28)
at module.exports._modify (/home/myusername/.config/yarn/global/node_modules/flightplan-tool/src/base/engine.js:186:17)
at module.exports._search (/home/myusername/.config/yarn/global/node_modules/flightplan-tool/src/base/engine.js:142:22)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
And I'm not sure if it's related, but on each of the detail windows when I click a day, has a broken image. I'd post but I don't have enough posts to put a URL
maxiedaniels is offline  
Old Oct 24, 2018, 1:56 pm
  #170  
Original Poster
 
Join Date: Jan 2010
Posts: 189
The broken image sounds like a BA website issue, not related to Flightplan at all.

Just pushed a new version (0.2.8) which includes a fix for that utcOffset error (as well as a few other bugs I found in the past week). Run "yarn global upgrade flightplan-tool" to install it.
daft009 likes this.
jd20 is offline  
Old Oct 29, 2018, 10:57 am
  #171  
 
Join Date: Aug 2012
Posts: 165
I've got error with CX, seems economy only. No problem with business.

[CX] error Unexpected error occurred while searching!
TypeError: Cannot read property 'cabin' of undefined
at award.segments.f.segments.map.x (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\cx\parser.js:61:47)
at Array.map (<anonymous>)
at flights.map.f (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\cx\parser.js:39:30)
at Array.map (<anonymous>)
at module.exports.parse (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\cx\parser.js:35:28)
at module.exports._parse (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\base\parser.js:26:16)
at module.exports.parse (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\base\index.js:99:28)
at module.exports.search (C:\Users\User04\AppData\Local\Yarn\Data\global\no de_modules\flightplan-tool\src\base\index.js:70:31)
at process._tickCallback (internal/process/next_tick.js:68:7)
woresu is offline  
Old Oct 29, 2018, 3:36 pm
  #172  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Originally Posted by woresu
I've got error with CX, seems economy only. No problem with business.
Thanks, must be a bug in the parser. If you have a specific route / date you searched for that caused the error, that would help. I've filed issues for both this, and the other issue reported above regarding NH waitlisted awards:

https://github.com/flightplan-tool/flightplan/issues/23
https://github.com/flightplan-tool/flightplan/issues/24

Will get a chance to fix these (and a few other engine-specific bugs I've been tracking) this week.
jd20 is offline  
Old Oct 30, 2018, 9:10 am
  #173  
 
Join Date: Jan 2012
Posts: 130
Hey guys -- I've been working on making docker images for this tool. It's been kind of an excuse for me to learn more about docker. I now have the command-line functioning. This should make it easier for those of you struggling with issues running it on Windows. I'll provide more documentation when this becomes "officially" a part of the Flightplan tool.

Install docker
Then you can run:

Code:
sudo '#if you need it' \
docker run \
--rm '#this removes the container after run' \
-it '#tell docker that we need to interact with it' \
-v ~/projects/fpdata/config/:/app/config '#-v indicates a volume mapping. host directory on the left' \
-v ~/projects/fpdata/data/:/app/data '#be sure to update all the mappings to where your local data is' \
-v ~/projects/fpdata/db/:/app/db \ '#don't touch the volumes on the right'
rbosworth/flightplan:cli '#this will pull the image from docker hub' \
search --docker '#command to pass to flightplan -- you can use any of the cli commands'
Chromium has a TON of dependencies so this isn't a lightweight image. But docker does heavy caching so it won't use any more space once the server and client dockers are ready. (and it's super easy for me to update.)

If you want to make this easy to launch in the future you can add this to your ~/.bash_aliases file:
Code:
alias fp='sudo docker run --rm -it -v ~/projects/fpdata/config/:/app/config -v ~/projects/fpdata/data/:/app/data -v ~/projects/fpdata/db/:/app/db rbosworth/flightplan:cli '

Then you can run the command from anywhere using "fp"

Windows users should be able to create a similar bat file and add it to your path.

Let me know if anyone is able to test this out?

Last edited by wotan2525; Nov 5, 2018 at 10:52 pm
wotan2525 is offline  
Old Oct 30, 2018, 9:38 am
  #174  
 
Join Date: Jan 2012
Posts: 130
I also (in the process of making my last post) realized that I did something incredibly dumb that was preventing the server/client from working. That is now also functional. This one is a little bit different as it requires two docker containers that need to communicate with each other. This is easy, though (even easier than the command line) by using docker-compose.

Docker-compose is already installed with Windows and MAC versions of docker. For linux, instructions are here.

Use any text editor to create a docker-compose.yml with the following:

Code:
version: '2'
services:

flightplanclient:
image: rbosworth/flightplan:client
container_name: flightplanclient
ports:
- '3000:3000'
flightplanserver:
image: rbosworth/flightplan:server
container_name: flightplanserver
ports:
- '5000:5000'
volumes:
- ~/projects/fpdata/config:/app/config
- ~/projects/fpdata/db:/app/db
- ~/projects/fpdata/data:/app/data
Edit the volumes to reflect your local storage. Your local files should be on the left (don't change those to the right of the colons.)

Save this file, navigate to the directory and type "sudo docker-compose up" -- you may not need sudo -- this will launch both client and server and link them. Then navigate your browser to http://localhost:3000 and you're in!
wotan2525 is offline  
Old Nov 1, 2018, 5:28 pm
  #175  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Just a heads up: I've released a new version of Flightplan today (v0.3). It's a major internal refactoring, to cleanup some cruft and make the overall code base easier to hack on. Full API documentation has been written as well.

From an end-user perspective, everything should be the same as before (that's the hope at least!). There's also a few bug fixes for some websites, so if you were having problems feel free to upgrade and try it out. There are still a number of reported bugs I'm working my way through though (look for those to be fixed in a 0.3.1 release next week).
daft009 and Timothy0927 like this.
jd20 is offline  
Old Nov 7, 2018, 3:33 pm
  #176  
 
Join Date: Jan 2012
Posts: 130
Does anyone else have a problem with the date picker? When I choose a date in the GUI I get this error:

TypeError: searchStore.startDate.toISO is not a function
wotan2525 is offline  
Old Nov 7, 2018, 3:35 pm
  #177  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Yes! I actually just found that bug last night, it was from the v0.2 rewrite I think.

Can you upgrade to 0.3.7, it should have the fix.
jd20 is offline  
Old Nov 7, 2018, 11:09 pm
  #178  
 
Join Date: Jan 2012
Posts: 130
Originally Posted by jd20
Yes! I actually just found that bug last night, it was from the v0.2 rewrite I think.

Can you upgrade to 0.3.7, it should have the fix.
Nope! Doesn't show that the effected file was changed....

TypeError: searchStore.startDate.toISO is not a function
SearchForm.render
src/components/SearchForm.js:86
Code:
  83   <label style={{ gridArea: 'startLabel' }}>Start Date</label>
  84   <DatePicker
  85     name='fromCity'
> 86     selected={moment(searchStore.startDate.toISO())}
  87     minDate={moment()}
  88     maxDate={moment(searchStore.endDate.toISO())}
  89     monthsShown={2}
wotan2525 is offline  
Old Nov 8, 2018, 12:42 am
  #179  
Original Poster
 
Join Date: Jan 2010
Posts: 189
Sorry, seems I didn't actually push the change. I just pushed it now in 0.3.8, can you try again? Also, the fix is to the onchange, just a few lines lower.
jd20 is offline  
Old Nov 8, 2018, 12:05 pm
  #180  
 
Join Date: Jan 2012
Posts: 130
Originally Posted by jd20
Sorry, seems I didn't actually push the change. I just pushed it now in 0.3.8, can you try again? Also, the fix is to the onchange, just a few lines lower.
Still having issues:

Code:
flightplanclient Starting the development server...
flightplanclient
flightplanclient Failed to compile.
flightplanclient
flightplanclient ./src/components/SearchForm.js
flightplanclient Line 91: 'DateTime' is not defined no-undef
flightplanclient Line 102: 'DateTime' is not defined no-undef
wotan2525 is offline  


Contact Us - Manage Preferences - Archive - Advertising - Cookie Policy - Privacy Statement - Terms of Service -

This site is owned, operated, and maintained by MH Sub I, LLC dba Internet Brands. Copyright © 2024 MH Sub I, LLC dba Internet Brands. All rights reserved. Designated trademarks are the property of their respective owners.