Facebook-Page-Crawler icon indicating copy to clipboard operation
Facebook-Page-Crawler copied to clipboard

unrecognized arguments

Open zuyyina17 opened this issue 6 years ago • 6 comments

i got this issue while running the program

C:\WINDOWS\system32>facebook_page_crawler '827852074085717' 'second-app' 'appledaily.tw' '2018-03-08 14:05:00' '2018-03-08 15:00:00'-r yes usage: facebook_page_crawler [-h] [-att] [-r] [-api API_VERSION] [-l LIMIT] [-d] [-p PROCESS_NUM] [-w] app_id app_secret targets since until facebook_page_crawler: error: unrecognized arguments: '2018-03-08 15:00:00'-r yes

zuyyina17 avatar Mar 08 '18 07:03 zuyyina17

Sorry for the really late reply...

Add a space between '2018-03-08 15:00:00' and -r

chenjr0719 avatar May 13 '18 06:05 chenjr0719

also got the problem... only I didn't add optional arguments. C:\Users\lenovo>facebook_page_crawler '447515165673811' 'aa6143ed2177935f4036268 d6e607a88' 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' usage: facebook_page_crawler [-h] [-att] [-r] [-api API_VERSION] [-l LIMIT] [-d] [-p PROCESS_NUM] [-w] app_id app_secret targets since until facebook_page_crawler: error: unrecognized arguments: '2016-09-01 23:59:59'

Hazelnuta avatar Jun 14 '18 11:06 Hazelnuta

it's really weird. I can run my program on different machines with Linux OS. And all the bugs are related to Windows. Maybe I have to take a look about what's the difference when Python runs on Linux and Windows.

BTW, could you provide steps to reproduce this bug?

chenjr0719 avatar Jun 19 '18 03:06 chenjr0719

Basically I follow the instructions to install the module python setup.py develop then I user the command line as the format facebook_page_crawler $app_id $app_secret $targets $since $until as C:\Users\lenovo>facebook_page_crawler '447515165673811' 'aa6143ed2177935f4036268d6e607a88' 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59' without any optional arguments And it keeps reporting the error about the last argument $until I've checked that the libs required have been installed and the py version is correct Don't know why

Hazelnuta avatar Jun 19 '18 03:06 Hazelnuta

I just try to run on Windows 10 with following steps:

  1. Install Python 3.6.5(I didn't install any version of Python on my Windows machine)
  2. Download the zip of this repository and unzip it
  3. Open PowerShell and cd to the unzipped folder
  4. Use venv module to create a clean environment and active the venv
  5. Install dependencies by running pip install -r requirements.txt(maybe not necessary because of next step)
  6. Run python setup.py develop to install dependencies and this crawler
  7. Run command facebook_page_crawler $APP_ID $APP_SECRET 'appledaily.tw' '2016-09-01 00:00:00' '2016-09-01 23:59:59'

The result(check the second execution): default

Which version of Windows and Python are you using?

chenjr0719 avatar Jun 19 '18 16:06 chenjr0719

Use double quotes in cmd

SmartManoj avatar Apr 02 '20 07:04 SmartManoj