ahtn / keyboard_case_and_pcb_gen Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
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)
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
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.