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

Error when importing PSD with a text layer from Photopea #281

Open
velara3 opened this issue Mar 4, 2023 · 2 comments
Open

Error when importing PSD with a text layer from Photopea #281

velara3 opened this issue Mar 4, 2023 · 2 comments

Comments

@velara3
Copy link

velara3 commented Mar 4, 2023

I'm getting an error when parsing a PSD that has a text layer saved from Photopea.

Github is not letting me attach a PSD.

Steps to reproduce:

  1. Open https://www.photopea.com/
  2. Create a A4 document
  3. Add a text layer to it
  4. Save as PSD
  5. Parse using psd.tree().export();

The error:

[TypeError: Cannot set properties of undefined (setting 'undefined')
  at updateNode (/node_modules/parse-engine-data/lib/parseEngineData.js:196:35)
  at Object.parse (/node_modules/parse-engine-data/lib/parseEngineData.js:80:13)
  at typeMatch (/node_modules/parse-engine-data/lib/parseEngineData.js:48:22)
  at /node_modules/parse-engine-data/lib/parseEngineData.js:38:9
  at Array.map (<anonymous>:null:null)
  at textReg (/node_modules/parse-engine-data/lib/parseEngineData.js:37:13)
  at paresr (/node_modules/parse-engine-data/lib/parseEngineData.js:22:5)
  at TextElements.module.exports.TextElements.parse (/node_modules/psd/lib/psd/layer_info/typetool.coffee:37:19)
  at LazyExecute.module.exports.LazyExecute.load (/node_modules/psd/lib/psd/lazy_execute.coffee:83:23)
  at LazyExecute.get (/node_modules/psd/lib/psd/lazy_execute.coffee:66:12)
  at Layer.module.exports.Layer.export [as export] (/node_modules/psd/lib/psd/nodes/layer.coffee:13:29)
  at /node_modules/psd/lib/psd/nodes/root.coffee:33:37
  at Array.map (<anonymous>:null:null)
  at Root.module.exports.Root.export [as export] (/node_modules/psd/lib/psd/nodes/root.coffee:33:26)

If I remove the text layer in Photopea and resave to a new PSD, PSDjs parses and there is no error.

@nikhilrizal
Copy link

#122 you cant change text using this lib !

@velara3
Copy link
Author

velara3 commented Mar 4, 2023

Hi I'm not editing the text with this library.

If I remove the text layer in Photopea and resave to a new PSD. Then when PSDjs parses there is no error ...meaning that the library does not like the Text layer.

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