• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jbremer / peepdf / 48
25%
master: 25%

Build:
Build:
LAST BUILD BRANCH: object-stream
DEFAULT BRANCH: master
Ran 06 Mar 2020 06:55PM UTC
Jobs 4
Files 12
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
48

Pull #9

travis-ci

web-flow
Avoid TypeError on reference resolution

With the previous change deferring reading of objects from the decoded
stream until references can be resolved, it now runs into
jesparza/peepdf#70. This change provides a different approach in fixing
it to #6 by syncing it with the other locations where the identical code
is in use:

1. Force the numbers extracted by re.findall to int() as before,
   avoiding the TypeError exception:

Traceback (most recent call last):
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/main.py", line 409, in main
    ret, pdf = pdfParser.parse(fileName, options.isForceMode, options.isLooseMode, options.isManualAnalysis)
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 7117, in parse
    ret = body.updateObjects()
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 4291, in updateObjects
    object.resolveReferences()
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 3256, in resolveReferences
    ret = PDFParser.readObject(objectsSection[offset:])
TypeError: slice indices must be integers or None or have an __index__ method

2. Instantiate a new PDFParser object by adding the missing braces,
   avoiding another TypeError because readObject is no class method:

Traceback (most recent call last):
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/main.py", line 409, in main
    ret, pdf = pdfParser.parse(fileName, options.isForceMode, options.isLooseMode, options.isManualAnalysis)
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 7118, in parse
    ret = body.updateObjects()
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 4292, in updateObjects
    object.resolveReferences()
  File "peepdf-venv2/lib64/python2.7/site-packages/peepdf/PDFCore.py", line 3256, in resolveReferences
    ret = PDFParser.readObject(objectsSection[offset:])
TypeError: unbound method readObject() must be called wi... (continued)
Pull Request #9: Fix object stream parsing

25 of 25 new or added lines in 1 file covered. (100.0%)

3187 of 12524 relevant lines covered (25.45%)

0.98 hits per line

Jobs
ID Job ID Ran Files Coverage
1 48.1 06 Mar 2020 06:55PM UTC 0
24.98
Travis Job 48.1
2 48.2 06 Mar 2020 06:55PM UTC 0
24.22
Travis Job 48.2
3 48.3 06 Mar 2020 06:55PM UTC 0
24.22
Travis Job 48.3
4 48.4 06 Mar 2020 06:56PM UTC 0
24.98
Travis Job 48.4
Source Files on build 48
  • Tree
  • List 0
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #48
  • Pull Request #9
  • PR Base - master (#41)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc