Hello, I’m a software developer using Speckle for the first time this time.
While looking for an open-source tool in the company, Speckle is suitable and is in test use.
The test environment is Windows 11, WSL2 Ubuntu 24.04.
Speckle server version was targeted at 2.22.5.
Node.js version is 18.19.1.
Currently, https://app.speckle.systems/ confirms that the file upload is good in general.
But in local development environment, no matter how hard I try, it doesn’t work.
Finally, I’m writing to get community help.
ifc files generally have no problem uploading files in local environment, but for obj and stl files, they are not uploaded due to two major problems.
No. 1: Missing module
The contents are in the requirements.txt file of the packages/fileimport-service in the root directory.
numpy-stl==3.1.1
specklepy==2.9.1
structlog==23.3.0
numpy==1.26.3 # not directly required, pinned to avoid a vulnerability in <1.22.2
python-util==1.2.1 # not directly required, peer dependency of numpy-stl
However, if I upload the obj, stl file, specklepy, stl module does not exist, console message shows “no module named”.
And then, I proceed with the related requirements.txt based installation in the python venv environment and try again, may be get No. 2 error for the obj file(stl file still exist same problem).
No. 2: Does not have auth token in ‘profile:read’ range due to GraphQL active_user null
I attach the specific log, and when I asked ChatGPT based on the related log, GPT told me as follows.
logging.txt (39.4 KB)
Problem Summary and Causes
- OBJ File Dependency Issue:
- The log shows errors like
Invalid filename reference in OBJ dependencies
andMissing MTL file:/tmp/file_to_import/
. - This indicates that the required MTL (Material Template Library) file is either missing or not correctly referenced. Without this file, the OBJ file might not render properly.
- GraphQL Authentication Error:
- The error
Your auth token does not have the required scope: profile:read
was encountered. - This means the authentication token does not include the necessary
profile:read
scope, causing the GraphQL request to fail.
- Database Update Error:
- The database threw an error:
value too long for type character varying(255)
. - This suggests that the string being saved to the
convertedMessage
field exceeds the 255-character limit imposed by the database schema.
Solutions
- Resolving OBJ File Dependencies:
- Ensure the required MTL file is included alongside the OBJ file in the same directory during the upload.
- Check that the OBJ file’s
mtllib
directive correctly references the MTL file path.
- Fixing GraphQL Authentication:
- Add the
profile:read
scope to the authentication token.- Verify the Speckle server’s user roles and API scope settings.
- Generate a new token with the correct scope explicitly included.
- Addressing Database Field Length:
- Update the database schema to allow longer messages:
- Change the
convertedMessage
field to use aTEXT
type or increase the length ofcharacter varying
.
- Change the
- Alternatively, modify the application logic to truncate or limit the message length before saving.
Additional Recommendations
- Review the Python script (
import_file.py
) handling the upload process for any issues in file handling or error propagation. - Ensure all paths and files referenced in the logs exist and are accessible by the server.
Apart from this, there is a phenomenon that the WSL2 on Windows mentioned in frontend-2, if I logged in and will not be redirected to the main page.
A Below partial content is .env file in frontend-2 directory. When I understood it, I thought it would be okay to comment the HOST env because it was told to remove it.
#HOST=127.0.0.1 # comment
PORT=8081
NUXT_PUBLIC_LOG_LEVEL=debug
NUXT_PUBLIC_LOG_PRETTY=true
# Whether to emit extra properties (bindings) that would be sent to seq to the console in CSR
NUXT_PUBLIC_LOG_CSR_EMIT_PROPS=false
...
I’ve been looking hard at community posts, but it’s not working out
I’m writing to ask if I can get help.
NOTE: I am not good at English, so I had to use machine translation. Please understand.
Thank you.