Giter Site home page Giter Site logo

Comments (6)

adamspierer avatar adamspierer commented on July 20, 2024

Hi @Vegeta4567,

It is likely an issue with the installation of FFmpeg. Could you try to install it manually from https://ffmpeg.org/ , restart your computer, and try again?

Otherwise, can you help me with the following in order:

  1. What version of Python are you running? Others have found issues when the Python version is incompatible. That said, the virtual environment should make that a non-issue if you are running in it. If you are using the virtual environment then move onto 2.
  2. Does the non-GUI version of the script work with the test files? This will tell me if wxPython is the issue or the installation of FFmpeg.
  3. Could you re-run the GUI and non-GUI versions of the script with the --debug tag as well? That will tell me which lines are unhappy and ideally it is the same part of the script for both.

Try this and let me know how things go!

from freeclimber.

Vegeta4567 avatar Vegeta4567 commented on July 20, 2024

Hello,

Thanks for your fast reply!

I am using Python 3.6.0 in the virtual env. 3.6.10 in the base (same problem):

I reinstalled ffmpeg. ffmpeg -version gives:
ffmpeg version 6.0-essentials_build-www.gyan.dev Copyright (c) 2000-2023 the FFmpeg developers

The versions:
argparse = 1.1
ffmpeg-python = 0.2.0
matplotlib = 3.1.3
numpy=1.19.5
pandas=1.0.5
pip=20.1.1
scipy=1.5.0
trackpy=0.4.2
wxPython = 4.0.4

If I run: pythonw .\scripts\FreeClimber_main.py --video_file .\example\w1118_m_2_1.avi it's the same problem. I suppose it's the non-GUI right?

I am not really familiar with Python, where I put the --debug command?

Thanks a lot and best!

from freeclimber.

adamspierer avatar adamspierer commented on July 20, 2024

The debug command would go at the end of when you call the script:
pythonw .\scripts\FreeClimber_main.py --video_file .\example\w1118_m_2_1.avi --debug

To run the non-GUI, try this as well:
python FreeClimber_main.py --config_file ./example/example.cfg --debug

from freeclimber.

Vegeta4567 avatar Vegeta4567 commented on July 20, 2024

Hello,

The first command returns absolutely nothing.

For the second one, I have this result:

########################################################################

FreeClimber v.0.4.0

Please cite: https://doi.org/10.1242/jeb.229377######################

Beginning program @ 2023-09-12 08:58:52

########################################################################
Namespace(config_file='./example/example.cfg', debug=True, no_concat=False, optimization_plots=False, process_all=False, process_custom=False, process_undone=False)
main.check_config
Namespace(config_file='./example/example.cfg', debug=True, no_concat=False, optimization_plots=False, process_all=False, process_custom=False, process_undone=False)
FreeClimber.init
FreeClimber.load_parameters
FreeClimber.get_filelist
FreeClimber.file_walker
FreeClimber.create_log_header
Creating completed .log file: ./examplelog/completed.log
Creating skipped .log file: ./examplelog/skipped.log
./example\w1118_m_2_1.h264
FreeClimber.process
FreeClimber.print_new_video

== [1 || 1] w1118_m_2_1.h264 ===========================================

detector.init
detector.check_video...detector.load_for_main
detector.load_for_main: --------variables--------
detector.load_for_main: x=100
detector.load_for_main: y=136
detector.load_for_main: w=1112
detector.load_for_main: h=380
detector.load_for_main: check_frame=100
detector.load_for_main: blank_0=0
detector.load_for_main: blank_n=145
detector.load_for_main: crop_0=0
detector.load_for_main: crop_n=145
detector.load_for_main: threshold="auto"
detector.load_for_main: diameter=7
detector.load_for_main: minmass=100
detector.load_for_main: maxsize=11
detector.load_for_main: ecc_low=.05
detector.load_for_main: ecc_high=.58
detector.load_for_main: vials=3
detector.load_for_main: window=50
detector.load_for_main: pixel_to_cm=46
detector.load_for_main: frame_rate=29
detector.load_for_main: vial_id_vars=2
detector.load_for_main: outlier_TB=1
detector.load_for_main: outlier_LR=3
detector.load_for_main: naming_convention="geno_sex_day_rep"
detector.load_for_main: path_project="./example"
detector.load_for_main: file_suffix="h264"
detector.load_for_main: convert_to_cm_sec=True
detector.load_for_main: trim_outliers=True
detector.check_variable_formats

detector.specify_paths_details
detector.specify_paths_details: self.path_data='./example\w1118_m_2_1.raw.csv'
detector.specify_paths_details: self.path_filtered='./example\w1118_m_2_1.filtered.csv'
detector.specify_paths_details: self.path_diagnostic='./example\w1118_m_2_1.diagnostic.png'
detector.specify_paths_details: self.path_slope='./example\w1118_m_2_1.slopes.csv'
detector.video_to_array
!! Could not read ./example\w1118_m_2_1.h264 into FreeClimber. Likely due to unacceptable video file or FFmpeg not installed
!! Could not read in video file metadata
Traceback (most recent call last):
File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 276, in video_to_array
out,err = (ffmpeg
AttributeError: module 'ffmpeg' has no attribute 'input'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File ".\scripts\FreeClimber_main.py", line 489, in
main()
File ".\scripts\FreeClimber_main.py", line 464, in main
fc.process(video_file = File,variables = None, config_file = fc.config_file)
File ".\scripts\FreeClimber_main.py", line 191, in process
d = detector.detector(video_file = video_file, config_file = config_file, debug = self.args.debug)
File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 76, in init
self.image_stack = self.video_to_array(video_file,loglevel='panic')
File "C:\Users\myUser\Desktop\free\FreeClimber\scripts\detector.py", line 283, in video_to_array
print('!! Could not read in video file to an array. Error message (if any):', err)
UnboundLocalError: local variable 'err' referenced before assignment

from freeclimber.

simxn18 avatar simxn18 commented on July 20, 2024

I get the same error. Please help:(

from freeclimber.

Vegeta4567 avatar Vegeta4567 commented on July 20, 2024

Hello,

For me, the problem was the virtual env.

I have totally uninstalled python and anaconda.
Reinstalled anaconda
Installed python 3.6.8 https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe
Reboot the computer
Launched a anaconda console
Installed the dependencies needed.
pip install argparse
pip install ffmpeg-python
pip install matplotlib
pip install numpy
pip install pandas
pip install scipy
pip install trackpy
pip install wxPython
pip install FreeClimber

And it works :-)

from freeclimber.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.