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

TypeError: Cannot read property 'startsWith' of undefined at built/Skin.js:11 #114

Open
eMPee584 opened this issue Oct 12, 2021 · 5 comments

Comments

@eMPee584
Copy link

When trying to generate a schematic from a skidl definition I run into this error:

/usr/local/lib/node_modules/netlistsvg/built/Skin.js:11
                return e[1]['s:pid'].startsWith(prefix);
                                     ^

TypeError: Cannot read property 'startsWith' of undefined
    at /usr/local/lib/node_modules/netlistsvg/built/Skin.js:11:38
    at arrayFilter (/usr/local/lib/node_modules/netlistsvg/node_modules/lodash/lodash.js:596:11)
    at Function.filter (/usr/local/lib/node_modules/netlistsvg/node_modules/lodash/lodash.js:9241:14)
    at Object.getPortsWithPrefix (/usr/local/lib/node_modules/netlistsvg/built/Skin.js:9:23)
    at Cell.buildElkChild (/usr/local/lib/node_modules/netlistsvg/built/Cell.js:213:36)
    at /usr/local/lib/node_modules/netlistsvg/built/elkGraph.js:12:18
    at Array.map (<anonymous>)
    at Object.buildElkGraph (/usr/local/lib/node_modules/netlistsvg/built/elkGraph.js:11:33)
    at Object.render (/usr/local/lib/node_modules/netlistsvg/built/index.js:43:29)
    at render (/usr/local/lib/node_modules/netlistsvg/bin/netlistsvg.js:23:9)
    at /usr/local/lib/node_modules/netlistsvg/bin/netlistsvg.js:57:9
    at /usr/local/lib/node_modules/netlistsvg/bin/netlistsvg.js:41:17
    at FSReqCallback.readFileAfterClose [as oncomplete] (node:internal/fs/read_file_context:69:3)
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)

This in an ubuntu-based jupyterlab docker image with current pyspice, skidl and netlist installed manually.. any ideas what could be the problem?

@nobodywasishere
Copy link
Contributor

Do you have a reproducible input json?

@eMPee584
Copy link
Author

Mhh. How would I get that?

I use skidl's generate_svg()..

@eMPee584
Copy link
Author

.. also, generate_netlist() throws a

ERROR: No footprint for GND/#PWR1.
ERROR: No footprint for VCC/#PWR2.
ERROR: No footprint for Q_PNP_CBE/Q1.
ERROR: No footprint for Q_PNP_CBE/Q2.
ERROR: No footprint for R/R1.
ERROR: No footprint for R/R2.
ERROR: No footprint for R/R3.
ERROR: No footprint for R/R4.
ERROR: No footprint for R/R5.

0 warnings found during netlist generation.
9 errors found during netlist generation.


@nobodywasishere
Copy link
Contributor

Ah I see what you mean. Can you make sure you're using the latest version of netlistsvg from github? This may be related to this issue devbisme/skidl#118

@eMPee584
Copy link
Author

Mhh thanks ok I tried npm-installing the git version and now I get
image

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