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

Not Python 3 compatible #1

Open
l0b0 opened this issue Oct 4, 2014 · 1 comment
Open

Not Python 3 compatible #1

l0b0 opened this issue Oct 4, 2014 · 1 comment
Assignees

Comments

@l0b0
Copy link

l0b0 commented Oct 4, 2014

$ python --version
Python 3.4.1
$ ./build.sh 
Processing ./py/iso261-extended.py -l ./license-header.scad ./src/csv/iso261-extended.csv ./build/scad/iso261-extended.scad
Traceback (most recent call last):
  File "./py/iso261-extended.py", line 73, in <module>
    process(datain, dataout, args.json, args.decimals, args.license)
  File "./py/iso261-extended.py", line 48, in process
    iso261.process_data(data, dataout, produce_json, precision, license)
  File "/home/user/dev/nuts-n-bolts/py/iso261.py", line 110, in process_data
    screw.process_spec(k, s, dataout, decimals)
  File "/home/user/dev/nuts-n-bolts/py/screw.py", line 52, in process_spec
    ]) for pp in [poly[i:i+items_per_line] for i in xrange(0, len(poly), items_per_line)]
NameError: name 'xrange' is not defined
Processing ./py/iso261.py -l ./license-header.scad ./src/json/iso261.json ./build/scad/iso261.scad
Traceback (most recent call last):
  File "./py/iso261.py", line 134, in <module>
    process(datain, dataout, args.json, args.decimals, args.license)
  File "./py/iso261.py", line 18, in process
    process_data(data, dataout, produce_json, precision, license)
  File "./py/iso261.py", line 110, in process_data
    screw.process_spec(k, s, dataout, decimals)
  File "/home/user/dev/nuts-n-bolts/py/screw.py", line 52, in process_spec
    ]) for pp in [poly[i:i+items_per_line] for i in xrange(0, len(poly), items_per_line)]
NameError: name 'xrange' is not defined
Processing ./py/screw.py -i ../scad -l ./license-header.scad ./test/json/test.json ./build/test/test.scad
Traceback (most recent call last):
  File "./py/screw.py", line 98, in <module>
    process(datain, dataout, args.include, args.license)
  File "./py/screw.py", line 75, in process
    process_specs(specs, dataout, include, license)
  File "./py/screw.py", line 69, in process_specs
    for k, v in specs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
@brunogirin brunogirin self-assigned this Oct 23, 2014
@brunogirin
Copy link
Owner

Indeed. This was built as a python 2 script. I shall update it to work with python 3.

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

2 participants