rinkstiekema / table-structures

87 stars 30 forks source link

PDFlatex not found while running as per instruction #11

Closed Atul997 closed 4 years ago

Atul997 commented 4 years ago

I am using google colab to run the given code and followed the ReadMe while running the command !python tablegen.py --location="/content/drive/My Drive/pdftables/"

I got the following error-

  multiprocessing.pool.RemoteTraceback: 
  """
 Traceback (most recent call last):
 File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
      result = (True, func(*args, **kwds))
 File "/usr/lib/python3.6/multiprocessing/pool.py", line 47, in starmapstar
     return list(itertools.starmap(args[0], args[1]))
 File "tablegen.py", line 67, in generate
     subprocess.call('pdflatex -quiet -output-directory '+os.path.join(pdf_path, path[0])+' '+os.path.join(tex_path, path[0], 
     str(idx)+'-'+str(i)) + '.tex')
  File "/usr/lib/python3.6/subprocess.py", line 287, in call
     with Popen(*popenargs, **kwargs) as p:
  File "/usr/lib/python3.6/subprocess.py", line 729, in __init__
      restore_signals, start_new_session)
  File "/usr/lib/python3.6/subprocess.py", line 1364, in _execute_child
     raise child_exception_type(errno_num, err_msg, err_filename)
  FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex -quiet -output-directory /content/drive/My 
     Drive/pdftables/pdf/val /content/drive/My Drive/pdftables/tex/val/0-0.tex': 'pdflatex -quiet -output-directory /content/drive/My 
    Drive/pdftables/pdf/val /content/drive/My Drive/pdftables/tex/val/0-0.tex'
   """

   The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
    File "tablegen.py", line 131, in <module>
     pool.starmap(partial(generate, paths=paths, csv_path=csv_path, png_path=png_path, tex_path=tex_path, 
     pdf_path=pdf_path, aux_path=aux_path, args=args), list(enumerate(types)))
     File "/usr/lib/python3.6/multiprocessing/pool.py", line 274, in starmap
           return self._map_async(func, iterable, starmapstar, chunksize).get()
     File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get
       raise self._value
      FileNotFoundError: [Errno 2] No such file or directory: 'pdflatex -quiet -output-directory /content/drive/My 
      Drive/pdftables/pdf/val /content/drive/My Drive/pdftables/tex/val/0-0.tex': 'pdflatex -quiet -output-directory /content/drive/My 
      Drive/pdftables/pdf/val /content/drive/My Drive/pdftables/tex/val/0-0.tex'

Can you help me out in this?

rinkstiekema commented 4 years ago

Did you install pdflatex already? Source for installation can be found here: http://www.math.rug.nl/~trentelman/jacob/pdflatex/pdflatex.html

If you are on a Windows system, make sure to add pdflatex to your path variables. Let me know if this helps!

Atul997 commented 4 years ago

I am on Ubuntu machine but using Google colab

On Tue, Jun 30, 2020, 7:49 PM Rink Stiekema notifications@github.com wrote:

Did you install pdflatex already? Source for installation can be found here: http://www.math.rug.nl/~trentelman/jacob/pdflatex/pdflatex.html

If you are on a Windows system, make sure to add pdflatex to your path variables. Let me know if this helps!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rinkstiekema/PDF-Table-Structure-Recognition-using-deep-learning/issues/11#issuecomment-651822706, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEVOZ2X3YD42BST3CKQU4Z3RZHYATANCNFSM4OMGIFKA .

rinkstiekema commented 4 years ago

I'm afraid it is not possible to use the repository on Google Colab as it depends on some CLI applications (such as pdflatex).