> On 27 Jun 2017, at 18:05, Tim Mackinnon <[email protected]> wrote:
>
> Hi - I am trying to run a pharo image in lambda (as an experiment) - however
> I get an error from Pharo about not being able to write to the changes file?
>
> As I am just evaluating some code - I’m not really coding, so don’t need a
> changes file - is there a command line option to not require it?
That is really strange, it should just work (it does for me using the zero
config scripts).
I would try to use absolute (resolved) paths as much as possible.
> Also, am I running pharo the most efficient way - I’m using eval on the
> command line and referencing a class with a class method - but is this the
> best way?
Yes, that is ok.
> Thanks,
>
> Tim
>
> "errorMessage": "Command failed: ./pharo Pharo.image eval \"Lambda
> processJSON:
> '{\"key3\":\"value3\",\"key2\":\"value2\",\"key1\":\"value1\"}'\"\n'Pharo
> cannot write to the changes file named /var/task/Pharo.changes.\n\nPlease
> check that you have write permission for this file.\n\nYou won''t be able to
> save this image correctly until you fix this.'\n\u001b[31mError: Can't find
> the requested
> origin\n\u001b[0mUnixResolver(PlatformResolver)>>cantFindOriginError\n[ self
> cantFindOriginError ] in
> UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed: in Block: [
> self cantFindOriginError
> ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:\nUnixResolver>>home\n[
> self home / '.config' ] in UnixResolver>>preferences in Block: [ self home /
> '.config'
> ]\nUnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:\nUnixResolver>>preferences\nUnixResolver(FileSystemResolver)>>resolve:\nSystemResolver(FileSystemResolver)>>unknownOrigin:\nSystemResolver(FileSystemResolver)>>resolve:\nInteractiveResolver>>unknownOrigin:\n[
> self unknownOrigin: origin ] in InteractiveResolver>>resolve: in Block: [
> self unknownOrigin: origin
> ]\nIdentityDictionary(Dictionary)>>at:ifAbsent:\nInteractiveResolver>>resolve:\nFileLocator>>resolve\nFileLocator(AbstractFileReference)>>exists\nGlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>shouldCallPreviousPersistence\nGlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>ensure:\nGlobalIdentifier>>ensure\nGlobalIdentifier
> class>>initializeUniqueInstance\nGlobalIdentifier
> class>>uniqueInstance\nSystemSettingsPersistence
> class>>resumeSystemSettings\n[ :persistence | persistence
> resumeSystemSettings ] in PharoCommandLineHandler>>runPreferences in Block: [
> :persistence | persistence resumeSystemSettings
> ...etc...\nBlockClosure>>cull:\nSystemDictionary(Dictionary)>>at:ifPresent:\nSmalltalkImage>>at:ifPresent:\nPharoCommandLineHandler>>runPreferences\nPharoCommandLineHandler>>activate\nPharoCommandLineHandler
> class(CommandLineHandler class)>>activateWith:\n\u001b[0m",
> "errorType": "Error",
> "stackTrace": [
> "'Pharo cannot write to the changes file named /var/task/Pharo.changes.",
> "",
> "Please check that you have write permission for this file.",
> "",
> "You won''t be able to save this image correctly until you fix this.'",
> "\u001b[31mError: Can't find the requested origin",
> "\u001b[0mUnixResolver(PlatformResolver)>>cantFindOriginError",
> "[ self cantFindOriginError ] in
> UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed: in Block: [
> self cantFindOriginError ]",
> "UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:",
> "UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:",
> "UnixResolver>>home",
> "[ self home / '.config' ] in UnixResolver>>preferences in Block: [ self
> home / '.config' ]",
> "UnixResolver(PlatformResolver)>>directoryFromEnvVariableNamed:or:",
> "UnixResolver>>preferences",
> "UnixResolver(FileSystemResolver)>>resolve:",
> "SystemResolver(FileSystemResolver)>>unknownOrigin:",
> "SystemResolver(FileSystemResolver)>>resolve:",
> "InteractiveResolver>>unknownOrigin:",
> "[ self unknownOrigin: origin ] in InteractiveResolver>>resolve: in
> Block: [ self unknownOrigin: origin ]",
> "IdentityDictionary(Dictionary)>>at:ifAbsent:",
> "InteractiveResolver>>resolve:",
> "FileLocator>>resolve",
> "FileLocator(AbstractFileReference)>>exists",
>
> "GlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>shouldCallPreviousPersistence",
> "GlobalIdentifierStonPersistence(GlobalIdentifierPersistence)>>ensure:",
> "GlobalIdentifier>>ensure",
> "GlobalIdentifier class>>initializeUniqueInstance",
> "GlobalIdentifier class>>uniqueInstance",
> "SystemSettingsPersistence class>>resumeSystemSettings",
> "[ :persistence | persistence resumeSystemSettings ] in
> PharoCommandLineHandler>>runPreferences in Block: [ :persistence |
> persistence resumeSystemSettings ...etc...",
> "BlockClosure>>cull:",
> "SystemDictionary(Dictionary)>>at:ifPresent:",
> "SmalltalkImage>>at:ifPresent:",
> "PharoCommandLineHandler>>runPreferences",
> "PharoCommandLineHandler>>activate",
> "PharoCommandLineHandler class(CommandLineHandler class)>>activateWith:",
> "\u001b[0m",
> "ChildProcess.exithandler (child_process.js:204:12)",
> "emitTwo (events.js:106:13)",
> "ChildProcess.emit (events.js:191:7)",
> "maybeClose (internal/child_process.js:886:16)",
> "Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)"
> ]
> }
>
>