-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UnboundLocalError: local variable 'status' referenced before assignment #44
Comments
Hi @rds-itga , yup, this seems like a bug. Thanks for reporting. Should not be hard to fix, I will try to have a look at it today or tomorrow. |
Hi @rds-itga , this is a bit of an odd error, meaning that it should not happen. That means something else is not working correctly. Can you tell me a little bit more about your environment and did you do anything else before running the command? Did you change the config? Can you print the full output? Thanks! |
Hi,
Regards |
defaults.yaml
settings.yaml
|
Good stuff. I can fix the error quite easily, but it probably will not address the underlying issue. You can try: use_tem_server: False This will avoid the issue altogether by running the interface in the same process (not ideal, but OK for scripting work). Alternatively, can you try to first run: instamatic.temserver And then in a different tab, do the thing from before: from instamatic import TEMController
ctrl = TEMController.initialize() |
Hi, with it seems to work, here is what the the terminal returned to me:
|
No worries! |
Hi again, I just changed default tem_server_port 8088 into 8087 (as i don't use a cam_server) and now it is working in tem_server mode. microscope: simulate
camera: simulate
calibration: simulate
# Global toggle to force simulated camera/microscope interface
simulate: false
data_directory: C:\instamatic
#flatfield: C:/instamatic/flatfield.tiff
flatfield:
# Run the TEM connection in a different process (recommended)
use_tem_server: true
tem_server_host: 'localhost'
tem_server_port: 8087
tem_require_admin: false
tem_communication_protocol: 'pickle' # pickle, json, msgpack, yaml
# Run the Camera connection in a different process
use_cam_server: false
cam_server_host: 'localhost'
cam_server_port: 8087
cam_use_shared_memory: true
# Submit collected data to an indexing server (CRED only)
use_indexing_server_exe: false
indexing_server_exe: 'instamatic.dialsserver.exe'
indexing_server_host: 'localhost'
indexing_server_port: 8089
dials_script: 'E:/cctbx/dials_script.bat'
# JEOL only, automatically set the rotation speed via Goniotool (instamatic.goniotool)
use_goniotool: false
goniotool_server_host: 'localhost'
goniotool_server_port: 8090
# For InsteaDMatic to control the rotation speed on a FEI/TFS system
fei_server_host: '192.168.12.1'
fei_server_port: 8091
# Automatically submit the data to an indexing server running in a VM (VirtualBox)
use_VM_server_exe: false
VM_server_exe: 'instamatic.VMserver.exe'
VM_server_host: 'localhost'
VM_server_port: 8092
VM_ID: "Ubuntu 14.04.3"
VM_USERNAME: "lab6"
VM_PWD: "testtest"
VM_STARTUP_DELAY: 50
VM_DESKTOP_DELAY: 20
VM_SHARED_FOLDER: F:\SharedWithVM
# Testing variables
cred_relax_beam_before_experiment: false
cred_track_stage_positions: false
# Here the panels for the GUI can be turned on/off/reordered
modules:
- 'cred'
- 'cred_tvips'
- 'cred_fei'
- 'sed'
- 'autocred'
- 'red'
- 'machine_learning'
- 'ctrl'
- 'debug'
- 'about'
- 'console'
- 'io' Regards |
Hi @rds-itga , nice debugging there! Thanks for letting me know. The choice of port is somewhat abritrary, but it is indeed possible that it was already in use (or maybe some hanging process). |
Hi everybody,
I've just installed instamatic via pip install instamatic
I tried to run this short code:
but I got this error:
Could you help me to solve it, please?
Thank you
Regards
The text was updated successfully, but these errors were encountered: