Skip to main content
Adobe Photoshop Family

15 Messages

 • 

336 Points

Fri, Aug 24, 2018 4:04 PM

Solved

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

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.

Responses

Official Solution

33 Messages

 • 

698 Points

2 years ago

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.

42 Messages

 • 

682 Points

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-...

15 Messages

 • 

336 Points

2 years ago

Thank you very much!  Somehow, my syncing has resolved itself, but I will keep this for the future.

2 Messages

 • 

90 Points

2 years ago

I have the same problem, tried the Rebuild Sync data and it didn't solve the problem.

15 Messages

 • 

336 Points

2 years ago

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.

85 Messages

 • 

1.7K Points

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.

42 Messages

 • 

682 Points

Thanks, i also tried this workaround for 64 photos, now sync is completed!!!

42 Messages

 • 

682 Points

Thanks, i also tried this workaround for 64 photos, now sync is completed!!!

4 Messages

 • 

146 Points

2 years ago

Same issue here. LR Classis 7.5 stocks in syncing.Rebuild didn't help... :-/

5 Messages

 • 

200 Points

2 years ago

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.

Adobe Administrator

 • 

8.1K Messages

 • 

117.2K Points

Curtis, I responded in your thread. 
 

Adobe Photography Products

Quality Engineering - Customer Advocacy

5 Messages

 • 

138 Points

2 years ago

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.


42 Messages

 • 

682 Points

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-...


5 Messages

 • 

138 Points

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.

5 Messages

 • 

138 Points

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.

5 Messages

 • 

138 Points

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.

42 Messages

 • 

682 Points

2 years ago

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

49 Messages

 • 

744 Points

2 years ago

@HannesKa -- we will try reproducing this issue. We will look into it.

294 Messages

 • 

4.5K Points

I occasionally, but not always, receive the same error message after LR finishes writing xmp data to files after an import and keywording.

294 Messages

 • 

4.5K Points

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.

40 Messages

 • 

712 Points

2 years ago

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

5 Messages

 • 

138 Points

I get that too.  I have one stuck and it's been weeks.