Git Product home page Git Product logo

Comments (22)

ariffjeff avatar ariffjeff commented on June 20, 2024 1

You have to open entry.py and start the debugger there. I believe the default behavior for debuggers is that it will start executing from whatever file you are currently looking at. Since you are looking at job_control.py, it will try to run it but immediately exit because there is no starting function call in that file. It's possible to configure the debugger to always start execution from a specific file but I don't know how to do that in pycharm. I use VS Code.

The reason why Job data Excel template... shows up in the console anyways even though nothing is being executed is because __init__.py gets automatically called whenever a project is run I believe. That was bad practice on my part, but it's fine for now.

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Please attach the excel file you used to this thread, thanks!

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

workSearch_template.xlsx

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Thanks!

I just tested with that data with python 3.10.10 (the project is wrongly set to a minimum of 3.9 for some reason), and I didn't get your error and all the data was valid. see below for help with self diagnosing the issue.

In regards to your question you sent me: which file is the one that checks for date information?...
There's two places you should look at in this case...

  1. job_control.py, line 24 which should bring in the excel data as a pandas data frame. if you execute that line, then enter self.jobs in the debug console, you should be able to see all your data nicely formatted - just to see if it's being read properly.

  2. wherever the method target_week_has_jobs() is being called. that's just after where you'll find that your data is invalid/getting thrown out for some reason. the project reads in your job data then does a bunch of operations on each row to check for invalid data and clean it up. unfortunately this means that it might be recognizing your data as invalid for some reason and throwing out all the rows. you can backtrack from those method to figure out what code is potentially throwing out your data.

let's also try to continue all conversation in the github thread since it's just easier to keep track of stuff. much appreciated.

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

He Ariff,

I actually used Python 3.11.7... I'm gonna give #1 a try. sorry for the late response.
I'm still getting the error. so you used my file right? I'm gonna go into the terminal to see if it's being read

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Yeah I used your file. I might have to try this out on my mac and see if that's involved in the issue.

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Ok, no worries. If you could that'd be nice but I was trying to figure out how to run that one line in isolation. via ChatGPT I learned that I am supposed to be using a debugger to be running that alone. I'm gonna try to do that now

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Ok... This is weird. I'm using Pycharm to debug it and for some reason, the default setting for python is 3.9 in the project but 3.11 when I check for it in terminal using Python3 --version.

Attempting to update it now... but there's no very obvious way to my eyes

image

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Ok... got it assigned the right interpreter. seems like it's running without issue on line 24

/opt/homebrew/bin/python3.11 /Users/yunfeiliang/Documents/ReEmployCT-Data-Entry/reemployct_data_entry/lib/job_control.py
Job data Excel template: /Users/yunfeiliang/Documents/ReEmployCT-Data-Entry/reemployct_data_entry/workSearch_template.xlsx

Process finished with exit code 0

still need to see what it looks like as a data file

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024
image

Ok... not sure what's happening here. I set a breakpoint in an attempt to open up the file at line 24 via debugging, but from my understanding it's just finishing execution now, preventing me from being able to interact with the debugging console.

It's been a while since I tried programming but the setting up environment part is FAR less straightforward than I thought. I'll call it a night. Please let me know if you know why this might be happening!

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Also yes, stick with any newer python version for the selected interpreter. I should never have assigned it to the older 3.9 version in the first place.

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

I'll look into it tonight and get back to you! Thanks for the pointer!!

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Ok... Tried to run it as normal this week, same error popped up as last week.

But in the debugger, after I had set the file path to start with entry.py, it's giving me the right prompts:
image

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

however, after I give it the right info, it's still giving me this message:
image

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Thanks!

I just tested with that data with python 3.10.10 (the project is wrongly set to a minimum of 3.9 for some reason), and I didn't get your error and all the data was valid. see below for help with self diagnosing the issue.

In regards to your question you sent me: which file is the one that checks for date information?... There's two places you should look at in this case...

  1. job_control.py, line 24 which should bring in the excel data as a pandas data frame. if you execute that line, then enter self.jobs in the debug console, you should be able to see all your data nicely formatted - just to see if it's being read properly.
  2. wherever the method target_week_has_jobs() is being called. that's just after where you'll find that your data is invalid/getting thrown out for some reason. the project reads in your job data then does a bunch of operations on each row to check for invalid data and clean it up. unfortunately this means that it might be recognizing your data as invalid for some reason and throwing out all the rows. you can backtrack from those method to figure out what code is potentially throwing out your data.

let's also try to continue all conversation in the github thread since it's just easier to keep track of stuff. much appreciated.

So I'm seeing this:
image

It seems like the file is pausing in job_control.py line 24, then I entered self.jobs. Doesn't seem to be working. Anything you see I'm doing wrong?

Edit:
Ok... I figured out how to run the specific line and then the other line.

image

I'm not sure what I'm looking at? it seems like it's reading the data at some level, but the dates are incorrect!! It doesn't seem like it's reading the right file??

edit2:
I see the problem now, from reemployct_data_entry import entry is giving me a file path that differs than the file path I am using.

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

reemployct_data_entry import entry will always give the path to the template file, that shouldn't change.

I think you just need to go into jobDataLocation.json and overwrite the whole file contents with just:

{
  "filepath_jobData": ""
}

This will set you back to the beginning so that you can run entry.main() again which will ask you for the location of the excel file with the correct user data.

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

reemployct_data_entry import entry will always give the path to the template file, that shouldn't change.

I think you just need to go into jobDataLocation.json and overwrite the whole file contents with just:

{
  "filepath_jobData": ""
}

This will set you back to the beginning so that you can run entry.main() again which will ask you for the location of the excel file with the correct user data.

Got that done!! I'll run it today to see if it works

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

I believe it worked! It only fills it out for 3 jobs is that correct? I recorded down more than that but only submitted 3 anyways

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Yup. 3 jobs is the minimum so it won't enter more than that, since more than 3 would be a waste of time. I don't think I even wrote it to support adding more than 3 for a week. Let me know if there are any other problems. If not, I'll close this issue and make it more obvious for the user on which data the project is accessing.

Also, how did you find my project by the way? I'm curious. And thanks for using it!

from reemployct-data-entry.

YLMiami avatar YLMiami commented on June 20, 2024

Yup. 3 jobs is the minimum so it won't enter more than that, since more than 3 would be a waste of time. I don't think I even wrote it to support adding more than 3 for a week. Let me know if there are any other problems. If not, I'll close this issue and make it more obvious for the user on which data the project is accessing.

Also, how did you find my project by the way? I'm curious. And thanks for using it!

Yeah makes sense. I guess there's not even a mandate to report EVERYTHING.
I just accidentally found it on Reddit.

No thank you for making it!! It's been a huge service for someone in my niche position (being somewhat technical and wants to go into the field), who is using it to simplify work.

from reemployct-data-entry.

ariffjeff avatar ariffjeff commented on June 20, 2024

Super glad I could help! It's why I made this project :)

from reemployct-data-entry.

Related Issues (2)

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.