Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception: Code is removed because of the request of LINE corporation #70

Open
miaoski opened this issue Apr 16, 2016 · 4 comments
Open

Comments

@miaoski
Copy link

miaoski commented Apr 16, 2016

$ pip install line   # line-0.8.0
$ ipython
In [1]: from line import LineClient, LineGroup, LineContact
In [2]: client = LineClient('ID', 'PASS')
Enter PinCode '1234' to your mobile phone in 2 minutes
---------------------------------------------------------------------------
Exception                                 Traceback (most recent call last)
<ipython-input-5-a105244eaaac> in <module>()
----> 1 client = LineClient('ID', 'PASS')

/usr/local/lib/python2.7/dist-packages/line/client.pyc in __init__(self, id, password, authToken, is_mac, com_name)
     87 
     88             self.login()
---> 89             self.ready()
     90 
     91         self.revision = self._getLastOpRevision()

/usr/local/lib/python2.7/dist-packages/line/api.pyc in ready(self)
     61         to communicate with LINE server
     62         """
---> 63         raise Exception("Code is removed because of the request of LINE corporation")
     64 
     65     def updateAuthToken(self):
@anusoft
Copy link

anusoft commented Apr 16, 2016

Please read: #8

@pinfort
Copy link

pinfort commented May 6, 2016

please don't ask with it.

@mstachalski
Copy link

So without being able to get the authToken this is now pretty much useless?

@royl2k90
Copy link

royl2k90 commented May 30, 2016

I faced the same error as you, not being able to login via email and password. After a series of commands in mingw32 MSYS Shell, I managed to get my session key and send a message to my contacts via Python Shell.

Solution:

  1. You need Python2. Make sure your PATH environment system variable points to C:\Python27; C:\Python27\Scripts

  2. You need to download Apache Thrift (Python2 is supported, not Python3)

  3. Download the MingGW Installation Manager .exe setup. In the basic setup pane, select only "mingw-development-toolkit" and "msys-base" and apply changes. In the all packages pane, install additional packages "msys-rxvt", "msys-unzip", "msys-wget", "msys-zip" (only the 4 binary ones) and apply changes.

  4. Create shortcut on Desktop. Set the location to C:\MinGW\msys\1.0\msys.bat, and call it MSYS Shell. Right-click on the new shortcut and open its properties. Edit it so it looks like this: Target: C:\MinGW\msys\1.0\msys.bat --rxvt. Start in: C:\MinGW\msys\1.0\bin. Press the OK button.

  5. Now launch MSYS shell and type the following in: (this is to fix the login with email and password error, you can copy the commands here and paste in the shell using "Shift + left mouse click". (You can also use Git Bash instead of MSYS shell for the commands.)

$ pip install line && pip uninstall -y line
$ git clone https://github.com/carpedm20/LINE.git
$ cd LINE/line
$ wget https://gist.github.com/windows98SE/b739038218b6fe4d423f/raw/5f68cf3d9a2a88576b739810a6bd6fcaa0c5e940/api.py.patch --no-check-certificate
$ patch api.py < api.py.patch
$ cd ..
$ python config.py
$ python setup.py install
  1. Try to relogin using your email and password in Python Shell and print out the authentication token. You should be able to see your token and see your profile contacts and send messages to them via Python Shell.

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

No branches or pull requests

5 participants