
Used 850 Machining Center, Box Guideway, Fanuc Control
Fanuc · 850
Used
Other EquipmentOE260753Year on requestFanucChina
The publish script also has the same slow loading issue as the Moments download program: D:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Saturday 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it still pulls from database and generates:
| Slow loading issue | D:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Saturday 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it pulls from database and generates: |
|---|---|
| Publish Script Loading Speed Issue And Local Snapshot Mechanism | Slow loading issue: D:\Work\machine_china>python roc_scripts\publish_wechat_english_machines.py Loaded 8931 published image signature(s) from database. Loaded 5221 exact hashes and 8931 perceptual hashes for dedup check. Sat 11:12 Processed 1 m 45 s Added local snapshot/incremental loading similar to Moments collection to the publish script. Now on first run it pulls from database and generates: resources/data/publish_image_signature_db_snapshot.json. On subsequent startups: if database unchanged: Loaded 8931 published image signature(s) from local database snapshot. If database has few new/update: Loaded 8950 published image signature(s) from local snapshot and 19 incremental update(s) from database. Only if snapshot missing. |
| Snapshot Writing And Verification | Only writes the current in-memory signature index to local snapshot. Verification passed: py_compile, python -m unittest roc_scripts.tests.test_publish_wechat_english_machines. Edited publish_wechat_english_machines.py +83 -2. Sat 11:14 Why is Moments over 13000? |
| Difference In Loading Scope Between Publish And Moments | This one is over 8000? Sat 11:14 Because the loading scopes differ. Moments collection loads global image signatures: published_machine + wechat_moment + local_audit, i.e., images from all sources are compared. |
| Design Intention For Loading Scopes | So you see over 13000. The publish script only loads published machine image signatures: published_machine, hence over 8000. This is intentional: in Moments collection stage: the sooner duplicates are found the better. |
| Audit Images And Publish Judging Logic | Audit images are also compared. In publish stage: determine whether this machine has already been published. |
| Normal Count Difference And Image Dedup Saving In Moments Script | Because it might be the same machine not yet published. The counts you see now can be roughly understood as: Moments global dedup: about 13000+ entries; publish dedup: about 8000+ entries from published_machine. This difference is normal. Sat 11:14 wechat_moments_semi_auto.py save image dedup. |
| Folder Naming Change And Duplicate Image Handling | Directly name folders like machine_260712_0737_01. 7:22 Processed 3 m 4 s. Modified wechat_moments_semi_auto.py. Now: if duplicate image found in same folder: delete current image. |
| Different Duplicate Handling Per Folder Type | Continue saving next one. If duplicate with historical folder: still stop current moment. |
| Purpose Of Folder Naming And Existence Handling | Avoid entire duplicate data. Folder naming changed to: machine_260712_0737_01. If directory already exists. |
| Avoid Overwriting Old Data And Test Run | Avoid overwriting old data. Passed syntax check and directory naming validation. Edited wechat_moments_semi_auto.py +26 -3. 7:25 D:\Work\machine_china>python roc_scripts\wechat\wechat_moments_semi_auto.py --phone Detected historical config. |
| Reuse Config Prompt | Default y): y Enable step-by-step confirmation mode for this run? (y/n |
| Confirmation Mode Prompt (continued) | Default use existing config): n Enable debug log for this run? (y/n |
| Debug Log Prompt And Error Traceback Start | Default use existing config): n Loaded 14450 image signature(s) from local database snapshot for global duplicate checks. Traceback (most recent call last): File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py" |
| Error Line Number 758 | line 758 |
| Error Frame | Main() Call: in <module> main() File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py" |
| Error Line Number 689 | line 689 |
| Error Frame | Signature_cache.refresh(): in main cache_stats = signature_cache.refresh() File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py" |
| Error Line Number 269 | line 269 |
| Error Frame | _sync_path_to_database: signature) File "D:\Work\machine_china\roc_scripts\wechat\wechat_moments_semi_auto.py" |
| Error Line Number 242 | line 242 |
| Error Frame | Upsert_image_signature Call: in _sync_path_to_database upsert_image_signature( File "D:\Work\machine_china\roc_scripts\image_signature_store.py" |
| Error Line Number 90 | line 90 |
| Error Frame | Update_or_create Call: in upsert_image_signature DbImageSignature.objects.update_or_create( File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\models\manager.py" |
| Error Line Number 87 | line 87 |
| Error Frame | Kwargs Argument: x x kwargs) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\models\query.py" |
| Error Line Number 946 | line 946 |
| Error Frame | Transaction.atomic: in update_or_create with transaction.atomic(using=self.db): File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\transaction.py" |
| Error Line Number 216 | line 216 |
| Error Frame | Set_autocommit: in enter connection.set_autocommit( File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\backends\base\base.py" |
| Error Line Number 497 | line 497 |
| Error Frame | _set_autocommit: in set_autocommit self._set_autocommit(autocommit) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\django\db\backends\mysql\base.py" |
| Error Line Number 289 | line 289 |
| Error Frame | Connection.autocommit: in _set_autocommit self.connection.autocommit(autocommit) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py" |
| Error Line Number 447 | line 447 |
| Error Frame | _send_autocommit_mode: in autocommit self._send_autocommit_mode() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py" |
| Error Line Number 468 | line 468 |
| Error Frame | _read_ok_packet: in _send_autocommit_mode self._read_ok_packet() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py" |
| Error Line Number 453 | line 453 |
| Error Frame | _read_packet: in _read_ok_packet pkt = self._read_packet() File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py" |
| Error Line Number 744 | line 744 |
| Error Frame | _read_bytes: in _read_packet packet_header = self._read_bytes(4) File "C:\Users\Administrator\AppData\Roaming\Python\Python 310\site-packages\pymysql\connections.py" |
| Error Line Number 782 | line 782 |
| Error Frame | Socket Read: in _read_bytes data = self._rfile.read(num_bytes) File "C:\Program Files\Python 310\lib\socket.py" |
| Error Line Number 705 | line 705 |
| Keyboardinterrupt And Command Error | in readinto return self._sock.recv_into(b) KeyboardInterrupt ^C D:\Work\machine_china>7 '7' is not an internal or external command |
| Error Message And Subsequent Run | nor a runnable program or batch file. D:\Work\machine_china> D:\Work\machine_china> D:\Work\machine_china>python roc_scripts\wechat\wechat_moments_semi_auto.py --phone Detected historical config. |
| Run Output With Incremental Updates | Default use existing config): n Loaded 14679 image signature(s) from local snapshot and 229 incremental update(s) from database. WeChat Moments download |
| Slow Download Time | exceeded 1 minute |
| Optimization Completion And Root Cause | How to make it faster? Show more 7:47 Processed 3 m 23 s Optimization completed. The root cause of slowness is indeed cache merging error |
| Optimization Details | Cache And Fingerprint Handling: not simply because of 14 k data entries. Previously on startup: server snapshot overwrites local cache for current phone number. Recalculate existing image fingerprints. Write each image individually to server database. Each phone number's JSON also repeatedly saves all server fingerprints. Now changed: phone number cache only saves local file state for that number. Global server fingerprints only keep one snapshot. Images already in database directly reuse fingerprints |
| Batch Write And Automatic Cleanup | do not re-upload. Truly missing fingerprints are batch written to database once. Old cache will be automatically cleaned after this run. The 229 incremental update(s) you saw. |
| Meaning Of Incremental Updates | are the 229 images already written one by one to the database before the first interruption. |
| Command To Continue And Expected Behavior | Not data anomaly. Continue using the original command: python roc_scripts\wechat\wechat_moments_semi_auto.py --phone This time it should recognize the existing 229 images as reused. |
| Test Pass And File Edit Summary | Will not upload individually again. Syntax check and 7 related tests passed. Edited 2 files +132 -38: roc_scripts/image_signature_store.py +56 -0; roc_scripts/wechat/wechat_moments_semi_auto.py +76 -38. 7:51 Environment info changes +573 -1 |
| Git Status And Source Files | 767 local master commit or push GitHub CLI not authenticated Source wechat_moments_semi_auto.py publish_wechat_english_machines.py View all |
Related inventory

Fanuc · 850
Used

Mori Seiki · 850
Used, available for inspection.

Fanuc
Used machine, available for inspection.