Lightroom Classic 7.5: Sync Yields "bad argument #1 to '?' (number expected, got nil)" Error Messages

  • 11
  • Problem
  • Updated 7 months ago
  • Solved
  • (Edited)
Within the last several weeks, I have started to get errors when trying to sync from LR Classic.  Some problem images have been successfully synced for months, and others are new.  The problems seemed to begin when I removed some photos from All Photos in LR CC.  In the upper left corner, I see "Syncing 3 photos", though the number changes.  In Preferences, Sync Activity, the images have had the message "bad argument #1 to '?' (number expected, got nil)", and the Remove from All Synced Photos option doesn't seem to do anything.
Is there some way I can reset the sync environment?  Would that be a solution? Thanks.
Photo of Jk10003

Jk10003

  • 15 Posts
  • 0 Reply Likes

Posted 9 months ago

  • 11
Photo of Akshay Mathur

Akshay Mathur, Employee

  • 33 Posts
  • 12 Reply Likes
Official Response
Classic -> Preferences -> Lightroom Sync -> Press alt/option -> Rebuild Sync data . Lightroom will restart and syncing will reset and there will be no impact on your images.
Photo of HannesKa

HannesKa

  • 38 Posts
  • 4 Reply Likes
Akshay, do you agree that ther is a bug in LR?

I had the same problem and solved the issue:
i searched/filtered all photos in the sync-collection which have no "date"-entry (but only in a "hidden" field that is used for one filter).
in the right panel in lr-classic-cc there is a field "capture time" that is filled, you can't see the empty field in the right metadata panel in LR.

i filled the field with a date/time, then the photos were synced

the workaround is from an other user (tpnotes) who filtered and deleted this photos from the synced-collection.

see here:
https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-5-sync-yields-bad-argument-1-to-...
Photo of Jk10003

Jk10003

  • 15 Posts
  • 0 Reply Likes
Thank you very much!  Somehow, my syncing has resolved itself, but I will keep this for the future.
Photo of Christophe Gindraux

Christophe Gindraux

  • 2 Posts
  • 1 Reply Like
I have the same problem, tried the Rebuild Sync data and it didn't solve the problem.
Photo of Jk10003

Jk10003

  • 15 Posts
  • 0 Reply Likes
I think I tracked down my problem by identifying the problem photos by looking in the sync errors in preferences, and then making sure that these were removed from All Synced Photographs.  It did not clear immediately, but happened a while later.
Photo of tpnotes

tpnotes

  • 57 Posts
  • 7 Reply Likes
I did the same and it worked for me too. In my case the problematic photos do not have a date entry in their exif/iptc metadata. I filtered for all photos with date=unknown and removed them from all synced collections.
Photo of HannesKa

HannesKa

  • 38 Posts
  • 4 Reply Likes
Thanks, i also tried this workaround for 64 photos, now sync is completed!!!
Photo of Christian Hirsch

Christian Hirsch

  • 4 Posts
  • 0 Reply Likes
Same issue here. LR Classis 7.5 stocks in syncing.Rebuild didn't help... :-/
Photo of Curtis James

Curtis James

  • 5 Posts
  • 1 Reply Like
I'm currently in Adobe support hell - keep being told my case has been escalated, that I will be called back within 48 hours, over a week later, no-one 'senior' has called.
Photo of Rikk Flohr

Rikk Flohr, Official Rep

  • 4984 Posts
  • 1017 Reply Likes
Curtis, I responded in your thread. 
Photo of Steven Chesney

Steven Chesney

  • 5 Posts
  • 1 Reply Like
I am having the same problem. 

Lightroom classic 7,5 is stuck "Syncing 25 photos" and the Edit Preferences/Lightroom Sync shows the error "bad argument #1 to '?' (number expected, got nil)"  on a photo.  that dialog claims no sync is pending but there is about a 21 photo difference between the Classic "All Synced Photographs" collection and the count for "All Photos" on Lightroom Web. 

Rebuilding sync data from the preferences dialog does nothing.


Photo of HannesKa

HannesKa

  • 38 Posts
  • 4 Reply Likes
I had the same problem and solved the issue:
i searched/filtered all photos in the sync-collection which have no "date"-entry in the exif/iptc metadata-field
i filled the field with a date/time, then the photos were synced

the workaround is from an other user (tpnotes) who filtered and deleted this photos from the synced-collection.

see here:
https://feedback.photoshop.com/photoshop_family/topics/lr-classic-7-5-sync-yields-bad-argument-1-to-...


Photo of Steven Chesney

Steven Chesney

  • 5 Posts
  • 1 Reply Like
