GithubHelp home page GithubHelp logo

keyboard_case_and_pcb_gen's People

Contributors

ahtn avatar woovie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

keyboard_case_and_pcb_gen's Issues

Force encoding type with open()

I don't have my git environment set up on my Windows box right now, so forgive me for not simply creating a pull request.

PS C:\Users\jbanasik\candy69\rev2> python.exe C:\Users\jbanasik\pcbgen\plate.py --margin 19 C:\Users\jbanasik\candy69\rev2\candy69-rev2.json
Traceback (most recent call last):
  File "C:\Users\jbanasik\pcbgen\plate.py", line 837, in <module>
    json_file_contents = json_file.read()
  File "C:\Users\jbanasik\AppData\Local\Programs\Python\Python36\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 1502: character maps to <undefined>
PS C:\Users\jbanasik\candy69\rev2> python.exe C:\Users\jbanasik\pcbgen\plate.py --margin 19 C:\Users\jbanasik\candy69\rev2\candy69-rev2.json

The issue here is that open() is using the wrong encoding. I think it's not able to determine the encoding of the .json so it is trying cp1252, which is very, very wrong.

Here's my .patch

--- plate_old.py        2018-04-15 13:11:40.952959500 -0500
+++ plate.py    2018-04-15 13:07:30.107000200 -0500
@@ -833,7 +833,7 @@
                 raise

     json_layout = None
-    with open(args.kle_json_file) as json_file:
+    with open(args.kle_json_file, encoding="utf8") as json_file:
         json_file_contents = json_file.read()
         if file_ext == ".json":
             json_layout = json.loads(json_file_contents)

Requesting adjustment to plate.py

Hello,

I would like to propose the following change:
plate_patch.txt

--- plate.py 2018-04-04 22:29:29.000000000 -0500
+++ plate3.py 2018-04-04 22:29:53.000000000 -0500
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3

In most environments I work in (Redhat, OSX w/ brew) this would ensure that Python 3 is used for execution instead.

Thank you

What python modules need to be installed?

Hi

I'm trying to use this tool but I think I'm missing modules and I'm stuck.

I've installed solid, numpy, kle.

The compiler was complaining about solid.utils being not found? Replace it with solid.util and it stopped complaining. But now I'm getting

File "./plate.py", line 325, in generate
    use(scad_morphology_path)
NameError: name 'use' is not defined

Which I have no idea how to fix. Can somebody help? Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.