One or more files are out of date or do not exist

本文探讨了在运行程序时遇到Oneormorefilesareoutofdateordonotexist错误的原因及解决方法。主要原因是系统时间设置不当,提供了两种解决方案:调整系统时间或等待时间自动修正。

One or more files are out of date or do not exist。当运行程序是会弹出个消息框,消息显示为:

One or more files are out of date or do not exist 。。。need rebuild!

主要产生的原因是:计算机系统时间可能被你设置过了,如果设置的时间超过现有时间就有可能出现这样的问题,

这个问题不用担心,我的解决方案是:1.索性再将时间设置的前一点。2.不去理会,到那天他问题自动会消失。

 

[R] ssc -- Install and uninstall packages from SSC (View complete PDF manual entry) Syntax Summary of packages most recently added or updated at SSC ssc new [, saving(filename[, replace]) type] Summary of most popular packages at SSC ssc hot [, n(#) author(name)] Describe a specified package at SSC ssc describe { pkgname | letter } [, saving(filename[, replace])] Install a specified package from SSC ssc install pkgname [, all replace] Uninstall from your computer a previously installed package from SSC ssc uninstall pkgname Type a specific file stored at SSC ssc type filename [, asis] Copy a specific file from SSC to your computer ssc copy filename [, plus personal replace public binary] where letter in ssc describe is a-z or _. Description ssc works with packages (and files) from the Statistical Software Components (SSC) Archive, which is often called the Boston College Archive and is provided by http://www.repec.org. The SSC has become the premier Stata download site for community-contributed software on the web. ssc provides a convenient interface to the resources available there. For example, on Statalist, users will often write The program can be found by typing ssc install newprogramname. Typing that would load everything associated with newprogramname, including the help files. If you are searching for what is available, type ssc new and ssc hot, and see [R] search. search searches the SSC and other places, too. search provides a GUI interface from which programs can be installed, including the programs at the SSC Archive. You can uninstall particular packages by using ssc uninstall. For the packages that you keep, see [R] ado update for an automated way of keeping those packages up to date. Links to PDF documentation Quick start Remarks and examples The above sections are not included in this help file. Command overview ssc new summarizes the packages made available or updated recently. Output is presented in the Stata Viewer, and from there you may click to find out more about individual packages or to install them. ssc hot lists the most popular packages -- popular based on a moving average of the number of downloads in the past three months. By default, 10 packages are listed. ssc describe pkgname describes, but does not install, the specified package. Use search to find packages; see [R] search. If you know the package name but do not know the exact spelling, type ssc describe followed by one letter, a-z or _ (underscore), to list all the packages starting with that letter. ssc install pkgname installs the specified package. You do not have to describe a package before installing it. (You may also install a package by using net install; see [R] net.) ssc uninstall pkgname removes the previously installed package from your computer. It does not matter how the package was installed. (ssc uninstall is a synonym for ado uninstall, so either may be used to uninstall any package.) ssc type filename types a specific file stored at SSC. ssc cat is a synonym for ssc type, which may appeal to those familiar with Unix. ssc copy filename copies a specific file stored at SSC to your computer. By default, the file is copied to the current directory, but you can use options to change this. ssc copy is a rarely used alternative to ssc install ..., all. ssc cp is a synonym for ssc copy. Options for use with ssc new saving(filename[, replace]) specifies that the "what's new" summary be saved in filename. If filename is specified without a suffix, filename.smcl is assumed. If saving() is not specified, saving(ssc_result.smcl) is assumed. type specifies that the "what's new" results be displayed in the Results window rather than in the Viewer. Options for use with ssc hot n(#) specifies the number of packages to list; n(10) is the default. Specify n(.) to list all packages in order of popularity. author(name) lists the 10 most popular packages by the specified author. If n(#) is also specified, the top # packages are listed. Option for use with ssc describe saving(filename[, replace]) specifies that, in addition to the description's being displayed on your screen, it be saved in the specified file. If filename is specified without an extension, .smcl will be assumed, and the file will be saved as a SMCL file. If filename is specified with an extension, no default extension is added. If the extension is .log, the file will be stored as a text file. If replace is specified, filename is replaced if it already exists. Options for use with ssc install all specifies that any ancillary files associated with the package be downloaded to your current directory, in addition to the program and help files being installed. Ancillary files are files that do not end in .ado or .sthlp and typically contain datasets or examples of the use of the new command. You can find out which files are associated with the package by typing ssc describe pkgname before or after installing. If you install without using the all option and then want the ancillary files, you can ssc install again. replace specifies that any files being downloaded that already exist on your computer be replaced by the downloaded files. If replace is not specified and any files already exist, none of the files from the package is downloaded or installed. It is better not to specify the replace option and wait to see if there is a problem. If there is a problem, it is usually better to uninstall the old package by using ssc uninstall or ado uninstall (which are, in fact, the same command). Option for use with ssc type asis affects how files with the suffixes .smcl and .sthlp are displayed. The default is to interpret SMCL directives the file might contain. asis specifies that the file be displayed in raw, uninterpreted form. Options for use with ssc copy plus specifies that the file be copied to the PLUS directory, the directory where community-contributed additions are installed. Typing sysdir will display the identity of the PLUS directory on your computer. personal specifies that the file be copied to your PERSONAL directory as reported by sysdir. If neither plus nor personal is specified, the default is to copy the file to the current directory. replace specifies that, if the file already exists on your computer, the new file replace it. public specifies that the new file be made readable by everyone; otherwise, the file will be created according to the default permission you have set with your operating system. binary specifies that the file being copied is a binary file and that it is to be copied as is. The default is to assume that the file is a text file and change the end-of-line characters to those appropriate for your computer/operating system. Remarks Users can add new features to Stata, and some users choose to make new features that they have written available to others via the web. The files that comprise a new feature are called a package, and a package usually consists of one or more ado-files and help files. The net command makes it reasonably easy to install and uninstall packages regardless of where they are on the web. One site, the SSC, has become particularly popular as a repository for additions to Stata. Command ssc is an easier to use version of net designed especially for the SSC. Many packages are available at the SSC. Packages are named, such as oaxaca, estout, or egenmore. At SSC, capitalization is not significant, so Oaxaca, ESTOUT, and EGENmore are ways of writing the same package names. When you type . ssc install oaxaca the files associated with the package are downloaded and installed on your computer. Package names usually correspond to the names of the commands being added to Stata, so one would expect that installing the package oaxaca will add command oaxaca to Stata on your computer, and expect that typing help oaxaca will provide the documentation. That is the situation here, but that is not always so. Before or after installing a package, type ssc describe pkgname to obtain the details. Examples Describe most recently added or updated packages at SSC . ssc new Describe the most popular packages at SSC . ssc hot Describe the package oaxaca . ssc describe oaxaca Describe the package oaxaca and save the description to the file oaxaca.log . ssc describe oaxaca, saving(oaxaca.log) List all packages, along with a brief description, that begin with the letter o . ssc describe o Same as above, but also save the listing to the file o.index . ssc describe o, saving(o.index) Install package oaxaca . ssc install oaxaca Uninstall previously installed package oaxaca . ssc uninstall oaxaca Type file whitetst.hlp that is stored at SSC . ssc type whitetst.hlp Copy file whitetst.ado from SSC to your computer . ssc copy whitetst.ado
最新发布
11-08
Dealing with dependency conflicts This section provides practical suggestions to pip users who encounter a ResolutionImpossible error, where pip cannot install their specified packages due to conflicting dependencies. Understanding your error message When you get a ResolutionImpossible error, you might see something like this: Linux python -m pip install package_coffee==0.44.1 package_tea==4.3.0 [regular pip output] ERROR: Cannot install package_coffee==0.44.1 and package_tea==4.3.0 because these package versions have conflicting dependencies. The conflict is caused by: package_coffee 0.44.1 depends on package_water<3.0.0,>=2.4.2 package_tea 4.3.0 depends on package_water==2.3.1 MacOS Windows In this example, pip cannot install the packages you have requested, because they each depend on different versions of the same package (package_water): package_coffee version 0.44.1 depends on a version of package_water that is less than 3.0.0 but greater than or equal to 2.4.2 package_tea version 4.3.0 depends on version 2.3.1 of package_water Sometimes these messages are straightforward to read, because they use commonly understood comparison operators to specify the required version (e.g. < or >). However, Python packaging also supports some more complex ways for specifying package versions (e.g. ~= or *): Operator Description Example > Any version greater than the specified version. >3.1: any version greater than 3.1. < Any version less than the specified version. <3.1: any version less than 3.1. <= Any version less than or equal to the specified version. <=3.1: any version less than or equal to 3.1. >= Any version greater than or equal to the specified version. >=3.1: any version greater than or equal to 3.1. == Exactly the specified version. ==3.1: only version 3.1. != Any version not equal to the specified version. !=3.1: any version other than 3.1. ~= Any compatible1 version. ~=3.1: any version compatible1 with 3.1. * Can be used at the end of a version number to represent all. ==3.1.*: any version that starts with 3.1. 1 Compatible versions are higher versions that only differ in the final segment. ~=3.1.2 is equivalent to >=3.1.2, ==3.1.*. ~=3.1 is equivalent to >=3.1, ==3.*. The detailed specification of supported comparison operators can be found in PEP 440. Possible solutions The solution to your error will depend on your individual use case. Here are some things to try: Audit your top level requirements As a first step, it is useful to audit your project and remove any unnecessary or out of date requirements (e.g. from your setup.py or requirements.txt files). Removing these can significantly reduce the complexity of your dependency tree, thereby reducing opportunities for conflicts to occur. Loosen your top level requirements Sometimes the packages that you have asked pip to install are incompatible because you have been too strict when you specified the package version. In our first example both package_coffee and package_tea have been pinned to use specific versions (package_coffee==0.44.1 package_tea==4.3.0). To find a version of both package_coffee and package_tea that depend on the same version of package_water, you might consider: Loosening the range of packages that you are prepared to install (e.g. pip install "package_coffee>0.44" "package_tea>4.0.0") Asking pip to install any version of package_coffee and package_tea by removing the version specifiers altogether (e.g. pip install package_coffee package_tea) In the second case, pip will automatically find a version of both package_coffee and package_tea that depend on the same version of package_water, installing: package_coffee 0.44.1, which depends on package_water 2.6.1 package_tea 4.4.3 which also depends on package_water 2.6.1 If you want to prioritize one package over another, you can add version specifiers to only the more important package: Linux python -m pip install package_coffee==0.44.1 package_tea MacOS Windows This will result in: package_coffee 0.44.1, which depends on package_water 2.6.1 package_tea 4.4.3 which also depends on package_water 2.6.1 Now that you have resolved the issue, you can repin the compatible package versions as required. Loosen the requirements of your dependencies Assuming that you cannot resolve the conflict by loosening the version of the package you require (as above), you can try to fix the issue on your dependency by: Requesting that the package maintainers loosen their dependencies Forking the package and loosening the dependencies yourself Warning If you choose to fork the package yourself, you are opting out of any support provided by the package maintainers. Proceed at your own risk! All requirements are appropriate, but a solution does not exist Sometimes it’s simply impossible to find a combination of package versions that do not conflict. Welcome to dependency hell. In this situation, you could consider: Using an alternative package, if that is acceptable for your project. See Awesome Python for similar packages. Refactoring your project to reduce the number of dependencies (for example, by breaking up a monolithic code base into smaller pieces).解释一下
09-25
You are asked to design and implement a Python-based system for managing a small library. The system should support the following core tasks, including manage users of different types (students, staff, and other members), manage the collection of books in the library and track and update loan records for borrowed books. Description The library has provided you with three CSV files containing its current data in the data folder: users.csv for user information, books.csv for book information and loans.csv containing loan history. In Task 1-3, you can assume all CSV files contain valid data. You are allowed to modify the import statements in the scaffold or move the import statements to different modules if required; but you are not allowed to import any modules which weren't originally imported in the scaffold. Users (users.csv) This file contains details of all registered users: Fields: user ID, password, name, role, and department (for students and staff only). User types: Student (s prefix in the user ID) Staff (e prefix in the user ID) Others (o prefix in the user ID) Each user type follows specific borrowing policies: Users Physical book Online Quota Student 10 days Unlimited 4 Staff 14 days Unlimited 6 Other 7 days Unlimited 2 Users Student Staff Other ​ Physical book 10 days 14 days 7 days ​ Online Unlimited Unlimited Unlimited ​ Quota 4 6 2 ​ ​ All users can borrow, return, and renew books, as well as view their active loans and loan policies. Only staff can add, update, or view detailed information about users and books. (More detail in Task 2-3). Books (books.csv) This file contains information about books in the collection: Fields: book ID, type (e.g., physical or online), total copies, title, authors, year, and keywords (colon-separated). Each book has a unique ID beginning with a character that denotes its category, followed by 4 digits. Physical books are identified by the prefix P in the Book ID. Online books (e-book) are identified by the prefix E in the Book ID. For online books, the total copies field is always 0. Loans (loans.csv) This file contains borrowing records: Fields: user ID, book ID, borrow date, due date, returned date. All dates are in the following format dd/mm/yyyy. The due date is automatically calculated based on loan policy. Active loans are those without a returned date. Your Task Write a program that reads users, books and loans from files users.csv, books.csv and loans.csv and a simple menu that allow interaction with the data. You are provided with 3 modules: user.py, book.py and task1.py. Your task is to Complete the implementation User and Book class in the users.py and books.py modules. You are allowed to add additional classes and functions if necessary. Implement the interaction menu in task1.py Login Menu When the program starts, the user is prompted to log in with their ID and password. If the user id does not exist or user id and password does not match, the program will print "Invalid credentials. x attempt(s) remaining." and prompt user to login again. Successful login displays a welcome message with the user's name and role. Users have three login attempts before the program prints a message "Sorry you're out of attempts. Please contact your librarian for assistance." and back to welcome and login menu. In the login menu, user can type "quit" to terminate the program. Welcome to Library Login as: s31267 Password: chr1267 Logged in as Chris Manner (Student) Main menu Once logged in, users see a personalized main menu based on their role. For student, other users, and staff members outside the Library department: Logged in as Chris Manner (Student) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: For staff from the Library department: Logged in as Mary Alan (Staff) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans 4. Library Report ================================== Enter your choice: A user's input may provide incorrect choice, e.g. 5 or four. In this case your program should prompt for input again. 0. Quit The program will print the message: "Goodbye!", and terminates. 1. Log out The user is logged out and returned to the welcome screen and login menu. 2. View account policies Upon entering 2, the program will display user current membership policies, and their total loans. Logged in as Chris Manner (Student) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 2 Student Chris Manner. Policies: maximum of 10 days, 4 items. Current loans: 2 (1 physical / 1 online). 3. View my loans Upon entering 3, the program will display all active loans (sorted by due date). Active loans are those without a returned date. Logged in as Chris Manner (Student) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 3 You are currently have 2 loan(s). 1. P0006 'Hands-On ML' by Aurelien Geron (2019). Due date: 13/09/2025. 2. E0001 'Python Crash Course' by Eric Matthes (2015). Due date: 15/09/2025. 4. Library Report (Library Staff only) Upon entering 4, library staff can access a summary report of the library. This report provides key statistics, including the total number of users (with a breakdown by role), as well as details about the book collection and available books which currently have one or more copies available. Logged in as Mary Alan (Staff) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans 4. Library Report ================================== Enter your choice: 4 Library Report - 9 users, including 4 student(s), 3 staff and 2 others. - 14 books, including 10 physical book(s) (7 currently available) and 4 online book(s). Examples User inputs are in bold font below. Example 1 Welcome to Library Login as: s312 Password: chr1267 Invalid credentials. 2 attempt(s) remaining. Login as: s31267 Password: chr12 Invalid credentials. 1 attempt(s) remaining. Login as: s31267 Password: chr126 Sorry you're out of attempts. Please contact your librarian for assistance. Welcome to Library Login as: quit Goodbye! Example 2 Welcome to Library Login as: s31267 Password: chr1267 Logged in as Chris Manner (Student) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 2 Student Chris Manner. Policies: maximum of 10 days, 4 items. Current loans: 2 (1 physical / 1 online). ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 3 You are currently have 2 loan(s). 1. P0006 'Hands-On ML' by Aurelien Geron (2019). Due date: 13/09/2025. 2. E0001 'Python Crash Course' by Eric Matthes (2015). Due date: 15/09/2025. ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 0 Goodbye! Example 3 Welcome to Library Login as: e118102 Password: pa55word Logged in as Mary Alan (Staff) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans 4. Library Report ================================== Enter your choice: 4 Library report - 9 users, including 4 student(s), 3 staff, and 2 others. - 14 books, including 10 physical book(s) (7 currently available) and 4 online book(s). ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans 4. Library Report ================================== Enter your choice: 5 Enter your choice: 3 You are currently have 1 loan(s). 1. P0004 'The Hitchhiker's Guide to the Galaxy' by Douglas Adams (1985). Due date: 17/09/2025. ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans 4. Library Report ================================== Enter your choice: 0 Goodbye! Example 4 Welcome to Library Login as: o56789 Password: hackme Logged in as Chloe (Others) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 2 Others Chloe. Policies: maximum of 7 days, 2 items. Current loans: 0 (0 physical / 0 online). ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 3 You are currently have 0 loan(s). ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 0 Goodbye! Example 5 Login as: e45261 Password: readmore Logged in as Lan Nguyen (Staff) ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 2 Staff Lan Nguyen. Policies: maximum of 14 days, 6 items. Current loans: 1 (1 physical / 0 online). ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 3 You are currently have 1 loan(s). 1. P0019 'Principles of Marketing' by Philip Kotler (2016). Due date: 21/09/2025. ================================== My Library Account 0. Quit 1. Log out 2. View account policies 3. View my loans ================================== Enter your choice: 0 Goodbye!from abc import ABC, abstractmethod import csv import datetime import re class User(ABC): # Your code goes here passimport csv import datetime import re class Book: # your code goes hereimport user import book import csv import datetime import typing def main(user_file: str, book_file:str, loan_file:str) -> None: """ This is the entry of your program. Please DO NOT modify this function signature, i.e. function name, parameters Parameteres: - user_file (str): path the `users.csv` which stores user information - book_file (str): path the `books.csv` which stores book information - loan_file (str): path the `loans.csv` which stores loan information """ # Your implemetation goes here pass if __name__ == "__main__": main('data/users.csv', 'data/books.csv', 'data/loans.csv')
10-11
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值