That may be it, the photos are scans made with an Epson 4870 and imported into Photoshop Elements originally, so dates may be wonky.

But I can't figure out how it applies specifically.  When I locate the image with the "bad argument" error, Metadata->Edit Capture Time shows a valid date time as original.  EXIF "DateTime" in the rigtht hand panel shows the same date/time."Metadata Date" is valid.  IPTC "Date Created" is blank, but that's also true of a lot of photos originating from a digital camera.

Despite all those dates, the photo does show up when I apply the Library module Metadata "Date" filter with value "Unknown".   Is that keying off a hidden field?  I just don't understand what that filter is looking at.
Photo of Steven Chesney

Steven Chesney

  • 5 Posts
  • 1 Reply Like
OK, with the help of some old John Ellis' posts, I learned that the Library "Date" filter (and probably Sort) key off EXIF "Date Time Original" which was blank on most of my scans.    I used Metadata->Set Capture Date to re-set the capture date to the same value and the side effect of that was to set "Date Time Original" to the value of Capture Date. 
That's good for sort orders in library, and will help me organize some collections.   But it didn't do anything for the total number of "stuck syncing" photos.   And the photos with the "bad argument" error still have the error even though "Date Time Original" is now a valid number and not nil.  Sigh.
Photo of Steven Chesney

Steven Chesney

  • 5 Posts
  • 1 Reply Like
It just gets more weird.  I'm trying to handle this methodically.

I started by changing all my sync'd collections to non-synced and removing all photos from the "All Synced Photographs" collection.   I verified this by going to Lightroom Web and seeing no synced colllections as well as a zero count in "All Photos".

Then I slowly started syncing the collections.  No errors, and the count on LR Web matched the count in "All Synced Collections".   Then I synced a collection that contained 12 photos produced with a scanner from old prints and negatives.  That resulted in 5 photos synced (all JPGs) and 7 TIFs with "Sync Pending".   Even after a day, no change.  

What is strange is that the sync status displays within LR are inconsistent.  The upper left hand banner area says "Syncing 7 photos", but the Edit->Preferences->Lightroom Sync says "0 Uploading, 0 Downloading, 0 Pending".  The sync icon in the photos upper right hand corners each say "Sync with Lightroom CC Pending". 

I've tried the "Rebuild Sync Data" button with and without removing the sync file.  No change. 

Problematic sync problems (both silently stuck and with "bad argument" errors) have been scans in TIFF format from an older Epson flatbed scanner imported originally into Photoshop Elements 8.   But most such photos sync fine.  

Llightroom Classic up to date (7,.5) with the Photography Plan subscription.
(Edited)
Photo of HannesKa

HannesKa

  • 38 Posts
  • 4 Reply Likes
This reply was created from a merged topic originally titled Lightroom Classic: sync problem: bad argument #1 to '?' (number expected, got nil....

i changed flags in about 300 pictures in lightroom-mobile-android-app to reject.
then i deleted this 300 pictures in lightroom-mobile-android-app.
At the next start of lightroom-classic-cc the sync stopped with this error message:
bad argument #1 to '?' (number expected, got nil).

i tried this: Classic -> Preferences -> Lightroom Sync -> Press alt/option -> Rebuild Sync data -> Lightroom restart -> sync activate -> problem not solved!

I changed the flags

Windows 10, lateste lr-classic-cc
Photo of Reetesh Mukul

Reetesh Mukul, Employee

  • 37 Posts
  • 6 Reply Likes
@HannesKa -- we will try reproducing this issue. We will look into it.
Photo of dmeephd

dmeephd

  • 300 Posts
  • 73 Reply Likes
I occasionally, but not always, receive the same error message after LR finishes writing xmp data to files after an import and keywording.
Photo of dmeephd

dmeephd

  • 300 Posts
  • 73 Reply Likes
Discovered yesterday this same error message when deleting images from disk and removing from catalog.  The message appears after LR performs the deletion, but then it fails to remove from catalog.  I have to run the command again, this time selecting only remove.

Sounds like LR is performing some sort of check as to whether it has performed the command and receives a false negative and then stops.  However, in all cases, it actually did the work.
Photo of Ninjaneer

Ninjaneer

  • 33 Posts
  • 4 Reply Likes
I did this and the errors went away, but there is a delay where everything is stuck on PENDING. Does that normally happen ? 

As of this post, waited around 5 minutes and everything is still stuck on pending
Photo of Steven Chesney

Steven Chesney

  • 5 Posts
  • 1 Reply Like
I get that too.  I have one stuck and it's been weeks.