Forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jrjdavidson

Pages: [1] 2
1
Python and Java API / Re: Silent error
« on: April 17, 2025, 03:10:59 AM »
Sorry Alexey, didn't see your reply as I didn't get notified when you replied!
 running Metashape-2.2.0-cp37.cp38.cp39.cp310.cp311-none-win_amd64.whl
by silent exit i mean the equivalent of running sys.exit(). No error message or anything of the kind.

2
Python and Java API / Silent error
« on: March 20, 2025, 11:07:13 AM »
I had this line in a script
Code: [Select]
x = chunk.point_cloud.pickPoint(
                camera.center, camera.unproject(point2D))
If camera.center == None, then this function silently exits without throwing an error. It took a bit of frustrating debugging to find the reason why my script stopped without running to its end..

Not sure if this should be a bug report of if it's intentional



3
Yes that fixes it, however I did have to set a root path on the node as well.

Note that we rely on UNC global paths without setting a root on any of our machines, and this pattern work well apart for this one little bug.

4
Python and Java API / Re: Bad allocation error catch.
« on: June 12, 2024, 11:45:31 AM »
ok, thanks.

For a network task, how would i try to catch an error like this? should i create a something like
Code: [Select]
#previous code
task = Metashape.Tasks.BuildPointCloud()
tasks.append(task)

#new code
task = Metashape.Tasks.RunScript()
task.code='''
import Metashape
doc = Metashape.Document()
doc.open("path\to\project.psx", ignore_lock = True)
chunk = doc.chunk
try:
    chunk.buildPointCloud()
except Metashape.BadAllocationError: #just guessing how to catch errors
    #code to split chunks here
'''
tasks.append(task)

5
Just to clarify, the image in the previous post show two network jobs that were launched from the same project. The top one was launched form a project that was opened through the file explorer, and the full path is missing.

6
Yes, the console pane displays the correct path (Load Project: path =\\file....)
The root path is undefined regardless of project opening method.
 
The full path is not defined when viewed in the network monitor( see attached)

Windows 10 using windows file explorer. I don't think it is an executable assignment issue, we can reproduce this error on different machines.

7
Kia ora,

We have a strange bug that occurs only when a user opens a psx file on a network drive using the system viewer. If the file is opened by double clicking on a psx file in the file explorer, if a user tries to launch a network processing job, the nodes will throw this error:
Error: Can't open file: The system cannot find the file specified (2): C:/Windows/system32/auto-project.psx
( the file is acutally located on a network drive \\file\Shared\...\auto-project.psx)
If the same job is started by opening Metashape, and opening the file via the GUI, this error doesn't occur.

8
Python and Java API / Bad allocation error catch.
« on: June 10, 2024, 10:05:31 PM »
Kia ora,

we've setup a way to automatically setup network tasks, using the agisoft scripts on github as inspiration. It works great, however every now and then a project gets stuck on a bad allocation error loop. Trawling the forum indicates this is a RAM issue. I've tried all the tips I've found on here but haven't been able to solve it so far.

I have a couple of questions:
1) can you confirm that the bad allocation error is always RAM issue? Apparently our machine does not max out the RAM when the issue occurs.
2) is there a way to set up an exception catch for errors like this? I thought we could split the chunk if this type of error was thrown, if only we write a try/except pattern for this type of error.

Thank you!

10
Python and Java API / python script for maksing out of focus images
« on: February 27, 2024, 05:47:38 AM »
kai ora, I made a python script, based on the removebg script in the agisoft github repo, that simply detects areas of photos that are in focus and creates masks. The idea is that thsi script could be used to improve detailed textures. I used it as a learning tool for myself, but thought it might be useful to others.

https://github.com/jrjdavidson/detectEdges


11
Python and Java API / Re: Incorrect version when running script
« on: February 19, 2024, 04:54:52 AM »
whoops, I just realised I updated all the nodes but not the server. It works fine now. Sorry!

12
Python and Java API / Re: Incorrect version when running script
« on: February 19, 2024, 04:49:04 AM »
Kia ora Alexey,

I just installed 2.1.1 and I still have the same issue when sending a python script to network processing,.

13
Python and Java API / Re: Incorrect version when running script
« on: February 12, 2024, 04:44:24 AM »
looks like it is the same as topic  #16128

14
Python and Java API / Incorrect version when running script
« on: February 12, 2024, 02:33:49 AM »
I'm unable to run scripts over the network anymore once I've installed 2.1. It appears to be due to the project not being recognised as the correct version. This is not an issue if I launch the same process using the GUI instead of a script. See attached Network monitor screenshot of a project launched as a script.


Any thoughts anyone?

15
Python and Java API / Re: check if model has UVs
« on: February 07, 2024, 10:19:29 PM »
thanks!

Pages: [1] 2