
108 Cal.App.2d 696 (1952)
THE PEOPLE, Respondent,
v.
HARRY DWIGHT SMITH, Appellant.
Crim. No. 2771. 
California Court of Appeals. First Dist., Div. One.  
Jan. 16, 1952.
 Edward R. Plotner and Kroninger & Zographon for Appellant.
 Edmund G. Brown, Attorney General, Clarence A. Linn and Winslow L. Christian, Deputy Attorneys General, for Respondent.
 PETERS, P. J.
 In 1944 Harry Dwight Smith was charged with burglary. He pleaded guilty before the then existing Police Court of Oakland. Upon his arraignment in the superior court he again admitted the charge, and the degree of the crime was fixed at burglary in the first degree. He was thereupon sentenced to imprisonment for the term prescribed by law. No appeal was taken. In May of 1951, approximately seven years later, he filed a petition for a writ of error coram nobis in the superior court. The trial court, *698 without appearance on the part of Smith, denied the application. Smith appeals.
 The petition filed in the lower court alleges, in very general terms, that the information did not charge burglary in the first degree with the required particularity; that Smith was deprived of the right of counsel; that he had not been advised of his constitutional rights; that the guilty plea was secured by duress, and that the trial court deprived him of the right to appeal. The petition, so far as its allegations are concerned, simply consists of a series of conclusions of law unsupported by the required averments of fact. No particulars in reference to any of the charges are there alleged. Connected with the petition is a so-called statement of facts which, if true, would tend to show that the admittedly stolen property found in his room--two revolvers--were placed there without his consent. In general language he then sets forth that, after his arrest, he was slapped and threatened by the police officers and thus induced to plead guilty in the police and superior courts. He contends that he was not informed of his rights in the police court, and not afforded the right of counsel. After being sentenced in the superior court he states that he told the court he desired to appeal and was told that this would be discussed later. No other explanation for his failure to appeal appears.
 When this petition for a writ of error coram nobis came before the trial court Smith was not present, no order for his presence having been made. The deputy district attorney informed the court that the record in the case showed that a deputy public defender represented Smith in the police court and in the superior court; that in the superior court Smith stated that he knew the goods were stolen and that someone else was involved with him, and that he was entering a plea of guilty. These were all matters of record in the trial court of which the trial judge could take judicial notice. The trial court denied the petition.
 There is no merit to this appeal. The petition does not state a cause of action. [1] The writ of error coram nobis is not a writ that is intended to correct all errors occurring at the trial. It is a writ of limited scope. Fundamentally, it is available to vacate a judgment where, at the time of entry, facts existed which were unknown to the court and to the defendant, and which, if known, would have precluded conviction. (People v. Adamson, 34 Cal.2d 320 [210 P.2d 13]; People v. Gilbert, 25 Cal.2d 422 [154 P.2d 657]; People v. *699 Hoffman, 103 Cal.App.2d 315 [229 P.2d 486]; People v. Chapman, 96 Cal.App.2d 668 [216 P.2d 112].) [2] The applicant must plead and prove that the facts upon which he relies were not known to him and could not, in the exercise of due diligence, have been discovered by him earlier than the date upon which the writ was filed. (People v. Shorts, 32 Cal.2d 502 [197 P.2d 330]; People v. Hoffman, 103 Cal.App.2d 315 [229 P.2d 486].)
 [3] The present petition fails to comply with these requirements. Every alleged fact set forth therein as a ground for vacating the judgment must have been known to appellant in 1944 when he appeared in the police and superior courts. The petition does not allege that these facts were then brought to the attention of those courts, nor that an appeal was taken, nor that these facts were not then known to appellant. [4] Points that could have been raised in the trial court or on an appeal cannot be considered on a writ of error coram nobis. (People v. James, 99 Cal.App.2d 476 [222 P.2d 117]; People v. Ellis, 99 Cal.App.2d 188 [221 P.2d 258]; People v. Hoffman, 103 Cal.App.2d 315 [229 P.2d 486].)
 [5] Moreover, appellant waited nearly seven years after his conviction before filing the present proceeding. No excuse for the delay is set forth. Without explanation of this long delay the petition fails to state a cause of action. (People v. Coates, 95 Cal.App.2d 78 [212 P.2d 263]; People v. Chapman, 106 Cal.App.2d 51 [234 P.2d 716]; People v. Martinez, 88 Cal.App.2d 767 [199 P.2d 375]; People v. Lumbley, 8 Cal.2d 752 [68 P.2d 354]; People v. Baker, 92 Cal.App.2d 623 [207 P.2d 58].)
 Several appeals presenting points substantially similar to those here involved have been dismissed as frivolous by some appellate courts. (Edwards v. People, 99 Cal.App.2d 216 [221 P.2d 336]; People v. Schuman, 98 Cal.App.2d 140 [219 P.2d 36]; People v. Chapman, 96 Cal.App.2d 668 [216 P.2d 112]; People v. Malone, 96 Cal.App.2d 270 [215 P.2d 109].)
 Court appointed counsel do not challenge the above principles, but base their argument on the following point: In connection with his petition appellant requested an order from the trial court under sections 1567 and 2620 of the Penal Code requiring the prison officials at Folsom to produce appellant at the hearing so that he might testify. No such order was made, nor was counsel appointed to represent *700 appellant at that hearing. It is urged that this denied appellant the right to present his case.
 [6] The production of prisoners from the state prisons to testify is generally within the sound discretion of the court, and the sections of the Penal Code involved in effect so provide.  [fn. *] Of course, this discretion should and must be exercised so that no substantial right of the imprisoned person is adversely affected. Certainly, if a contested question of fact is involved, the prisoner has a right to be represented either in person or by counsel at the hearing. [7] But prisoners are not entitled as a matter of law to be brought from the state prison to local courts simply because they have filed a petition, if that petition shows on its face that it is without merit. That is this case. The trial court did not abuse its discretion in refusing to produce appellant, or in failing to appoint counsel.
 The order appealed from is affirmed.
 Bray, J., and Wood (Fred B.), J., concurred.
 Pen. Code,  2620: "When it is necessary to have a person imprisoned in the State prison brought before any court ... for the purpose of hearing a motion or other proceeding, ... an order for his temporary removal from said prison, and for his production before such court, ... must be made by the superior court ..." (Italics added.)
NOTES
[fn. *]  *. Pen. Code,  1567: "When it is necessary to have a person imprisoned in the State prison brought before any court, ... an order for that purpose may be made ..." (Italics added.)
