Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

unrecognized arguments #3

Open
zuyyina17 opened this issue Mar 8, 2018 · 6 comments
Open

unrecognized arguments #3

zuyyina17 opened this issue Mar 8, 2018 · 6 comments

Comments

@zuyyina17
Copy link

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 zuyyina17 changed the title ISSUE unrecognized arguments Mar 8, 2018
@chenjr0719
Copy link
Owner

Sorry for the really late reply...

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

@Hazelnuta
Copy link

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'

@chenjr0719
Copy link
Owner

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?

@Hazelnuta
Copy link

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

@chenjr0719
Copy link
Owner

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?

@SmartManoj
Copy link

Use double quotes in cmd

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants