LINE icon indicating copy to clipboard operation
LINE copied to clipboard

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

Open miaoski opened this issue 8 years ago • 4 comments

$ 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):

miaoski avatar Apr 16 '16 04:04 miaoski

Please read: https://github.com/carpedm20/LINE/issues/8

anusoft avatar Apr 16 '16 04:04 anusoft

please don't ask with it.

pinfort avatar May 06 '16 14:05 pinfort

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

mstachalski avatar May 23 '16 23:05 mstachalski

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.

royl2k90 avatar May 30 '16 09:05 royl2k90