Missing file - TypeError: t.replace is not a function

One of the images is not added to the library.

λ ./photostructure info f:/SynologyDrive/Photos/0001/0160.jpg
Failed  TypeError: t.replace is not a function
    at k (C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:507519)
    at Object.t.keywordTagFiles (C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:508278)
    at async Object.t.thenMap (C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:467127)
    at async Object.g [as tagAsset] (C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:502293)
    at async t.info (C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:481945)
    at async Promise.all (index 0)
    at async C:\Users\mnaou\photostructure-for-servers\bin\info.js:3:542529
2021-03-12T00:46:30.398Z info-8520 error PowerShell observeBatchCluster.endError() { stack:
   [ 'Error: Error: end() called before task completed ({"gracefully":true,"source":"BatchCluster.end()"})(start errors/min: 23.63)',
     '    at BatchCluster.emitStartError (C:\\Users\\mnaou\\photostructure-for-servers\\node_modules\\batch-cluster\\dist\\BatchCluster.js:314:43)',
     '    at Object.onStartError (C:\\Users\\mnaou\\photostructure-for-servers\\node_modules\\batch-cluster\\dist\\BatchCluster.js:179:57)',
     '    at C:\\Users\\mnaou\\photostructure-for-servers\\node_modules\\batch-cluster\\dist\\BatchProcess.js:237:34' ] }

Thanks for reporting this! It’s fixed in v1.0.0-alpha.0 (which I hope to release tomorrow).

Nope, still there

$ ./photostructure --version
1.0.0-alpha.1
$ ./photostructure info F:/SynologyDrive/Photos/0001/0160.jpg
Failed  TypeError: d.replace is not a function
    at f0 (C:\Users\curators\KeywordTagger.ts:199:20)
    at yC (C:\Users\curators\KeywordTagger.ts:269:5)
    at p0 (C:\Users\curators\KeywordTagger.ts:316:10)
    at x (C:\fe\Promise.ts:12:15)
    at b0 (C:\Users\curators\AssetTagger.ts:100:3)
    at Uf (C:\Users\InfoImpl.ts:60:21)
    at async Promise.all (index 0)
    at E2 (C:\Users\info.ts:218:12)
1 Like

Thanks for the example image! I was able to reproduce the problem easily.

Something upstream parsed one of the keyword array elements as a number, not a string. This issue should be fixed in -alpha.2:

$ node dist/library/info.js ~/Desktop/kw.jpg 
[
  {
    _PhotoStructureVersion: '1.0.0-alpha.2',
...
      [
        '!My Keywords',
        'People',
        'Украина',
        'Киев',
        '!Школа',
        '50',
        'Одноклассники',
        'Алина Рубанова'
      ],
...

Thanks for another easy-to-follow bug report: :star: :star: :star: :star: :star:

Great. I guess, you didn’t push it to GitHub yet? The latest version I see there is still 1.0.0-alpha.1

No, I’m getting macos and windows builds propped up before I push alpha.2. If I don’t get them done this afternoon, I’ll make them wait until alpha.3.

1 Like

This was fixed in alpha.3, and I just verified that it still works in beta.3:

$ ./photostructure info ~/Downloads/0160.jpg 
[
  {
    _PhotoStructureVersion: '1.0.0-beta.3',
    capturedAt: {
      date: ExifDateTime {
        year: 1994,
        month: 9,
        day: 1,
        hour: 12,
        minute: 0,
        second: 0,
        millisecond: 0,
        tzoffsetMinutes: 180,
        rawValue: '1994:09:01 12:00:00',
        zoneName: 'Europe/Kiev'
      },
      localCentiseconds: 1994090112000000,
      offset: 180,
      src: 'tags:DateTimeOriginal'
    },
    dimensions: { width: 1058, height: 748 },
    errors: [],
    filters: {
      accepted: [
        'exifExtFilter',
        'fileSizeFilter',
        'notHiddenCheap',
        'noMediaFilter',
        'hasMimeType',
        'supportedMimeTypeFilter',
        'notRejected',
        'minDimensionsFilter',
        'minVideoDurationFilter'
      ],
      rejected: []
    },
...