timuric / Content-generator-sketch-plugin

Sketch app plugin for generating dummy data such as avatars, names, photos, geo data etc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Problem to place images into a vector shape. The content image generator does not work.

Violeta88 opened this issue · comments

Hi, I have the latest version of Sketch and I've installed the plugin but when I run it to place an image into a vector shape, the shape appears empty and the console says the following:

11/10/17 4:19:00,905 p.m. Female (Sketch)[12633]: TypeError: MSImageData.alloc().initWithImage_convertColorSpace is not a function. (In 'MSImageData.alloc().initWithImage_convertColorSpace(image, false)', 'MSImageData.alloc().initWithImage_convertColorSpace' is undefined)
line: 200
sourceURL: /Users/laura/Library/Application Support/com.bohemiancoding.sketch3/Plugins/CG.sketchplugin/Contents/Sketch/Persona/Photos/Female.js
column: 70

I would really appreciate if you can help me! Thanks.

commented

Having the same issue

Not trying to be rude and promote anything, I use couple of plugins for avatars, but you can use my version of the UI Faces plugin in the meantime, at least until Content Generator is fixed. http://uifaces.co/sketch-plugin

@perfectflow thanks for the suggestion! I think this is is a good alternative for the avatar generation and perhaps I can deprecate my avatars plugin and promote yours instead ;)

@Violeta88 unfortunately I don't have sketch licence at the moment (since I haven't been doing design for quite some time) to look into it. But I would try to pick it up next week.

Thank you @timuric, that's really nice, lets stay in touch. UIFaces.co as a whole is still work in progress, but the Sketch plugin is finished and works using its API.

I'm having the same issue with the content generator not updating the selected vector paths with the images. Using Sketch v47 (45396).

@perfectflow - Tried your UI Faces plugin, but it completely crashes Sketch. I can't report the issue on your repo because you have Issues turned off. On the latest version of Sketch v47 (45396).

@axertion I've enabled Issues, please report it. Also will try to find out what's happening on v47.

I guess I should have looked in the issues first, but I made a pull request. #171

@cmkilger It does work - again! Thanks a lot :)

*Edit: after a few Times using it, it made Sketch Crash.

Just submitted a Pull Request that should fix this. I tweaked the version installed on my system and it seems to work.

@timuric Don't Sketch give licenses to people who write popular plugins? This is a good one.

That's says Console after i'm trying to import an image from Flickr with Content Generator Plugin in Sketch 47.1. Another plugin of Sketch Unsplash It does neither insert any images =( :

default 14:36:37.062497 +0300 Sketch 0x600001062840 opened /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak: 22320 bytes
default 14:36:37.062548 +0300 Sketch 0x600001062840 closed /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak
default 14:36:37.063434 +0300 Sketch loading /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak
default 14:36:44.497783 +0300 Sketch Ignoring autorelease call on <NSTextField: 0x7fcbfd2df090>
default 14:36:45.728736 +0300 Sketch dog,corgi
default 14:36:45.731063 +0300 Sketch UNIX error exception: 17
default 14:36:45.731223 +0300 Sketch UNIX error exception: 17
default 14:36:45.731324 +0300 Sketch 0x610001469d00 opened /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak: 22320 bytes
default 14:36:45.731367 +0300 Sketch 0x610001469d00 closed /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak
default 14:36:45.732266 +0300 Sketch loading /Users/eLDeus/Library/Application Support/Adobe/AIR/ELS/AdobeMuse/PrivateEncryptedDatak
default 14:36:45.734214 +0300 Sketch 0x618001273bc0 opened /Users/eLDeus/Library/Keychains/login.keychain-db: 71508 bytes
default 14:36:45.734278 +0300 Sketch 0x618001273bc0 closed /Users/eLDeus/Library/Keychains/login.keychain-db
default 14:36:45.735190 +0300 Sketch loading /Users/eLDeus/Library/Keychains/login.keychain-db
default 14:36:45.737083 +0300 Sketch 0x608000e64a80 opened /Library/Keychains/System.keychain: 53460 bytes
default 14:36:45.737136 +0300 Sketch 0x608000e64a80 closed /Library/Keychains/System.keychain
default 14:36:45.738090 +0300 Sketch loading /Library/Keychains/System.keychain
default 14:36:45.740885 +0300 Sketch TIC TCP Conn Start [15:0x618000193e80]
default 14:36:45.805139 +0300 Sketch TIC TCP Conn Event [15:0x618000193e80]: 1 Err(0)
default 14:36:45.805179 +0300 Sketch TIC TCP Conn Connected [15:0x618000193e80]: Err(0)
default 14:36:45.805281 +0300 Sketch TIC Enabling TLS [15:0x618000193e80]
default 14:36:45.850353 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 2, Pending(0)
default 14:36:45.852719 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 11, Pending(0)
default 14:36:45.853107 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 22, Pending(0)
default 14:36:45.853258 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 12, Pending(0)
default 14:36:45.853300 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 14, Pending(0)
default 14:36:45.876007 +0300 Sketch TIC TLS Trust Result [15:0x618000193e80]: 0
default 14:36:45.922788 +0300 Sketch TIC TLS Event [15:0x618000193e80]: 20, Pending(0)
default 14:36:45.923090 +0300 Sketch TIC TCP Conn Event [15:0x618000193e80]: 8 Err(0)
default 14:36:45.923106 +0300 Sketch TIC TLS Handshake Complete [15:0x618000193e80]
default 14:36:46.183100 +0300 Sketch Exception: TypeError: MSImageData.alloc().initWithImage_convertColorSpace is not a function. (In 'MSImageData.alloc().initWithImage_convertColorSpace(newImage, false)', 'MSImageData.alloc().initWithImage_convertColorSpace' is undefined)
default 14:36:46.183211 +0300 Sketch TypeError: MSImageData.alloc().initWithImage_convertColorSpace is not a function. (In 'MSImageData.alloc().initWithImage_convertColorSpace(newImage, false)', 'MSImageData.alloc().initWithImage_convertColorSpace' is undefined)
line: 60
sourceURL: /Users/eLDeus/Library/Application Support/com.bohemiancoding.sketch3/Plugins/CG.sketchplugin/Contents/Sketch/Images/Flickr Keywords.js
column: 76

2017-10-23 14 43 53

Here a fixed version of the plugin.
CG.sketchplugin.zip

@equinusocio Many thanks, fixed version works perfectly!